Why does Matlab display different pixel values than other programs?
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I have a labview program which opens an image and displays the values of a pixel at a coordinate. If I open the same image with imread and display the value of that same coordinate, it is different.
If I plot intensity along a straight line in both programs, the relative intensity to other pixels remains constant; i.e. the coordinate of the brightest/darkest pixel is the same in both programs.
Finally, if I open that same image in any image editor (paint.net, GIMP, etc.), the pixel values agree with the results I get from Labview.
This problem persists regardless of the image type (.jpg, .bmp, etc.), whether it is greyscale or RGB, etc. I can't figure out why Matlab's pixel values don't agree with any other program's results. The ratio of Matlab's result to the other result is totally nonlinear; there is no scaling factor. The effect appears to exacerbate itself with very bright pixels.
I am using Matlab 7, though Matlab 6 has the same problem too.
0 Kommentare
Akzeptierte Antwort
Weitere Antworten (2)
Image Analyst
am 17 Jul. 2013
I don't observe that problem. Never have. The value it displays (through a variety of means) is the value I see in Photoshop, or wherever. Why don't you make up a step wedge of, say 16 gray steps and post it? Tell us what the step values are, what you observe in MATLAB, and other programs for the 16 steps.
0 Kommentare
Jan
am 18 Jul. 2013
Bearbeitet: Jan
am 18 Jul. 2013
If I open the same image with imread and display the value of that same coordinate, it is different.
This is too vague to be reconsidered. I guess, the reason is found in the Matlab code, so please show us the corresponding code and provide a test image. Perhaps an interpolation happens in between to downsample the image to the screen resolution. Or the image is read in indexed colors, while LabView creates the colormap image implicitly.
0 Kommentare
Siehe auch
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!