Page 1 of 1

Converting 12bit Tiff from Photron Highspeed camera.

Posted: 2012-02-23T08:11:58-07:00
by Ludvig Friberg
Hi!

I have been searching for a solution to display this series of tiff images correctly. The user has pushed some wrong buttons in the software that converted the files from raw bayer. The original bayer raw is gone. All we have left is these strange tiff files. They appear to be RGB 12 bit tiff. All software I have tried so far displays them wrong.

www.sementbetong.no/temp/12bit.tif

Perhaps ImageMagick can save the day!

Best Regards

Ludvig Friberg

Re: Converting 12bit Tiff from Photron Highspeed camera.

Posted: 2012-02-23T10:51:52-07:00
by fmw42
try this

convert 12bit.tif -depth 16 -auto-level 12bit_al16b.tif

or

convert 12bit.tif -depth 8 -auto-level 12bit_al8.tif

Re: Converting 12bit Tiff from Photron Highspeed camera.

Posted: 2012-02-23T11:50:00-07:00
by Ludvig Friberg
I tried it but it looks the same. Perhaps the file is just written in this corrupt way?

anyway here is the result
Image

Re: Converting 12bit Tiff from Photron Highspeed camera.

Posted: 2012-02-23T12:06:30-07:00
by fmw42
Yes, that is the results that I got also.

Re: Converting 12bit Tiff from Photron Highspeed camera.

Posted: 2012-02-23T12:09:54-07:00
by Ludvig Friberg
Is there anything that can be explored with how the 4096 values are stored in the 16 bit space? Is there some standard ways of restoring this data that I could try?

Best regards

Ludvig

Re: Converting 12bit Tiff from Photron Highspeed camera.

Posted: 2012-02-23T12:13:14-07:00
by fmw42
Ludvig Friberg wrote:Is there anything that can be explored with how the 4096 values are stored in the 16 bit space? Is there some standard ways of restoring this data that I could try?

Best regards

Ludvig

Someone more knowledgeable about tif than me would have to answer that.

Re: Converting 12bit Tiff from Photron Highspeed camera.

Posted: 2012-02-23T17:32:19-07:00
by Jason S
I examined the file, but I'm having trouble making sense of it. It does not seem to be a simple byte/nibble ordering problem.

If you could provide samples of a single image saved in both the 12-bit format, and in a portable format, that might help.

Re: Converting 12bit Tiff from Photron Highspeed camera.

Posted: 2012-02-24T01:09:14-07:00
by Ludvig Friberg
well the problem is I dont have the raw file anymore. I could try to replicate the problem with a different file though. What do you mean by portable?

Re: Converting 12bit Tiff from Photron Highspeed camera.

Posted: 2012-02-24T08:02:42-07:00
by Jason S
Portable = something that ImageMagick can read.

Re: Converting 12bit Tiff from Photron Highspeed camera.

Posted: 2012-02-24T10:50:51-07:00
by Jason S
Unfortunately, I think the image is damaged, and probably cannot be recovered in an automated way.

For example, here's a binary representation of a run of blue samples near the start of the image:

Code: Select all

 ...
 010001111001
 010001110011
 010000111111
 010000011001
 011111111100
 011111101110
 010000011010
 010000111010
 ...
The sudden jump from 010000011001 (1049) to 011111111100 (2044) is surely wrong. The 2nd-most significant bit has erroneously been turned on, or maybe the value has been left-shifted by one bit.

This same problem with the 2nd-most significant bit happens many times, for all colors. But it doesn't always happen. Maybe a program could be written to guess which samples are wrong, based on the sudden jumps, and try to correct them. But it would not be perfect, and I don't know whether that's the only problem.

Re: Converting 12bit Tiff from Photron Highspeed camera.

Posted: 2012-02-24T11:38:10-07:00
by Ludvig Friberg
Wow...

Thank you so much, this has got to be the most helpful forum ever!

I would never have found this out myself, these things can really haunt me and finally I can put this to rest.

Best Regards

Ludvig Friberg