what is wallis filter? I have an essay on it and i cannot understand of find info on it..
28 次查看(过去 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:
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!