opencv
文章平均质量分 77
xjjlanfeng
这个作者很懒,什么都没留下…
展开
-
离散傅立叶变换(DFT)
#include #include #include // Rearrange the quadrants of Fourier image so that the origin is at// the image center// src & dst arrays of equal size & typevoid cvShiftDFT(CvArr * src_arr, CvArr转载 2012-03-29 18:59:03 · 531 阅读 · 0 评论 -
(线代)施密特正交化
// ***************************************************************// GramSchmit version: 1.0 date: 05/24/2007// -------------------------------------------------------------// 作者:luckdst//转载 2012-03-29 18:35:42 · 1370 阅读 · 0 评论 -
分形fractal
#include "cv.h"#include "highgui.h"const int image_w = 100;const double a =0.0;const double b =0.0;const long Nmax = 255; //Z值衰减(趋向于零) 的临界const double Rmax = 20; // Z值没有界限地增加(趋向无穷)的临界IplImage转载 2012-03-29 18:29:15 · 273 阅读 · 0 评论 -
(contour)轮廓检测
#ifdef _CH_#pragma package #endif#ifndef _EiC#include "cv.h"#include "highgui.h"#include #endif#define w 500int levels = 3;CvSeq* contours = 0;void on_trackbar(int pos){ IplImage* c转载 2012-03-29 19:17:05 · 306 阅读 · 0 评论 -
Canny边缘检测
#ifdef _CH_#pragma package #endif#ifndef _EiC#include "cv.h"#include "highgui.h"#endifchar wndname[] = "Edge";char tbarname[] = "Threshold";int edge_thresh = 1;IplImage *image = 0, *cedge转载 2012-03-29 19:13:42 · 254 阅读 · 0 评论 -
读视频文件和运动问题检测
/************************************************** * 背景建模,运动物体检测 * **************************************************//*********************************************************************转载 2012-03-29 19:09:54 · 595 阅读 · 1 评论 -
Hough线段检测
/* This is a standalone program. Pass an image name as a first parameter of the program.Switch between standard and probabilistic Hough transform by changing "#if 1" to "#if 0" and back */#include转载 2012-03-29 19:05:49 · 378 阅读 · 0 评论 -
绘制贝塞尔Bezier曲线
// TrainingTools.cpp : 定义控制台应用程序的入口点。//#include #include #include #include #include #include using namespace std;const int WW_MAX_MARK_COUNT = 40; //最大40个控制点int mark_count =4;int conner_p转载 2012-03-29 18:45:54 · 823 阅读 · 0 评论 -
如何检测和处理轮廓线 squares demo
/*在程序里找寻矩形*/#ifdef _CH_#pragma package #endif#ifndef _EiC#include "cv.h"#include "highgui.h"#include #include #include #endifint thresh = 50;IplImage* img = 0;IplImage* img0 = 0;CvMe转载 2012-03-29 17:05:59 · 578 阅读 · 0 评论 -
对XML和YAML文件实现I/O操作
#include #include #include using namespace cv;using namespace std;void help(char** av){ cout << endl << av[0] << " shows the usage of the OpenCV serialization functional转载 2012-03-30 01:20:42 · 328 阅读 · 0 评论 -
图像缩放
#include #include #include int main(int argc, char* argv[]){ IplImage *src = 0; //源图像指针 IplImage *dst = 0; //目标图像指针 float scale = 0.618; //缩放倍数为0.618倍 CvSize dst_cvsize; //转载 2012-03-29 18:20:54 · 261 阅读 · 0 评论 -
高级图像处理初步
/**本代码主要是对一幅灰度图像rice.jpg进行一些处理,消除rice.jpg图像中的亮度不一致的背景, * 并使用阀值分割将修改后的图像转换为二值图像,使用轮廓检测返回图像中目标对象的个数以及统计属性。 */#include #include #include //#include //#include int main(int argc, char* argv[]){转载 2012-03-29 18:08:25 · 371 阅读 · 0 评论 -
鼠标绘图
#ifdef _CH_#pragma package #endif#include "cv.h"#include "highgui.h"#include #include IplImage* inpaint_mask = 0;IplImage* img0 = 0, *img = 0, *inpainted = 0;CvPoint prev_pt = {-1,-1};voi转载 2012-03-29 19:03:14 · 311 阅读 · 0 评论