简体   繁体   English

如何在嵌入式系统中使用opencv

[英]How to use opencv in embedded system

my question is related to the use of OpenCV in embedded systems. 我的问题与嵌入式系统中OpenCV的使用有关。 Instead of compiling the entire opencv library in my embedded platform, I would like to know if it is possible to copy only the libraries and call them from my .cpp main file. 我想知道是否可以只复制这些库并从我的.cpp主文件中调用它们,而不是在嵌入式平台上编译整个opencv库。

Til now, what I usually do is to compile openCV in my embedded platform and in my main.cpp call 直到现在,我通常要做的是在嵌入式平台和main.cpp调用中编译openCV

#include <opencv2/opencv.hpp>

Then in my cmake file I just put: 然后在我的cmake文件中,我只输入:

find_package( OpenCV REQUIRED )
target_link_libraries( main ${OpenCV_LIBS} )

This method works but I would like to save space and use only the .so or .a libraries. 此方法有效,但我想节省空间,仅使用.so或.a库。 Is it possible to do that? 有可能这样做吗? if yes, how? 如果是,如何?

thanks 谢谢

yes opencv will work fine, but you have to make sure few thing, 是的,opencv可以正常工作,但是您必须确保几件事,

  1. libraries which are being copied should be previously compiled from same plateform. 复制的库应事先从相同的平台编译。
  2. should be placed in the proper location 应该放在正确的位置
  3. you also need .h files for compiling your code. 您还需要.h文件来编译代码。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM