0

I am using the OpenCV Contrib framework to preform facial recognition. I need to convert a cv::Mat to a UIImage. However, when I call the MatToUIImage function I get an error.

No matching function for call to 'MatToUIImage'

This is the code I am using...

MatToUIImage(face, outcome);

face is a cv::Mat and outcome is a UIImage.

What am I doing wrong?

coder
  • 381
  • 2
  • 22

1 Answers1

2

Looking at the open source on GitHub, it looks like the prototype is actually:

UIImage* MatToUIImage(const cv::Mat& image);

which means the function you really want only takes one parameter (your cv::Mat) and it returns the UIImage.

I.E.

UIImage *outcome = MatToUIImage(face);
Michael Dautermann
  • 88,797
  • 17
  • 166
  • 215