[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Image processing - corrupted display - range problem?

From: Alex Bligh
Subject: Image processing - corrupted display - range problem?
Date: Fri, 19 Dec 2008 20:47:21 +0000

I'm trying to do image processing using Octave ( 3.0.3 installed
on OS-X precompiled Octave-forge with the image package 1.0.8 also from
Octave Forge, plus ImageMagick 6.2.8). I am a (very) new user so please
bear with me if this is a stupid question.

If I load and display an image like this
 J = imread("/path/to/image.jpg")
 imshow (J)
then I would have thought the image should look the same as if I
open the image in Preview, or use ImageMagick's "display" command
to view it.

As far as I can tell, if the image is greyscale (converted using
jpgtopnm | pbmtopgm ), this works. However, ANY colour jpeg
I try looks incredibly washed out (it's as if each of R, G and
B have been shifted up a constant amount). Trying any jpeg on
the system produces this problem.

I thought this might be a peculiar display problem, but this:
J = imread("/path/to/image.ppm")
saveimage ( "/path/to/image2.ppm", J, "ppm")
when fed even a greyscale image, produces a very washed out
greyscale image (whereas I would have thought it should produce
a byte-for-byte copy with ppm). A hexdump of the file shows
lots and lots of "ff" which weren't there before.

It /looks/ like what is happening is Octave is doing some range
scaling. I can see why this would be useful. However, how do
I stop it?
imshow ( J, [0, 255] )
does not make a difference.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]