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