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!