- 收藏
- 点赞
- 分享
- 举报
opencv移植到hi3515c上的问题
参考1:http://www.ebaina.com/bbs/forum.php?mod=viewthread&tid=4858&extra=page%3D1 参考2: http://ebaina.com/bbs/forum.php?mod=viewthread&tid=5328&highlight=opencv
我用的系统是ubuntu12.04.4 64位,安装了海思3515官方配套的SDK,gcc版本是4.6.3,cmake是2.8.10.1,然后新建一个build和output文件夹: root@duhao-virtual-machine:/home/study/hi-opencv-2.4.10# ls build opencv-2.4.10 output test 进入opencv-2.4.10,进行cmake-gui,然后配置是按参考2中的配置,输出选成上面的output目录 之后进入build目录,开始make和make install,最后在output里面生成 include,lib,share,LICENSE 。没有生成bin文件。: root@duhao-virtual-machine:/home/study/hi-opencv-2.4.10/output# ls include lib LICENSE share 然后将include下的opencv和opencv2拷贝到交叉编译器的include下
把lib下的文件也拷贝到交叉编译器的lib文件下
arm-hisiv100-linux-uclibcgnueabi-g++ face.cpp -I/home/study/hi-opencv-2.4.10/output/include/opencv -lopencv_highgui -lopencv_imgproc -lopencv_core -lpthread -lrt -ljpeg -lpng -lxml2 -lopencv_objdetect -o face 来编译以下参考1的程序
/*Author:9crk 2014-12-24***/
include "cv.h"
include "highgui.h"
include "stdio.h"
/**for time mesurement*****/
include <sys/time.h>
struct timeval tpstart,tpend; unsigned long timeuses; void timeRec() { gettimeofday(&tpstart,0); } int timeRep() { gettimeofday(&tpend,0); timeuses=(tpend.tv_sec-tpstart.tv_sec)*1000000+tpend.tv_usec-tpstart.tv_usec; printf("use time: %uus\n",timeuses); return timeuses; } /****end**/
int main(int argc, char argv[]) { IplImage img = NULL; IplImage cutImg = NULL; CvMemStorage storage = cvCreateMemStorage(0); CvHaarClassifierCascade cascade = (CvHaarClassifierCascade)cvLoad("./haarcascade_frontalface_alt2.xml", 0, 0, 0); CvSeq* faces;
img = cvLoadImage(argv[1], 0);
timeRec();
faces = cvHaarDetectObjects(img, cascade, storage, 1.2, 2, 0, cvSize(25,25) );
timeRep();
if (faces->total == 0){
printf("no face!\n");
}
cvSetImageROI(img, ((CvRect)cvGetSeqElem( faces, 0)));
cvSaveImage("face.bmp", img);
cvResetImageROI(img);
printf("face detected! in face.bmp!\n");
}
出现以下错误:
/usr/local/hi-arm/arm-hisiv100-linux/bin/../lib/gcc/arm-hisiv100-linux-uclibcgnueabi/4.4.1/../../../../arm-hisiv100-linux-uclibcgnueabi/lib/libxml2.so: warning: gethostbyname is obsolescent, use getnameinfo() instead.
/usr/local/hi-arm/arm-hisiv100-linux/bin/../lib/gcc/arm-hisiv100-linux-uclibcgnueabi/4.4.1/../../../../arm-hisiv100-linux-uclibcgnueabi/lib/libopencv_objdetect.a(haar.cpp.obj): In function cvHaarDetectObjectsForROC(void const*, CvHaarClassifierCascade*, CvMemStorage*, std::vector<int, std::allocator<int> >&, std::vector<double, std::allocator<double> >&, double, int, int, CvSize, CvSize, bool)': haar.cpp:(.text._Z25cvHaarDetectObjectsForROCPKvP23CvHaarClassifierCascadeP12CvMemStorageRSt6vectorIiSaIiEERS5_IdSaIdEEdii6CvSizeSC_b+0x538): undefined reference to
cvCvtColor'
haar.cpp:(.text._Z25cvHaarDetectObjectsForROCPKvP23CvHaarClassifierCascadeP12CvMemStorageRSt6vectorIiSaIiEERS5_IdSaIdEEdii6CvSizeSC_b+0x16e8): undefined reference to cvCanny' /usr/local/hi-arm/arm-hisiv100-linux/bin/../lib/gcc/arm-hisiv100-linux-uclibcgnueabi/4.4.1/../../../../arm-hisiv100-linux-uclibcgnueabi/lib/libopencv_objdetect.a(cascadedetect.cpp.obj): In function
cv::CascadeClassifier::detectMultiScale(cv::Mat const&, std::vector<cv::Rect
这几个错误不懂要怎么改。希望大神来指导一下,感激不尽啊!!!
Markdown 语法
- 加粗**内容**
- 斜体*内容*
- 删除线~~内容~~
- 引用> 引用内容
- 代码`代码`
- 代码块```编程语言↵代码```
- 链接[链接标题](url)
- 无序列表- 内容
- 有序列表1. 内容
- 缩进内容
- 图片![alt](url)
-
2015-06-09 11:11:23
-
2015-04-26 17:03:01
-
2015-05-26 17:55:34
-
2016-01-29 17:28:20
-
2015-01-19 16:54:20
-
2015-12-16 15:51:00
-
2014-09-21 15:42:00
-
2015-01-20 22:07:13
-
2014-11-19 15:57:20
-
2014-10-24 09:41:52
-
2014-10-24 19:25:36
-
2019-01-26 09:46:16
-
2019-06-16 11:26:53
-
2018-05-28 16:26:37
-
2018-06-28 14:52:58
-
2020-06-18 10:31:02
-
2019-03-20 17:02:53
-
2014-07-04 15:38:56
-
2014-10-02 23:50:24
-
5Hi3516CV610 如何使用SD卡升级固件
-
5cat /dev/logmpp 报错 <3>[ vi] [func]:vi_send_frame_node [line]:99 [info]:vi pic queue is full!
-
50如何获取vpss chn的图像修改后发送至vo
-
5FPGA通过Bt1120传YUV422数据过来,vi接收不到数据——3516dv500
-
50SS928 运行PQtools 拼接 推到设备里有一半画面会异常
-
53536AV100的sample_vdec输出到CVBS显示
-
10海思板子mpp怎么在vi阶段改变视频数据尺寸
-
10HI3559AV100 多摄像头同步模式
-
9海思ss928单路摄像头vio中加入opencv处理并显示
-
10EB-RV1126-BC-191板子运行自己编码的程序
举报类型
- 内容涉黄/赌/毒
- 内容侵权/抄袭
- 政治相关
- 涉嫌广告
- 侮辱谩骂
- 其他
详细说明