Counting coins in an image...
Mostrar comentarios más antiguos
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 comentario
Amith Kamath
el 17 de En. de 2013
Editada: Image Analyst
el 17 de En. de 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.
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Video Formats and Interfaces en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!