cv.weightedMedianFilter - MATLAB File Help |
Applies weighted median filter to an image
dst = cv.weightedMedianFilter(src, joint)
dst = cv.weightedMedianFilter(src, joint, 'OptionName',optionValue, ...)
src
.exp(-|I1-I2|^2 / (2*sigma^2))
(|I1-I2| + sigma)^-1
(|I1-I2|^2 + sigma^2)^-1
dot(I1,I2) / (|I1|*|I2|)
(min(r1,r2) + min(g1,g2) + min(b1,b2)) / (max(r1,r2) + max(g1,g2) + max(b1,b2))
I
. This mask is used to
ignore the effect of some pixels. If the pixel value on mask is 0, the
pixel will be ignored when maintaining the joint-histogram. This is useful
for applications like optical flow occlusion handling. Not set by default.For more details about this implementation, please see [zhang2014100+].
[zhang2014100+]:
Qi Zhang, Li Xu, and Jiaya Jia. "100+ Times Faster Weighted Median Filter (WMF)". In Computer Vision and Pattern Recognition (CVPR), 2014 IEEE Conference on, pages 2830-2837. IEEE, 2014.