使用 OpenCV Block 设置 Cinder 项目

发布于 2024-10-11 03:50:47 字数 767 浏览 6 评论 0原文

我正在尝试将新的 OpenCV 块与 Cinder 0.8.2 一起使用。我使用 TinderBox 在我的用户目录中的某个位置设置了该项目,并且刚刚尝试设置一个基本的视频捕获例程。我将 OpenCv 块作为一个组添加到项目中。

cv::Mat input( toOcv( capture.getSurface() ) )

当我添加此代码时,出现以下错误,

Undefined symbols:
  "cv::fastFree(void*)", referenced from:
      cv::Mat::release()    in ColourDanceApp.o
ld: symbol(s) not found
collect2: ld returned 1 exit status

我将上述代码分解为

Surface frame; 
frame = mCap.getSurface(); 
cv::Mat matrix; 
matrix = toOcv( frame ); 
cv::Mat input( matrix );

并发现此错误位于:

cv::Mat matrix; (and a whole bunch of errors)

自从我完成任何 C++ 以来已经有一段时间了,但我从中得出的结论是,它是一个项目设置问题代码主要取自 OpenCV 示例。事实已经走到这一步了,这告诉我 Cinder 路径是好的。下面没有任何帮助

I'm trying to use the new OpenCV Block with Cinder 0.8.2. I used TinderBox to setup the project somewhere in my user directory and have just been trying to setup a basic video capture routine. I added the OpenCv Block as a group to the project.

cv::Mat input( toOcv( capture.getSurface() ) )

When I added this code I got the following errors

Undefined symbols:
  "cv::fastFree(void*)", referenced from:
      cv::Mat::release()    in ColourDanceApp.o
ld: symbol(s) not found
collect2: ld returned 1 exit status

I broke down the above code into

Surface frame; 
frame = mCap.getSurface(); 
cv::Mat matrix; 
matrix = toOcv( frame ); 
cv::Mat input( matrix );

And found I got this error at:

cv::Mat matrix; (and a whole bunch of errors)

Its been awhile since I've done any C++ but I'm concluding from this that its a project setup problem as the code it mostly taken from the OpenCV examples. The fact that it gets that far tells me that the Cinder path is good. Theres no help in under

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

心凉怎暖 2024-10-18 03:50:47

这是一个老问题,但这是解决方案

http://forum .libcinder.org/topic/how-to-use-cinderblocks-in-xcode

1) 将用户标头搜索路径设置为:

"$(CINDER_PATH)/blocks/opencv/include"

2) 设置其他链接器标志 以包含您要使用的 .a 文件。例如:

"$(CINDER_PATH)/blocks/opencv/lib/macosx/libopencv_core.a"

它适用于从 Github 下载的最新版本的 Cinder。

This is an old question but here is the solution

http://forum.libcinder.org/topic/how-to-use-cinderblocks-in-xcode

1) Set User Header Search Paths to:

"$(CINDER_PATH)/blocks/opencv/include"

2) Set Other Linker Flags to include the .a files you want to use. For example:

"$(CINDER_PATH)/blocks/opencv/lib/macosx/libopencv_core.a"

It works with latest version of Cinder downloaded from Github.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文