Insect egg detection/counting missing connected blobs

6 ビュー (過去 30 日間)
Jerry Losey
Jerry Losey 2019 年 6 月 29 日
編集済み: KALYAN ACHARJYA 2019 年 6 月 29 日
I am working to create a fairly simple function that will count the eggs in images similar to this: https://imgur.com/tyCt9XK
I have been able to get a clean grayscale image (easy): https://imgur.com/A5EqyRA
Then perform some bw conversion and erosion: https://imgur.com/jJkHBuV
I am just not sure the best way to count these objects. When I use Connected Components, it counts a large section of the eggs as a single object and the count is far off. That's understandable as they are connected in the bw image.
There are 165 eggs, so that's my target result... Any help is appreciated!

採用された回答

KALYAN ACHARJYA
KALYAN ACHARJYA 2019 年 6 月 29 日
編集済み: KALYAN ACHARJYA 2019 年 6 月 29 日
It not so easy answered exactly, though I have answered, so that you get some idea, you can try with differnt apparoach to get the expected results.
One way, for me , it seems easier way to try on it
  • Gray Image
  • Contrast enhancement or Equalization
  • Thresholding
  • Morphological operations
  • Counts the disjoint objects
I have tried the following way, It doesnt giving the result, it gives you the idea, how you can proceed. You can modifiy thr code to get the ewsults
grayImage=rgb2gray(imread('egg_count.jpg'));
enhancedImage=histeq(grayImage);
thValue=220;
bwImage=enhancedImage>thValue;
bwImage_largest=bwareafilt(bwImage,4,'Largest');
bwImage_result=xor(bwImage_largest,bwImage);
% Morpho
result=imerode(bwImage_result,strel(10));
%When you get the acceptable result Image, you can counts white blobs
Another way, tried with CHT (Circular Hope Transform), But I am not sure wheather it works for so smaller circular objects
Regards
Kalyan Acharjya

その他の回答 (0 件)

製品


リリース

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by