2376
- 收藏
- 点赞
- 分享
- 举报
请教问题,把opencv2.4.9用在sample_venc里面去使用,编译一直不通过
我将opencv2.4.9交叉编译,并通过nfs挂载检验后,是可用的,然后我为了实现在手势识别的功能,就对sample采集的图片就是识别处理,但是修改后一直无法编译成功,我修改部分的代码如下:
/******************************************
step 8: snap picture process
******************************************/
printf("please press 'q' to exit this sample, press any other key to snap one picture to file!\n");
i = 0;
while ((ch = (char)getchar()) != 'q')
{
printf("prepare to snap one picture! Please wait...\n");
s32Ret = SAMPLE_COMM_VENC_SnapProcess(VencChn[1], 1, HI_TRUE, HI_FALSE);
if (HI_SUCCESS != s32Ret)
{
SAMPLE_PRT("%s: sanp process failed!\n", __FUNCTION__);
break;
}
printf("snap %d success!\n", i);
i++;
IplImage* img = NULL;
IplImage* cutImg = NULL;
CvMemStorage* storage = cvCreateMemStorage(0);
CvHaarClassifierCascade* cascade = (CvHaarClassifierCascade*)cvLoad("./haarcascade_frontalface_alt2.xml", 0, 0, 0);
CvSeq* faces;
char picname[100];
springf(picname,"snap_%d.jpg",i);
img = cvLoadImage(picname, 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");
printf("\npress 'q' to exit snap!\nperess any other key to capture one picture to file\n");
}
/******************************************
step 8: snap picture process
******************************************/
printf("please press 'q' to exit this sample, press any other key to snap one picture to file!\n");
i = 0;
while ((ch = (char)getchar()) != 'q')
{
printf("prepare to snap one picture! Please wait...\n");
s32Ret = SAMPLE_COMM_VENC_SnapProcess(VencChn[1], 1, HI_TRUE, HI_FALSE);
if (HI_SUCCESS != s32Ret)
{
SAMPLE_PRT("%s: sanp process failed!\n", __FUNCTION__);
break;
}
printf("snap %d success!\n", i);
i++;
IplImage* img = NULL;
IplImage* cutImg = NULL;
CvMemStorage* storage = cvCreateMemStorage(0);
CvHaarClassifierCascade* cascade = (CvHaarClassifierCascade*)cvLoad("./haarcascade_frontalface_alt2.xml", 0, 0, 0);
CvSeq* faces;
char picname[100];
springf(picname,"snap_%d.jpg",i);
img = cvLoadImage(picname, 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");
printf("\npress 'q' to exit snap!\nperess any other key to capture one picture to file\n");
}
我来回答
回答3个
时间排序
认可量排序
认可0
认可0
认可0
或将文件直接拖到这里
悬赏:
E币
网盘
* 网盘链接:
* 提取码:
悬赏:
E币
Markdown 语法
- 加粗**内容**
- 斜体*内容*
- 删除线~~内容~~
- 引用> 引用内容
- 代码`代码`
- 代码块```编程语言↵代码```
- 链接[链接标题](url)
- 无序列表- 内容
- 有序列表1. 内容
- 缩进内容
- 图片![alt](url)
相关问答
-
2018-09-30 14:52:45
-
2017-03-23 16:06:02
-
2015-02-01 13:16:09
-
2018-05-28 16:26:37
-
2018-12-12 14:38:38
-
2017-09-12 10:35:52
-
2015-11-20 10:56:58
-
2019-11-21 16:21:47
-
2019-08-09 09:56:45
-
2017-10-12 18:21:04
-
22017-03-20 15:27:34
-
2017-06-08 15:30:45
-
2016-05-17 16:38:43
-
2017-06-19 20:18:14
-
2020-06-18 10:31:02
-
2017-05-11 13:28:58
-
2020-06-18 19:13:20
-
2019-10-31 20:30:23
-
2016-08-05 11:13:31
无更多相似问答 去提问
点击登录
-- 积分
-- E币
提问
—
收益
—
被采纳
—
我要提问
切换马甲
上一页
下一页
悬赏问答
-
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板子运行自己编码的程序
举报反馈
举报类型
- 内容涉黄/赌/毒
- 内容侵权/抄袭
- 政治相关
- 涉嫌广告
- 侮辱谩骂
- 其他
详细说明
提醒
你的问题还没有最佳答案,是否结题,结题后将扣除20%的悬赏金
取消
确认
提醒
你的问题还没有最佳答案,是否结题,结题后将根据回答情况扣除相应悬赏金(1回答=1E币)
取消
确认