Counting coins in an image...
Afficher commentaires plus anciens
Hello
I tried below code for counting coins in an image. and it's work...
..........................
function p = CountCoins(i)
subplot(2,2,1);
imshow(i);
subplot(2,2,2);
t=im2bw(i);
imshow(t);
subplot(2,2,3);
imhist(i);
subplot(2,2,4);
x=zeros(size(i));
x(i>110)=1;
imshow(x);
c=bwconncomp(x);
p=c.NumObjects;
end
.................
But i need to do it without using 'bwconncomp()' function. please lead me... Thank You
1 commentaire
Amith Kamath
le 17 Jan 2013
Modifié(e) : Image Analyst
le 17 Jan 2013
Is this so that you don't use the Image Processing Toolbox, or is it just to avoid that particular function? If it's the latter, I would guess that you can use bwlabel() as well.
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Video Formats and Interfaces dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!