what is wallis filter? I have an essay on it and i cannot understand of find info on it..
조회 수: 15 (최근 30일)
이전 댓글 표시
I have an essay on it and i cannot understand of find info on it..
댓글 수: 0
답변 (4개)
Gergo Bohner
2017년 7월 12일
편집: Gergo Bohner
2017년 7월 23일
It is a locally adaptive filter that ensure that within every specified window, the mean and the contrast match some given values. It is great to get rid of uneven illumination, I use it mostly for microscopy image preprocessing. Here's an implementation, sorry for lack of documentation.
obj.output is image,
Md and Dd are mean and contrast to match,
Amax and p constrain the change in individual pixels,
W is window size.
function WallisFilter(obj, Md, Dd, Amax, p, W, varargin )
%UNTITLED2 Summary of this function goes here
% Detailed explanation goes here
if mod(W,2)==0
W = W+1;
end
w = floor(W/2);
F = double(obj.output);
if size(varargin) > 0
if varargin{1} == 1
% gauss_blur = 1/273 * [1 4 7 4 1; 4 16 26 16 4; 7 26 41 26 7; 4 16 26 16 4; 1 4 7 4 1];
% F = conv2(F, gauss_blur, 'same');
gauss_blur = fspecial('gaussian', W, 1);
F = conv2(F, gauss_blur, 'same');
end
end
convNumEl = ones(size(F));
M = conv2(F,ones(W),'same')./conv2(convNumEl,ones(W),'same');
D = (conv2((F-M).^2,ones(W),'same')/(W^2)).^0.5;
G = (F-M) .* Amax .* Dd ./ (Amax .* D + Dd) + p * Md + (1-p) * M;
G(G<0) = 0;
G(G>65534) = 65534;
obj.output = uint16(G);
end
댓글 수: 1
Image Analyst
2017년 7월 23일
Thanks Gergo. What other filters do you find useful in microscopy? For example, finding objects in phase contrast and DIC images is very challenging due to broken edges (where the edge is the same intensity as the background).
Image Analyst
2020년 4월 11일
It's an image filter where it scans the image and makes every pixel in the output image have a specified mean and standard deviation. There are some locally adaptive restrictions on it though. There is no built-in function in MATLAB or its toolboxes to do that function. You'd have to built it up from stdfilt() and either conv2() or imfilter(). Lucky for you, I've done that already.
See my attached demo. It will produce this image:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/283765/image.png)
댓글 수: 0
Image Analyst
2016년 6월 5일
It's an image filter where it scans the image and makes every pixel in the output image have a specified mean and standard deviation. There are some locally adaptive restrictions on it though. There is no built-in function in MATLAB or its toolboxes to do that function. You'd have to built it up from stdfilt() and either conv2() or imfilter(). Sorry, I don't have any code to do it.
댓글 수: 0
James
2022년 6월 21일
편집: Walter Roberson
2022년 9월 28일
"The Wallis Filter process applies a locally-adaptive contrast enhancement to a grayscale raster. This filter is designed for grayscale images in which there are significant areas of bright and dark tones. The Wallis Filter adjusts brightness values in local areas so that the local mean and standard deviation match user-specified target values. The algorithm uses an image-partitioning and interpolation scheme to speed processing of the image. The output raster is a user-controlled weighted average of the Wallis filter output and the original image."
It's just a scientific explanation of what it is. For an essay, it is better to describe it in your own words or give a link to the source, otherwise, you may be flunked for plagiarism. But still, I think that the question was not formulated correctly, there seems to be no such function in MATLAB, but you can implement this filter.
댓글 수: 4
Shardul Khanal
2022년 10월 7일
Are you aware of any method to find the values for the parameters in Wallis filter (Amax, percentage) for the best results?
Cheers.
Image Analyst
2022년 10월 7일
@Shardul Khanal trial and error. Whatever seems best to you, however you might define that, is best. If you're trying to find something and know the "true" shape or location then you can compare the output of your algorithm to that ground truth.
참고 항목
카테고리
Help Center 및 File Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!