Ask Your Question
0

flag to load float 32-bit image

asked 2020-04-17 03:37:54 -0600

NL37 gravatar image

Hi,

I am trying to read a float 32-bit image in c++. For that, i use the following code :

cv::Mat Dark_Image = cv::imread("/home/jetson/Documents/flat_fiel_correction/Dark_image.tif", cv::IMREAD_ANYDEPTH);

The image is loaded in 8-bit, and not in 32-bits .. The flag doesn't work. Any idea ..?

Thank you !

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2020-04-17 06:58:39 -0600

Horst gravatar image

Did you try to use the flag "IMREAD_UNCHANGED" (-1) ??

edit flag offensive delete link more

Comments

Hi,

Yes, I've tried. And it is always encoded in uchar

NL37 gravatar imageNL37 ( 2020-04-17 07:06:30 -0600 )edit

Hmm, have you checked the original depth of the image? Via right click in image properties (windows) or terminal $ identify /imagepath (ubuntu)?

Horst gravatar imageHorst ( 2020-04-17 09:33:49 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2020-04-17 03:37:54 -0600

Seen: 1,219 times

Last updated: Apr 17 '20