Ask Your Question

Revision history [back]

I checked it precisely again and found, that opencv's imdecode seems to be correct. It returns back the image I created. This time I made sure, the image contained the values I wanted. I wrote a pgm (P2 mode) image of 256x1 pixels showing a gray scale (so every pixel holds it the same gray value as its position in the row). Then: imdecode returned exactly those values. So Photoshop seems to fail here in this experiment. The first time I created the image with Photoshop. This time I did it by hand (i.e. text editor).