qn1557845218

qn1557845218

0个粉丝

5

问答

0

专栏

0

资料

qn1557845218  发布于  2020-01-13 13:36:04
采纳率 0%
5个问答
2098

请教问题,把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");
    }
我来回答
回答3个
时间排序
认可量排序

qn1557845218

0个粉丝

5

问答

0

专栏

0

资料

qn1557845218 2020-01-13 14:01:30
认可0
sample_venc.c:2252:5: warning: implicit declaration of function 'timeRec' [-Wimplicit-function-declaration]
     timeRec();
     ^~~~~~~
sample_venc.c:2253:14: error: too few arguments to function 'cvHaarDetectObjects'
      faces = cvHaarDetectObjects(img, cascade, storage, 1.2, 2, 0, cvSize(25,25));
              ^~~~~~~~~~~~~~~~~~~
In file included from cv.h:71:0,
                 from sample_venc.c:29:
/opt/hisi-linux/x86-arm/arm-himix100-linux/arm-linux-uclibceabi/include/opencv2/objdetect/objdetect.hpp:139:15: note: declared here
CVAPI(CvSeq*) cvHaarDetectObjects( const CvArr* image,
               ^~~~~~~~~~~~~~~~~~~
sample_venc.c:2254:6: warning: implicit declaration of function 'timeRep' [-Wimplicit-function-declaration]
      timeRep();
      ^~~~~~~
sample_venc.c:2259:6: error: too few arguments to function 'cvSaveImage'
      cvSaveImage("face.bmp", img);
      ^~~~~~~~~~~
In file included from /home/lxd/hi/Hi3516EV200R001C01SPC012/01.software/board/Hi3516EV200_SDK_V1.0.1.2/mpp/sample/venc/../common/highgui.h:47:0,
                 from sample_venc.c:30:
/opt/hisi-linux/x86-arm/arm-himix100-linux/arm-linux-uclibceabi/include/opencv2/highgui/highgui_c.h:230:12: note: declared here
CVAPI(int) cvSaveImage( const char* filename, const CvArr* image,

qn1557845218

0个粉丝

5

问答

0

专栏

0

资料

qn1557845218 2020-01-13 14:02:10
认可0
这是出现的错误:
sample_venc.c:2252:5: warning: implicit declaration of function 'timeRec' [-Wimplicit-function-declaration]
     timeRec();
     ^~~~~~~
sample_venc.c:2253:14: error: too few arguments to function 'cvHaarDetectObjects'
      faces = cvHaarDetectObjects(img, cascade, storage, 1.2, 2, 0, cvSize(25,25));
              ^~~~~~~~~~~~~~~~~~~
In file included from cv.h:71:0,
                 from sample_venc.c:29:
/opt/hisi-linux/x86-arm/arm-himix100-linux/arm-linux-uclibceabi/include/opencv2/objdetect/objdetect.hpp:139:15: note: declared here
CVAPI(CvSeq*) cvHaarDetectObjects( const CvArr* image,
               ^~~~~~~~~~~~~~~~~~~
sample_venc.c:2254:6: warning: implicit declaration of function 'timeRep' [-Wimplicit-function-declaration]
      timeRep();
      ^~~~~~~
sample_venc.c:2259:6: error: too few arguments to function 'cvSaveImage'
      cvSaveImage("face.bmp", img);
      ^~~~~~~~~~~
In file included from /home/lxd/hi/Hi3516EV200R001C01SPC012/01.software/board/Hi3516EV200_SDK_V1.0.1.2/mpp/sample/venc/../common/highgui.h:47:0,
                 from sample_venc.c:30:
/opt/hisi-linux/x86-arm/arm-himix100-linux/arm-linux-uclibceabi/include/opencv2/highgui/highgui_c.h:230:12: note: declared here
CVAPI(int) cvSaveImage( const char* filename, const CvArr* image,

qn1525237779

0个粉丝

1

问答

0

专栏

0

资料

qn1525237779 2020-03-19 15:40:16
认可0
[quote][url=forum.php?mod=redirect&goto=findpost&pid=152478&ptid=77386]qn1557845218 发表于 2020-1-13 14:02[/url]
这是出现的错误:
sample_venc.c:2252:5: warning: implicit declaration of function 'timeRec' [-Wimpli ...[/quote]

Hi3516EV200R001C01SPC012 版本的SDK可否分享一下,谢谢先。
或将文件直接拖到这里
悬赏:
E币
网盘
* 网盘链接:
* 提取码:
悬赏:
E币

Markdown 语法

  • 加粗**内容**
  • 斜体*内容*
  • 删除线~~内容~~
  • 引用> 引用内容
  • 代码`代码`
  • 代码块```编程语言↵代码```
  • 链接[链接标题](url)
  • 无序列表- 内容
  • 有序列表1. 内容
  • 缩进内容
  • 图片![alt](url)
+ 添加网盘链接/附件

Markdown 语法

  • 加粗**内容**
  • 斜体*内容*
  • 删除线~~内容~~
  • 引用> 引用内容
  • 代码`代码`
  • 代码块```编程语言↵代码```
  • 链接[链接标题](url)
  • 无序列表- 内容
  • 有序列表1. 内容
  • 缩进内容
  • 图片![alt](url)
相关问答
无更多相似问答 去提问
举报反馈

举报类型

  • 内容涉黄/赌/毒
  • 内容侵权/抄袭
  • 政治相关
  • 涉嫌广告
  • 侮辱谩骂
  • 其他

详细说明

易百纳技术社区