Borrar filtros
Borrar filtros

how to extract the area of highlighted circle from the original image? I don't want to include part 2 area. I have attached original file along with the highlighted file

1 visualización (últimos 30 días)

Respuesta aceptada

KALYAN ACHARJYA
KALYAN ACHARJYA el 2 de Mzo. de 2021
Editada: KALYAN ACHARJYA el 2 de Mzo. de 2021
This one:
#Step 1: Morphological Operation to remove those unwanted Region (You may avoid Morpho operation. Please see the difference in axex lengths and centroid without using morpho operation)
bwImage=imread(.....)
se=strel('disk',60);
BW1=imerode(bwImage,se);
BW2=imdilate(BW1,se);
figure,imshow([bwImage,BW2]);
Step 2: Get the circles (Get the properties using regionprops function and Draw circles using viscircles)
figure,imshow(bwImage);
hold on;
stats= regionprops(BW2,'Centroid','MajorAxisLength','MinorAxisLength')
centers=stats.Centroid;
diameters = mean([stats.MajorAxisLength stats.MinorAxisLength],2);
viscircles(stats.Centroid,diameters/2,'Color','b');
Result:
Hope it Helps!
Kalyan:)

Más respuestas (0)

Categorías

Más información sobre Image Filtering and Enhancement en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by