Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

how do we choose circles and rectangulars

4 vues (au cours des 30 derniers jours)
bugrahan ilgaz
bugrahan ilgaz le 23 Juin 2020
Clôturé : MATLAB Answer Bot le 20 Août 2021
I want to determine the rectangles and circles in the picture with different colors and write numbers on them. For example, I want to see how many circles and how many rectangles there are, can you please help with the code?

Réponses (1)

darova
darova le 24 Juin 2020
  • binarize image
  • use imfindcircles
I0 = imread('img1.jpeg');
I1 = im2bw(I0);
[cc,rr] = imfindcircles(~I1,[50 100]);
imshow(I1)
viscircles(cc,rr)
  4 commentaires
bugrahan ilgaz
bugrahan ilgaz le 24 Juin 2020
thanks, you are good :)
darova
darova le 24 Juin 2020

Cette question est clôturée.

Community Treasure Hunt

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

Start Hunting!

Translated by