'MatToUIImage' 的调用没有匹配的函数

No matching function for call to 'MatToUIImage'

我正在使用 OpenCV Contrib 框架来执行面部识别。我需要将 cv::Mat 转换为 UIImage。但是,当我调用 MatToUIImage 函数时出现错误。

No matching function for call to 'MatToUIImage'

这是我正在使用的代码...

MatToUIImage(face, outcome);

face 是一个 cv::Mat 而 outcome 是一个 UIImage。

我做错了什么?

open source on GitHub,原型其实是:

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

这意味着您真正想要的函数只需要一个参数(您的 cv::Mat)并且它 returns UIImage.

I.E.

UIImage *outcome = MatToUIImage(face);