MATLAB Answers

count the number of objects in the eight.tif.

7 views (last 30 days)
Can any one help me to count the number of objects in the eight.tif.
I tried this code but it did not work!!
B=imread('eight.tif');
BWl=im2bw(B);
imshow(BWl);
eul=bweuler(BWl,8);
EDU>> eul=
eul=
|
Error: Expression or statement is incomplete or incorrect.

  0 Comments

Sign in to comment.

Accepted Answer

Sabarinathan Vadivelu
Sabarinathan Vadivelu on 11 Feb 2014
Check this out
I = imread('eight.tif');
imshow(I)
level = graythresh(I);
BW = im2bw(I,level);
imshow(BW)
CC = bwconncomp(~BW);
CC.NumObjects

More Answers (0)

Community Treasure Hunt

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

Start Hunting!