micmacIGN / micmac

Free open-source photogrammetry software tools
http://micmac.ensg.eu
Other
718 stars 154 forks source link

Drunk cannot output 16bit images #10

Open mkunzBGC opened 7 years ago

mkunzBGC commented 7 years ago

Hi,

Thanks to all developers for the wonderful MicMac toolset!

I usually take photos with my Canon PowerShot SX260 HS. Thanks to CHDK I can safe raw images in DNG format and then dcraw enables me to turn those into bitmaps with 8 or 16 bits colour depth. At lowest focal length the distortions in the picture are basically unbearable, but Drunk does a great job in correcting those. This works nicely with 8 bits colour depth, but with a 16 bit tiff I get this error:

C:\Photogrammetrie\eckePulverturm\raw>mm3d Drunk CRW_1537.tiff Orientiert2000 Out=entzerrt/entzerrt
Images to process: 1
[0 0]********************************************************
**      (YOUR)  LOCATION :
**
** Error probably occured in a call to ELISE_COPY
**         at line : 115
**         of file : D:\dev\culture3d\src\uti_image\CPP_Drunk.cpp
********************************************************
-----------------------------------------------------------------
|   KIND OF ERR : User's dynamic error
|   Sorry, the following FATAL ERROR happened
|
|    values out of range in bitmaps writing
|   value = 1935
|   pts =
|   interval = [0 ---  256[
|
-----------------------------------------------------------------
Bye  (press enter)

As the error occurs during writing the bitmap, maybe this is easy to fix / extend for 16 bit output?

Thanks for your help, Martin

rjanvier commented 7 years ago

Maybe I could add a force8bit (F8B) and a FG (force gray) options to Drunk (like in scaleIm) and set F8B default to "true" in order to keep backward compatibility with existing binaries calling Drunk. Does it look an acceptable solution?

mkunzBGC commented 7 years ago

Sounds perfect to me as a user!