Gaussian smoothing of cv::Mat column
Hi,
I'm very new to OpenCV and I have a short Question:
I have a cv::Mat with 3 columns and I want to smooth each column with gaussian blur.
Can anyone help me?
Hi,
I'm very new to OpenCV and I have a short Question:
I have a cv::Mat with 3 columns and I want to smooth each column with gaussian blur.
Can anyone help me?
In the first select a column then specify kernel size with (1,n).
The following code shows you how to do it.
Mat input_img = imread("c:\\test.bmp",0);
int x = 100;
GaussianBlur(input_img.col(x),input_img.col(x),Size(1,13),0);
imshow("view",input_img);
waitKey(0);
Asked: 2013-09-10 06:24:46 -0600
Seen: 577 times
Last updated: Sep 12 '13
Difference of Gaussian Filtering
Getting a smooth outline for a picture
Efficient difference of gaussians
Find how smooth or rough a surface in an image is
Gaussian blur and adaptive threshold issue on greyscale mat
Expectation Maximization: logarithm likelihood > 0
Have you simply tried cv::GaussianBlur yet?
http://docs.opencv.org/modules/imgproc/doc/filtering.html?highlight=gaussianblur#gaussianblur
No, I thought this would work only for images... Im trying to pass each column seperately into cv::GaussianBlur, but how to find out ksize and sigma?
You determine the ksize and sigma. Maybe try Size(2,2) and 1.
It does not work. Should the ksize be also a single column?
My answer didnt make sense at all :D The kernel always has to be odd since you need a center point in your kernel to calculate the new value. If you have 2x2 you have no center . So size should be Size(3,3).