cant read alpha channels [closed]

asked 2014-08-20 16:44:15 -0600

sukye gravatar image

According to http://docs.opencv.org/modules/highgui/doc/reading_and_writing_images_and_video.html the "-1" in

Mat img = imread(filename, -1);

enables reading alpha channels but actually it does not work.

Could you explain it?

The images are in tiff format.

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by sturkmen
close date 2020-10-25 05:58:23.959309

Comments

tiff support is a bit sparse in opencv, but it works with png.

berak gravatar imageberak ( 2014-08-21 01:01:03 -0600 )edit

Thank you @berak. Do you mean imread can read alpha channels in png files?

sukye gravatar imagesukye ( 2014-08-22 11:31:57 -0600 )edit

yes, definitely.

berak gravatar imageberak ( 2014-08-22 11:54:49 -0600 )edit