为了读取资源文件到cpp。供opencv处理,采取的方式是把之前的cpp文件的后缀改成:.mm

然后会出现各种报错,原因是因为命名冲突,前面加上cv::就行。

  const char* imagePath = [[[NSBundle mainBundle] pathForResource:@"GlassMaterial/eye_brow_mask_03" ofType:@"png"] UTF8String];
      std::string  target_brow_filename(imagePath);
     Mat mask = cv::imread(target_brow_filename, cv::IMREAD_UNCHANGED);
    

 

相关文章:

  • 2022-12-23
  • 2021-12-01
  • 2022-12-23
  • 2021-12-01
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-12-14
  • 2022-03-02
  • 2021-10-22
  • 2022-12-23
  • 2021-11-02
  • 2021-12-16
  • 2021-10-26
相关资源
相似解决方案