【问题标题】:No matching function for call to 'MatToUIImage'调用“MatToUIImage”没有匹配的函数
【发布时间】:2018-08-04 04:29:36
【问题描述】:

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

No matching function for call to 'MatToUIImage'

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

MatToUIImage(face, outcome);

face 是 cv::Mat,outcome 是 UIImage。

我做错了什么?

【问题讨论】:

    标签: ios objective-c opencv opencv3.0 objective-c++


    【解决方案1】:

    open source on GitHub,貌似原型其实是:

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

    这意味着你真正想要的函数只需要一个参数(你的cv::Mat)并返回UIImage

    I.E.

    UIImage *outcome = MatToUIImage(face);
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-10-16
      • 1970-01-01
      • 2021-09-21
      • 2016-11-23
      • 2016-08-08
      • 2014-03-12
      • 2015-03-17
      • 2012-05-27
      相关资源
      最近更新 更多