OpenCV中文网站

 找回密码
 立即注册
搜索
热搜: 安装 配置
查看: 2417|回复: 0

各位大哥大姐,帮帮忙

[复制链接]
发表于 2017-2-13 21:25:11 | 显示全部楼层 |阅读模式
小弟最近在嵌入式上做人脸识别,摄像头程序是自己基于v4l2写的,现在想把unsigned char*的图片数据转化为Mat,用来进行识别。代码如下
video_mat=Mat(640,480,CV_8UC1,(uchar*)src_buff);
然后在嵌入式平台运行出现如下报错
OpenCV Error:Null pointer(The matrix has NULL data pointer) in cvGetMat,file cxcore/cxarray.cpp,line 2375
Qt has caught an exception thrown an event handler,Throwing exceptions from an event handler is not support in Qt.You must reimplement QApplication::notify() and catch all exceptions there.

terminate called after throwing an instance of ‘cv::Exception’Aborted

请教大哥大姐们如何封装unsigned char *的图片数据为Mat?


回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|OpenCV中文网站

GMT+8, 2024-4-20 22:44 , Processed in 0.009452 second(s), 16 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表