Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Opencv with iOS UIImageToMat returns a transparent image

Hello,

I use Opencv to cut out parts of the image. To do this, I take a UIImage as an input parameter and pass this image to the UIImageToMat function to have a matrix for later cutting. My concern is that I'm testing my application on two iPhones, the first one is an iPhone 6S with iOS version 12.3.1 and everything works fine. The second iPhone is an iPhone 7 with the version of iOS in 12.3.1, the code runs well and there is no error but it returns me a transparent image. Do you have any ideas to fix the problem.

Opencv with iOS UIImageToMat returns a transparent image

Hello,

I use Opencv to cut out parts of the image. To do this, I take a UIImage as an input parameter and pass this image to the UIImageToMat function to have a matrix for later cutting. My concern is that I'm testing my application on two iPhones, the first one is an iPhone 6S with iOS version 12.3.1 and everything works fine. The second iPhone is an iPhone 7 with the version of iOS in 12.3.1, the code runs well and there is no error but it returns me a transparent image. Do you have any ideas to fix the problem.

click to hide/show revision 3
retagged

updated 2019-08-23 05:48:56 -0600

berak gravatar image

Opencv with iOS UIImageToMat returns a transparent image

Hello,

I use Opencv to cut out parts of the image. To do this, I take a UIImage as an input parameter and pass this image to the UIImageToMat function to have a matrix for later cutting. My concern is that I'm testing my application on two iPhones, the first one is an iPhone 6S with iOS version 12.3.1 and everything works fine. The second iPhone is an iPhone 7 with the version of iOS in 12.3.1, the code runs well and there is no error but it returns me a transparent image. Do you have any ideas to fix the problem.