Wiener Filtering

I want to write a Wiener filter to improve the image. I do not want to use fourier, I know that there is a medium and dispersive alg, but I can not find it. Can you help me guys? http://en.wikipedia.org/wiki/Wiener_filter

+6
source share
1 answer

I think this is what you are looking for. This code is written by Ray Juang.

example of using the above code

void main(int argc, char *argv[]) if (argc <= 1) { printf("Usage: %s <image>\n", argv[0]); return; } IplImage *tmp = cvLoadImage(argv[1]); IplImage *tmp2 = cvCreateImage(cvSize(tmp->width, tmp->height), IPL_DEPTH_8U, 1); cvCvtColor(tmp, tmp2, CV_RGB2GRAY); cvNamedWindow("Before"); cvShowImage("Before", tmp); cvWiener2(tmp2, tmp2, 3,3); cvNamedWindow("After"); cvShowImage("After", tmp2); //cvSaveImage("C:/temp/result.png", tmp2); cvWaitKey(-1); cvReleaseImage(&tmp); cvReleaseImage(&tmp2); } 
+6
source

Source: https://habr.com/ru/post/891882/


All Articles