How can you convert a matrix to a high bitdepth grayscale?

2 views (last 30 days)
Background: I am using Matlab as a go between for FLIR R&D software and ImageJ 2 (FIJI). FLIR does not have an effective method of exporting images without compressing them, and there is no way to turn compression off. It is not the best program, but is the only way to read from our IR camera.
Method: I am currently using the mat2gray and writevideo functions, but they do not export in the precision we need. FLIR will import matricies with 4 decimal places EX: 96.8743 and we need as much of it as we can.
Is there a way to export grayscale images or videos with higher than 8 bit bitdepth?

Answers (1)

Image Analyst
Image Analyst on 16 Jul 2014
mat2gray "exports" or returns a double, which is about 14 or 15 digits of precision, even if only 4 are displayed when you print to the command window.
If you look at all 15 digits and the last 10 or so are all zero, then that is because of what's being fed into it from your FLIR file, not of what mat2gray() is doing.

Categories

Find more on Convert Image Type in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!