时域去燥的简单尝试

//test 
#include "deNoise.h"

#define  TMP_SIZE  5
#define  MAX_SAD_THRESH 3

int main()
{   
	VideoCapture capture;
	if (!capture.isOpened())
	{   
		int width   = 1920;
		int height  = 1080;
		int picSize = width * height;
		capture.open(0);//创建视频流对象//这儿0一般时电脑自带的摄像头,其他数字则时外接摄像头的ID号。
		capture.set(CV_CAP_PROP_FRAME_WIDTH, width);
	    capture.set(CV_CAP_PROP_FRAME_HEIGHT, height);

		width  =  capture.get(CV_CAP_PROP_FRAME_WIDTH);
		height =  capture.get(CV_CAP_PROP_FRAME_HEIGHT);
		picSize = width * height;
		int histWidth  = 512;
		int histHeight = 400;
		/*设置摄像头参数 不要随意修改
		capture.set(CV_CAP_PROP_FRAME_WIDTH, 1080);//宽度
		capture.set(CV_CAP_PROP_FRAME_HEIGHT, 960);//高度
		capture.set(CV_CAP_PROP_FPS, 30);//帧数
		capture.set(CV_CAP_PROP_BRIGHTNESS, 1);//亮度 1
		capture.set(CV_CAP_PROP_CONTRAST,40);//对比度 40
		capture.set(CV_CAP_PROP_SATURATION, 50);//饱和度 50
		capture.set(CV_CAP_PROP_HUE, 50);//色调 50
		capture.set(CV_CAP_PROP_EXPOSURE, 50);//曝

你可能感兴趣的:(图像滤波,图像处理)