Classification:  UNCLASSIFIED 
Caveats: NONE

So I need some help.

I have some imagery that is a sequence of grayscale images with a 16
byte header.
The imagery is Shorts (aka 16 bits) and the data is in Little Endian.

I'm writing a perl script using Perlmagick.

I do the following:

$image=Image::Magick->new;
$image->Set(depth=>16,size='320x240+16');
$x = image->ReadImage("gray:$filename"); 

$x = $image->Write("example_%04d.jpg");
undef $image;

I've also tried 
$image->Set(quality=>100);
$image->Write("example_%04d.tif");

My problem:

If I bring up the raw imagery in a tool like ImageJ, the values are
completely different and the display is completely different that what
ImageJ is showing.  The original min & max values may be between 43600
and 44400 while the resulting min & max vary wildly from very small <
10000 to very large > 65000.

The final imagery is poor to display.

Now if I byteswap the imagery before I use my perlmagick script,
everything works out fine in my script with the byteswapped imagery.
The imagery looks like what ImageJ shows and the histogram of values is
what one would expect.

could the read method for gray or raw imagery be 'byteswapping' the
data?  Is there someplace I can look to check the read method?  Is the
data being stored different that I expect?

Is there any way I can print out the values of the pixels in the $image
object?

Any help would be greatly appreciated!

Danny


Classification:  UNCLASSIFIED 
Caveats: NONE


_______________________________________________
Magick-users mailing list
[email protected]
http://studio.imagemagick.org/mailman/listinfo/magick-users

Reply via email to