9 Star 15 Fork 14

zhouxiang / ccface

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
opencvcannyaction.cpp 727 Bytes
一键复制 编辑 原始数据 按行查看 历史
zhouxiang 提交于 2015-05-11 21:00 . create pro
#include "opencvcannyaction.h"
OpenCVcannyAction::OpenCVcannyAction(QObject *parent): OpenCVaction(parent)
{
}
OpenCVcannyAction::~OpenCVcannyAction()
{
}
void OpenCVcannyAction::action(IplImage *imgin, IplImage *&imgout)
{
IplImage* pIplImageCanny = cvCreateImage(cvGetSize(imgin), imgin->depth, 1);
cvCvtColor(imgin, pIplImageCanny, CV_RGB2GRAY);
IplImage *imgCannyout = cvCreateImage(cvGetSize(imgin), imgin->depth, 1);
cvCanny(pIplImageCanny, imgCannyout, 15, 145, 3);
cvReleaseImage(&pIplImageCanny);
imgout = cvCreateImage(cvGetSize(imgin), imgin->depth, 3);
cvCvtColor(imgCannyout, imgout, CV_GRAY2RGB);//qt not suppert Format_Indexed8. so do this.
cvReleaseImage(&imgCannyout);
}
C++
1
https://gitee.com/zhouX/ccface.git
git@gitee.com:zhouX/ccface.git
zhouX
ccface
ccface
master

搜索帮助