Hybrid median filtering

버전 1.1.0.0 (2.84 KB) 작성자: Damien Garcia
HMF performs hybrid median filtering of a 2-D array or an RGB image
다운로드 수: 3.5K
업데이트 날짜: 2010/2/25

라이선스 보기

B = HMF(A,N) performs hybrid median filtering of the matrix A using a NxN box. Hybrid median filtering preserves edges better than a NxN square kernel-based median filter because data from different spatial directions are ranked separately. Three median values are calculated in the NxN box: MR is the median of horizontal and vertical R pixels, and MD is the median of diagonal D pixels. The filtered value is the median of the two median values and the central pixel C: median([MR,MD,C]).

B = HMF(A) uses N = 5 (default value).

A can be a 2-D array or an RGB image. If A is an RGB image, hybrid median filtering is performed in the HSV color space.

Notes
------
1) N must be odd. If N is even then N is incremented by 1.
2) The Image Processing Toolbox is required.
3) If the function NANMEDIAN exists (Statistics Toolbox), NaNs are treated as missing values and are ignored.

Example
--------
% original image
[I,map] = imread('trees.tif');
I = ind2rgb(I,map);
% noisy image
J = imnoise(I,'salt & pepper',0.02);
% hybrid median filtering
K = hmf(J,9);
% figures
subplot(121),imshow(J),subplot(122),imshow(K)

------
Other examples are given in:
http://www.biomecardio.com/matlab/hmf.html
-----

인용 양식

Damien Garcia (2024). Hybrid median filtering (https://www.mathworks.com/matlabcentral/fileexchange/25825-hybrid-median-filtering), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2007b
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Images에 대해 자세히 알아보기
도움

줌: hmf1(A,n)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
버전 게시됨 릴리스 정보
1.1.0.0

Test for RGB has been improved. RGB output and input have same class.

1.0.0.0