Dear All,

I'm a long time user of Magick - but a first time poster! Tried scanning the 
archives but no luck. Really banging my head off this one, so would really 
appreciate some help...

Here is the problem: I'm trying to load a floating point TIFF depthmap 
(captured from a stereo system) - so that I can then (on the command line) 
alter the colourmap, export in other format, etc.

I can certainly load this file with my own code (using LibTIFF) - confirming 
that it's TIFFTAG_BITSPERSAMPLE==32 and TIFFTAG_ROWSPERSTRIP=1. etc, etc... 
It's only one channel (i.e. intensity/grayscale) as well.

Using ImageMagick 6.2.7 under Linux (i.e. a version that supports -depth 32 and 
64) I'm trying all sorts stuff based on:

 > convert depthfile.tif -depth 32 -define quantum:format=floating-point 
-define tiff:rows-per-strip=1 -colorspace GRAY -normalize test.jpg

This seems happy enough, but I just end up with a totally black JPEG (or 
whatever)! Tried -context-stretch and -colors 255 ,etc, etc. as well.

Running this:

 > identify -depth 32 -define quantum:format=floating-point -define tiff:rows-per-strip=1 
-format "%m:%f %wx%h (depth %z with quantum %q) - type %r with %k colours" 
depthfile.tif

Gives:

 > TIFF:depthfile.tif 2048x3072 (depth 16 with quantum 32) - type 
PseudoClassGray with 1 colours

Which hints at what I think is the problem. The floating point values in the 
file are in the range 1.1332 to 1.4500 (with lots of 4th precision values - 
because the depth is in metres). Thus, Imagemagick converts this to only 1 
colour value -  perhaps(?) because it expects floating-point values to range 
across the exponent (e.g. 1.0 - 15324.0 or some other big number).

Is this the case I wonder? And if so, how can I "rescale" my values so they are 
acceptable (a simple -fx 'p.intensity*100' doesn't seem to do anything)? It's like Magick 
has already read the file and decided to round the values to 1...

Cheers in advance!

Tim

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

Reply via email to