How to reduce perimeter of Image in Matlab?
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Harry Andrews
am 3 Sep. 2018
Kommentiert: Harry Andrews
am 3 Sep. 2018
Hi,
I want to erode (Reduce the perimeter) of the below image by 7 pixels such that only the image within the red circle is kept.

I thought this could be done with imerode, but this also reduces the central pixels which I do not want!
Thank You :)
0 Kommentare
Akzeptierte Antwort
Image Analyst
am 3 Sep. 2018
Try this:
se = strel('disk', 7, 0);
binaryImage = grayImage > 0; % Threshold.
mask = imerode(binaryImage, se);
grayImage(~mask) = 0;
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Image Segmentation and Analysis finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!