What does the output of imread represent?
2 次查看(过去 30 天)
显示 更早的评论
Hey Everyone,
I want to read an image for further processing. So when I write for example (I = imread('rice.png');), the output matrix I holds the values for each pixel in the image. What can we assume the unit of these? So I can say that the output read for each pixel resembles the output of photodiode?
Thanks a lot in advance.
0 个评论
采纳的回答
Jan
2015-11-7
No, you cannot assume a direct correlation between the pixels and the elements of the recording device. E.g. CCD sensors have different elements for the red, green and blue channels and the resulting pixels are the result of a computations already, see https://en.wikipedia.org/wiki/Bayer_filter. In addition the created images do not neccessarily have the same resolution as the recording device, such that an interpolation might have been applied in the camera.
Do not confuse the "units of the pixels" with the physical dimensions of the recording device. The same camera creates pictures with different units if you take a photo of a galaxis behind a telescope or of bacteria behind a microscope.
更多回答(1 个)
Image Analyst
2015-11-7
For your intents and purposes, just assume the values of the badly-named I of the "rice" image are a generic "intensity" value with units of "gray levels". Actually the units are units of energy (and I've derived that before) but you don't need to worry about it. This is not true for all images. Other images can have units of temperature, height, density, chemical activity, mass, atomic weight, etc.
Sounds like you're just getting started with image processing so you'll want to go over my Image Segmentation Tutorial: http://www.mathworks.com/matlabcentral/fileexchange/?term=authorid%3A31862
By the way, I looks too much like 1 (one) and l (lower case L), so I strongly advise you to write readable and maintainable code and use descriptive variable names. No one likes to review pages and pages of code that looks like an alphabet soup of single letter variable names with no comments.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Image Processing and Computer Vision 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!