code for image enhancement techniques on gray image
Show older comments
I need to do coding for this techniques using gray image..
Mean filter for 3 x 3, 5 x 5, 9 x 9 pixels size, Max filter for 3 x 3, 5 x 5, 9 x 9 pixel size, Min filter for 3 x 3, 5 x 5, 9 x 9 pixel size
1 Comment
Tasnim
on 1 Dec 2023
i need to do coding for Image enhancement techniques for real world examples using digital images
Answers (1)
Image Analyst
on 16 Mar 2014
Try this:
for windowWidth = [3,5,9]
% Mean
meanImage = conv2(grayImage, ones(windowWidth)/windowWidth^2, 'same');
% Min
minImage = imerode(grayImage, ones(windowWidth));
% Max
maxImage = imdilate(grayImage, ones(windowWidth));
end
Of course you can display them in the loop or whatever you want to do.
Categories
Find more on Image Filtering and Enhancement in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!