摘要: #include "stdafx.h"#include "cv.h"#include "highgui.h"int main(){ IplImage* image=cvLoadImage("test.jpg"); int x=200; int y=200; int width=200; int height=200; int add=150; cvSetImageROI(image,cvRect(x,y,width,height)); cvAddS(image,cvScalar(add),image);// cvR 阅读全文
posted @ 2012-05-30 22:38 Epirus 阅读(251) 评论(0) 推荐(0) 编辑
摘要: 高斯化就是,让不在高斯曲线中的值回来。也就是回到正态分布图像中区域最大的部分,让那些叛逆的像素都回来#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) 编辑