随笔分类 - Opencv Demo例程
摘要:Title :cv::Matdepth/dims/channels/step/data/elemSizeThe class Mat represents an n-dimensional dense numerical single-channel or multi-channel array. It can be used to store (Mat类的对象用于表示一个多维度的单通道或者多通道稠密数组,它可以用来存储以下东西)real or complex-valued vectors or matrices (实数值或复合值向量、矩阵)grayscale or color images (
阅读全文
摘要:#include "stdafx.h"#include "cv.h"#include "highgui.h"#include "cxcore.h"#include "cvaux.h"#include #include"Timer.h"using namespace std;int otsu2 (IplImage *image);CvBox2D findRectContours(const IplImage *gray);void main(){ IplImage* img =
阅读全文
摘要:#include "stdafx.h"#include #include #include #include using namespace cv;using namespace std;#define DEBUGdouble matchShapes(IplImage* src, IplImage* tmplt);CvPoint matchTemplate(IplImage* src, IplImage* tmplt);void L_TemplateMatch(IplImage* src,IplImage* tmp);int _tmain(int argc, _TCHAR*
阅读全文
摘要:#include "stdafx.h"// FitCircle.cpp : 定义控制台应用程序的入口#include "cv.h"#include "highgui.h"#include "cxcore.h"#include "cvaux.h"#include using namespace cv;using namespace std;void main(){ int BasicGlobalThreshold(int*pg,int start,int end); CvBox2D findRec
阅读全文
摘要:#include "stdafx.h"#include #include#include #include #include #include #include using namespace std;int _tmain(int argc, _TCHAR* argv[]){ IplImage* src=cvLoadImage("3.jpg",0); IplImage* des=cvCreateImage(cvGetSize(src),src->depth,src->nChannels); cvZero(des); cvThreshold(s
阅读全文
摘要:#include "stdafx.h"#include "opencv2\opencv.hpp"using namespace cv;IplImage* g_image=NULL;IplImage* g_gray=NULL;int g_thresh=120;CvMemStorage* g_storage=NULL;void on_trackbar(int){ if(g_storage==NULL) { g_gray=cvCreateImage(cvGetSize(g_image),8,1); g_storage=cvCreateMemStorage(0)
阅读全文
摘要:#include "stdafx.h"#include #include #include #include#include using namespace std;using namespace cv;int _tmain(int argc, _TCHAR* argv[]){ IplImage *src = cvLoadImage("lena.jpg"); IplImage *dst = 0; /* the first command line parameter must be image file name */ if (src != 0) ...
阅读全文
摘要:#include "stdafx.h"#include#include#include #include using namespace std; using namespace cv;int _tmain(int argc, _TCHAR* argv[]){ IplImage *src=cvLoadImage("lena.jpg",-1);//读入图像 IplImage *dst; CvRect ROI_rect_src; CvRect ROI_rect_dst; cvNamedWindow("src",CV_WINDOW_AUTO
阅读全文
摘要:#include "stdafx.h"#include #include #include using namespace cv;using namespace std;CvCapture* capture=NULL;int g_slider_position=0;void onTrackbarSlide(int pos){ cvSetCaptureProperty(capture,CV_CAP_PROP_POS_FRAMES,pos);}int _tmain(int argc, _TCHAR* argv[]){ cvNamedWindow( "Example2&
阅读全文
摘要:#include #include #include using namespace cv;using namespace std;int main(){ Mat M(7,7,CV_32FC2,Scalar(1,3)); IplImage* img=cvLoadImage("opencv.jpg"); cvNamedWindow("Window1",CV_WINDOW_AUTOSIZE); //cvRectangle(img,cvPoint(10,10),cvPoint(250,250),cvScalar(0,255,0),5); cvShowImage
阅读全文
浙公网安备 33010602011771号