资源简介

用OpenCV对图像中圆的检测以及拟合,很有用噢

资源截图

代码片段和文件信息

#include “highgui.h“
#include 
#include “circletest.h“//自定义头文件

extern IplImage* image ;//初始图像
extern IplImage* gray ;//灰度图像
extern IplImage* binary ;//二值阈值化图像
extern IplImage* circle_test;//结果图像
extern int slider_pos;//阈值  


int main(int argc char** argv)
{

image = cvLoadImage(argv[1]);//图像加载
//创建窗口
cvNamedWindow(“Test Circle“ CV_WINDOW_AUTOSIZE);
cvNamedWindow(“Gray Image“CV_WINDOW_AUTOSIZE);
cvNamedWindow(“Binary Image“CV_WINDOW_AUTOSIZE);
cvNamedWindow(“KiritopenCV“ CV_WINDOW_AUTOSIZE);

cvCreateTrackbar(“Threshold““KiritopenCV“&slider_pos255get_contour);  //创建滑动条,控制二值阈值化图像的阈值
get_contour(0);//轮廓提取


//显示原图
cvShowImage(“Test Circle“ image);

while(1)
if(cvWaitKey(100)==27)
              break;

cvReleaseImage(&image);
cvDestroyWindow(“Test Circle“);
cvDestroyWindow(“Gray Image“);
cvDestroyWindow(“Binary Image“);
cvDestroyWindow(“KiritopenCV“);
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2013-12-07 21:16  Win32Project1\
     文件          65  2013-12-07 16:06  Win32Project1\circletest.h
     目录           0  2013-12-07 21:16  Win32Project1\Debug\
     文件       10092  2013-12-07 20:39  Win32Project1\Debug\cl.command.1.tlog
     文件      174722  2013-12-07 20:39  Win32Project1\Debug\CL.read.1.tlog
     文件        6646  2013-12-07 20:39  Win32Project1\Debug\CL.write.1.tlog
     文件         113  2013-11-30 19:25  Win32Project1\Debug\KiritopenCV.lastbuildstate
     文件      201497  2013-12-07 16:56  Win32Project1\Debug\KiritopenCV.obj
     文件           2  2013-12-07 20:39  Win32Project1\Debug\link-cvtres.read.1.tlog
     文件           2  2013-12-07 20:39  Win32Project1\Debug\link-cvtres.write.1.tlog
     文件           2  2013-12-07 20:39  Win32Project1\Debug\link-rc.read.1.tlog
     文件           2  2013-12-07 20:39  Win32Project1\Debug\link-rc.write.1.tlog
     文件           2  2013-12-07 20:39  Win32Project1\Debug\link.10260-cvtres.read.1.tlog
     文件           2  2013-12-07 20:39  Win32Project1\Debug\link.10260-cvtres.write.1.tlog
     文件           2  2013-12-07 20:39  Win32Project1\Debug\link.10260-rc.read.1.tlog
     文件           2  2013-12-07 20:39  Win32Project1\Debug\link.10260-rc.write.1.tlog
     文件           2  2013-12-07 20:39  Win32Project1\Debug\link.10260.read.1.tlog
     文件           2  2013-12-07 20:39  Win32Project1\Debug\link.10260.write.1.tlog
     文件           2  2013-12-07 20:39  Win32Project1\Debug\link.10488-cvtres.read.1.tlog
     文件           2  2013-12-07 20:39  Win32Project1\Debug\link.10488-cvtres.write.1.tlog
     文件           2  2013-12-07 20:39  Win32Project1\Debug\link.10488-rc.read.1.tlog
     文件           2  2013-12-07 20:39  Win32Project1\Debug\link.10488-rc.write.1.tlog
     文件           2  2013-12-07 20:39  Win32Project1\Debug\link.10488.read.1.tlog
     文件           2  2013-12-07 20:39  Win32Project1\Debug\link.10488.write.1.tlog
     文件           2  2013-12-07 20:39  Win32Project1\Debug\link.10644-cvtres.read.1.tlog
     文件           2  2013-12-07 20:39  Win32Project1\Debug\link.10644-cvtres.write.1.tlog
     文件           2  2013-12-07 20:39  Win32Project1\Debug\link.10644-rc.read.1.tlog
     文件           2  2013-12-07 20:39  Win32Project1\Debug\link.10644-rc.write.1.tlog
     文件           2  2013-12-07 20:39  Win32Project1\Debug\link.10644.read.1.tlog
     文件           2  2013-12-07 20:39  Win32Project1\Debug\link.10644.write.1.tlog
     文件           2  2013-12-07 20:39  Win32Project1\Debug\link.10652-cvtres.read.1.tlog
............此处省略168个文件信息

评论

共有 条评论