Can someone help me with my image processing?

2 ビュー (過去 30 日間)
john john
john john 2013 年 1 月 23 日
Hi guys I'm currently doing egg counter, if eggs are just close to each other and no top on other eggs my code can count how many eggs just like this photo. <http://i648.photobucket.com/albums/uu201/myjonas13/29_zps61ba495f.jpg>
and now my problem if some of the eggs is at the top my code can't recognize how many eggs are there just like this photo. <http://i648.photobucket.com/albums/uu201/myjonas13/soclose1_zps0ae323e7.jpg> <http://i648.photobucket.com/albums/uu201/myjonas13/soclose2_zps2c041938.jpg>
anyone can help or suggest me a better algorithm to do it? thanks in advance guys =) this is the code i used
B = im2bw(imfilter(img2, fspecial('gaussian', sigma*3, sigma), 'replicate'), thres);
Bl = bwlabel(B);
Neggs = max(Bl(:))
anybody home? hehe
  2 件のコメント
Image Analyst
Image Analyst 2013 年 1 月 23 日
Fix your links.
john john
john john 2013 年 1 月 23 日
ops sorry for that links sir..

サインインしてコメントする。

採用された回答

Image Analyst
Image Analyst 2013 年 1 月 23 日
There is no way to count eggs which are obscured. If you had a pile of eggs 10 deep then you simply don't know by seeing only the top layer and part of some underlayers. Your best bet is to avoid the situation in the first place by arranging the eggs in a single layer.
  1 件のコメント
john john
john john 2013 年 1 月 23 日
Thank you so much Image Analyst, that is the best explanation i must write.. then no more problem =)

サインインしてコメントする。

その他の回答 (1 件)

Jurgen
Jurgen 2013 年 1 月 23 日
I think your problem is similar to a recent post by Steve Eddins:
Maybe worth checking that out.

Community Treasure Hunt

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

Start Hunting!

Translated by