Masked k-order statistic filters for 2D data
Masked k-order statistic filter for double data
refer to: F. Bellavia, D. Tegolo, C. Valenti, "Improving Harris corner selection strategy", IET Computer Vision 5(2), 2011. Only for academic or other non-commercial purposes.
With respect to standard matlab routines, any kernel mask can be used and it is faster for large kernel size (i.e. more than 30x30 kernel mask)
input:
im - input 2D matrix
ker - kernel binary mask
idx - k-order index, in range [1,sum(ker(:)))
Use idx=1 for min filter (graylevel erosion), idx=sum(ker(:))/2+0.5 for median filter, idx=sum(ker(:)) for max filter (graylevel dilation), any other value for k-selection filter, non integer values interpolate between values, i.e. 5.6 give 0.4*I(5)+0.6*I(6) where I(n) is the n-th values in the sorted order inside the kernel mask.
output:
r - result 2D matrix, of the same size of im, zero padding is used for the border.
The median filter implementation is based on:
W. Hardle, W. Steiger, "Algorithm AS 296: Optimal Median Smoothing", Journal of the Royal Statistical Society, Series C (Applied Statistics), pp. 258-264.
Zitieren als
Fabio Bellavia (2024). Masked k-order statistic filters for 2D data (https://www.mathworks.com/matlabcentral/fileexchange/36686-masked-k-order-statistic-filters-for-2d-data), MATLAB Central File Exchange. Abgerufen .
Kompatibilität der MATLAB-Version
Plattform-Kompatibilität
Windows macOS LinuxKategorien
- Image Processing and Computer Vision > Image Processing Toolbox > Image Segmentation and Analysis > Region and Image Properties >
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Live Editor erkunden
Erstellen Sie Skripte mit Code, Ausgabe und formatiertem Text in einem einzigen ausführbaren Dokument.
kordstatfilt2/kordstatfilt2/
Version | Veröffentlicht | Versionshinweise | |
---|---|---|---|
1.6.0.0 | added support to build the mex file with microsoft visual studio (thanks to Giosue' Lo Bosco) |
||
1.4.0.0 | fix crash on newer matlab version
|
||
1.3.0.0 | 2nd revision: removed some comment typos |
||
1.0.0.0 |