摘要: 高斯化就是,让不在高斯曲线中的值回来。也就是回到正态分布图像中区域最大的部分,让那些叛逆的像素都回来#include "stdafx.h"#include "cv.h"#include "highgui.h"int main(){ IplImage* image=cvLoadImage("test.jpg"); cvNamedWindow("Example"); cvShowImage("Example",image); IplImage* outputImage=cvCre 阅读全文
posted @ 2012-05-30 17:04 Epirus 阅读(400) 评论(0) 推荐(0) 编辑
摘要: #include "stdafx.h"#include "cv.h"#include "highgui.h"void saturate_sv(IplImage* img){ for(int y=0;y<img->height;y++) { uchar* ptr=(uchar*)(img->imageData+y*img->widthStep); for(int x=0;x<img->width;x++) { ptr[3*x+1]=255; ptr[3*x+2]=255; } } ... 阅读全文
posted @ 2012-05-30 16:59 Epirus 阅读(297) 评论(0) 推荐(0) 编辑
摘要: H:颜色的属性,本质就是不同的波长。S:饱和度,也比较好理解,就像从黑->白,除了白都是属于黑的范围~同样的道理红->白,除了白色都是红的,只不过浓度不同。饱和度为0,从上图可以看出,就是一个灰度图像。V:一个灰度图像当然有0-255这么多个数值。其实这个值是有一点亮度的意思具体的HSL跟HSV的区别可以用调色板来感觉。 阅读全文
posted @ 2012-05-30 10:51 Epirus 阅读(269) 评论(0) 推荐(0) 编辑
摘要: 1 #include "stdafx.h" 2 #include "highgui.h" 3 int g_slider_position = 0; 4 CvCapture* g_capture = NULL; 5 void onTrackbarSlide(int pos) 6 { 7 cvSetCaptureProperty(g_capture, CV_CAP_PROP_POS_FRAMES,pos); 8 } 9 10 int main()11 {12 cvNamedWindow("Test Vedio Slide",CV_WIND 阅读全文
posted @ 2012-05-29 19:25 Epirus 阅读(203) 评论(0) 推荐(0) 编辑
摘要: 1 #include "stdafx.h" 2 #include "highgui.h" 3 int main() 4 { 5 cvNamedWindow("example",CV_WINDOW_AUTOSIZE); 6 CvCapture* capture=cvCreateFileCapture("test.avi");//load avi file 7 IplImage* frame; 8 while(1){ 9 frame=cvQueryFrame(capture);//read the frame10 if 阅读全文
posted @ 2012-05-29 14:26 Epirus 阅读(160) 评论(0) 推荐(0) 编辑