- 收藏
- 点赞
- 分享
- 举报
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
-
2018-05-28 16:26:37
-
2019-06-16 11:26:53
-
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
-
5SS928的emmc有32GB,bootargs设置使用16GB,但是为啥能用的只有rootfs的大小
-
33SS928怎样烧写ubuntu系统
-
10ToolPlatform下载rootfs提示网络失败
-
10谁有GK7205V500的SDK
-
5Hi3516CV610 烧录不进去
-
10Hi3559AV100 芯片硬解码h265编码格式的视频时出现视频播放错误,解码错误信息 s32PackErr:码流有错
-
5海思SS928 / SD3403的sample_venc.c摄像头编码Demo中,采集到的摄像头的YUV数据在哪个相关的函数中?
-
5海鸥派openEuler无法启动网卡,连接WIFI存在问题
-
66有没有ISP相关的巨佬帮忙看看SS928对接IMX347的图像问题
-
50求助hi3559与FPGA通过SLVS-EC接口对接问题
举报类型
- 内容涉黄/赌/毒
- 内容侵权/抄袭
- 政治相关
- 涉嫌广告
- 侮辱谩骂
- 其他
详细说明