Ask Your Question

Revision history [back]

Alpha channel changed on OpenCV python

I have an imgae with alpha channel. The alpha value is equal to 1. for all foreground pixels and is equal to 0 for all background pixels. When I read it using python OpenCV, I remark that the Alpha value is changed to 1 (255) for all pixels. I used this script to read the image. image withAlpha=cv2.imread("lace1.png",-1)# -1 or cv2.IMREAD_UNCHANGED C:\fakepath\3.png

Alpha channel changed on OpenCV python

I have an imgae with alpha channel. The alpha value is equal to 1. for all foreground pixels and is equal to 0 for all background pixels. When I read it using python OpenCV, I remark that the Alpha value is changed to 1 (255) for all pixels. I used this script to read the image. image withAlpha=cv2.imread("lace1.png",-1)# image.

image withAlpha=cv2.imread("lace1.png",-1)# -1 or cv2.IMREAD_UNCHANGED cv2.IMREAD_UNCHANGED

C:\fakepath\3.png

Alpha channel changed on OpenCV python

I have an imgae with alpha channel. The alpha value is equal to 1. for all foreground pixels and is equal to 0 for all background pixels. When I read it using python OpenCV, I remark that the Alpha value is changed to 1 (255) for all pixels. I used this script to read the image.image. I think it is a bug on OpenCV, I have checked on mathematica and the value are coorect!

image withAlpha=cv2.imread("lace1.png",-1)# -1 or cv2.IMREAD_UNCHANGED

C:\fakepath\3.png

Alpha channel changed on OpenCV python

I have an imgae with alpha channel. The alpha value is equal to 1. for all foreground pixels and is equal to 0 for all background pixels. When I read it using python OpenCV, I remark that the Alpha value is changed to 1 (255) for all pixels. I used this script to read the image. I think it is a bug on OpenCV, I have checked on mathematica and the value are coorect!

image withAlpha=cv2.imread("lace1.png",-1)# -1 or cv2.IMREAD_UNCHANGED

C:\fakepath\3.pngC:\fakepath\3.png