# relnoise(Iin,sz,sig​ma,varargin)

버전 1.7.0.0 (5.92 KB) 작성자:
Reduce image noise by measuring local pixel statistics and remapping intensities.
다운로드 수: 1.7K
업데이트 날짜: 2016/12/13

라이선스 보기

Tristan Ursell
Relative Noise Transform
(c) 2012 - 2016
Iout=relnoise(Iin,sz,sigma);
Iout=relnoise(Iin,sz,sigma,'field');
[Iout,Ivar]=relnoise(Iin,sz,sigma,...);
[Iout,Ivar,Imean]=relnoise(Iin,sz,sigma,...);
Iin = the input image, of any numerical class.

sz = (3 < sz < min(size(Iin))) is the size of the filter block used to calculate means and variances. This value must be odd.

sigma (sigma > 0) is the weighting parameter that defines the standard
deviation relative to the filter block's standard deviation around which the center pixel will be Gaussian weighted. Setting sigma = 1 weights the current pixel using the STD of the current filter block. Lower values bring the current pixel closer to the mean, while high values are more tolerant of variations. As sigma -> Inf, Iout = Iin.

The field 'plot' will create an output plot comparing this transform to the original image, a Gaussian blur with STD = sz/2, and median filter with block size equal to sz. At first glance, this filter appears similar to a median transform, but it does a better job of preserving local intensity extrema. Comparison with the median filter requires the Image Processing Toolbox, but the rest of the script does not.

The field 'disk' or 'square' will choose between using a disk or square filter block shape, where sz is the disk diameter or square side length. The default is square.

The field 'custom' may be followed by a user-defined logical matrix or strel, e.g. relnoise(Iin,sz,sigma,'custom',strel('line',30,45)). In this case 'sz' will be unused.

Iout is the transformed output image.

Ivar is the variance of the pixel intensities in the filter block at every point in the image -- essentially the spatially varying variance of the image.

Imean is the mean smoothed image using the filter block, equivalent to a convolution averaging filter with the specified neighborhood.

Example:

Iout=relnoise(Iin,3,0.5,'square','plot');
%OR
Iout=relnoise(Iin,3,0.5,'custom',strel('line',30,0),'plot');

figure;
subplot(1,2,1)
imagesc(Iout-double(Iin))
title('What was removed from the original image.')
axis equal tight
box on

subplot(1,2,2)
imagesc(abs(fftshift(fft(Iout-double(Iin)))))
title('FFT of difference between original and filtered images.')
axis equal tight
box on

### 인용 양식

Tristan Ursell (2024). relnoise(Iin,sz,sigma,varargin) (https://www.mathworks.com/matlabcentral/fileexchange/35556-relnoise-iin-sz-sigma-varargin), MATLAB Central File Exchange. 검색됨 .

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

### Community Treasure Hunt

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

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

switched output to double.

1.6.0.0

support of arbitrary pixel neighborhoods, improved edge handling and normalization

1.5.0.0

improved edge pixel handling, fixed small bug

1.4.0.0

Improved how the algorithm handles regions of zero variance.

1.3.0.0

fixed typos

1.2.0.0

No longer requires the Image Processing Toolbox.

1.0.0.0