简体   繁体   中英

how does filter2D works in image processing for RGB image to calculate matrix output manually?

I'm newbie in image processing, i have tried to implement filter2D to reduce noise image with RGB color recently, and it works well. But i don't understand how it works manually in image matrix. Anybody can help me to explain how it works manually? This is the input matrix and output matrix i get. Input Image Matrix Output Image Matrix

Thanks for your help. :)

as a short answer, filtering an image means apply a filter (or kernel) to it, ie; convolving the image by this kernel. For that, you take each pixel on your image and consider a neighbourhood around it. You apply the kernel to the neighbourhood by multiplying each pixel of the neighbourhood with the corresponding kernel coefficient and sum all these values. For a pixel, this can be summarized by this figure ( source ) : 卷积图

For example, by setting all the coefficients to 1/N (where N is the number of elements in your kernel), you compute the average intensity of your neighbourhood. You can see https://en.wikipedia.org/wiki/Multidimensional_discrete_convolution for more information about image convolutions.

OpenCV's documentation gives some practical examples of image smoothing.

Hope it helps

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM