Page 1 of 1

Converting 32-bit floating point grayscale raw image

Posted: 2013-10-28T08:17:39-07:00
by srulop
Hello,

I've got raw 16 bits unsigned grayscale images with header. I can successfully convert them to "regular" tiff using:

Code: Select all

convert -endian LSB -depth 16 -size "1024"x"1024"+"8192" gray:try_pic.edf -normalize -compress zip try.tif
But I've also got similar grayscale images in 32 bits floating point, and the following doesn't work:

Code: Select all

convert -endian LSB -depth 32 -size "1024"x"1024"+"8192" gray:try_pic.edf -normalize -compress zip try.tif
After checking this post, tried also this, with no success:

Code: Select all

convert -endian LSB -depth 32 -define quantum:format=floating-point -size "1024"x"1024"+"8192" gray:try_pic.edf -normalize -compress zip try.tif
Can you please suggest something?
Thanks!

Re: Converting 32-bit floating point grayscale raw image

Posted: 2013-10-28T10:57:10-07:00
by fmw42
What Q level of IM are you using in your compile? Q16? Perhaps you need Q32 or Q32 HDRI.

What does

convert -version

return

Re: Converting 32-bit floating point grayscale raw image

Posted: 2013-10-29T00:51:15-07:00
by srulop
It was Q16, now compiled with Q32, tried again all commands mentioned before - same results: tiff all transparent.

"convert -version" gives:
Version: ImageMagick 6.8.5-7 2013-10-29 Q32 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2013 ImageMagick Studio LLC
Features: DPC HDRI OpenMP
Delegates: bzlib djvu mpeg fftw fontconfig freetype jng jp2 jpeg lcms lqr lzma openexr pango png ps tiff x xml zlib
Can sucessfuly open with ImageJ with the following options:
Image type: 32-bit real
Width: 1024 pixels
Height: 1024 pixels
Offset to first image: 8192 bytes
Number of images: 1
Gap between images: 0 bytes
Little-endian byte order

What could be wrong?

Re: Converting 32-bit floating point grayscale raw image

Posted: 2013-10-29T01:36:36-07:00
by snibgo
srulop wrote:... same results: tiff all transparent.
So IM has added an alpha channel? Weird. What happens if you add "-alpha off" before the output filename?

It might be worth putting the image somewhere like dropbox.com and pasting the URL here, so someone with Q32 HDRI can try. (I don't have Q32.)

Re: Converting 32-bit floating point grayscale raw image

Posted: 2013-10-29T02:05:30-07:00
by srulop
Thanks for the replies!

tried (with "-alpha off"):

Code: Select all

convert -endian LSB -depth 32 -define quantum:format=floating-point -size "1024"x"1024"+"8192" gray:au1_6_3085.edf -normalize -alpha off -compress zip try.tif
- same result (transparent .tif).

Here's the raw image (4.1 MB): https://dl.dropboxusercontent.com/u/144 ... 6_3085.edf
And here is the desired result (obtained with ImageJ, with settings mentioned above, and auto normalization) (790 KB): https://dl.dropboxusercontent.com/u/144 ... ESIRED.png

Any ideas?

Re: Converting 32-bit floating point grayscale raw image

Posted: 2013-11-19T02:16:22-07:00
by srulop
Bumping.
Sorry, but still have no idea how to do it. There must be a way... :?