1

I've seen other questions attempting to answer this ( in a method similar to mkuse's method using FileStorage ). But it seems as though the ONLY way to do this is by saving it to .xml or .yml

I really need a way to save a file using imwrite() that doesn't cut off all my 16bit decimal values.

I really wanted to do it in a .tif but it seems that I can't do that.

There HAS to be another way!

Community
  • 1
  • 1
Jeremy Gamet
  • 165
  • 7

1 Answers1

1

You could try saving it using something other than imwrite. If you write your image data in a binary file using fstream as shown in this StackOverflow question, you wouldn't lose any precision. It just makes the saving and reading process a bit more complicated but you could easily write wrappers for that.

Such as is being done here.

Community
  • 1
  • 1
Sunreef
  • 4,452
  • 21
  • 33
  • Thanks @Sunreef !! I actually was just deciding to go ahead and do that yesterday as I was leaving work. I just wanted to make double sure that I needed to write some wrappers and that I didn't miss something obvious. – Jeremy Gamet Jul 20 '16 at 18:39