- Gray Image
- Contrast enhancement or Equalization
- Thresholding
- Morphological operations
- Counts the disjoint objects
Insect egg detection/counting missing connected blobs
6 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Jerry Losey
le 29 Juin 2019
Modifié(e) : KALYAN ACHARJYA
le 29 Juin 2019
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!
0 commentaires
Réponse acceptée
KALYAN ACHARJYA
le 29 Juin 2019
Modifié(e) : KALYAN ACHARJYA
le 29 Juin 2019
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
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 commentaires
Plus de réponses (0)
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!