Hi, I want to ask. I want to count the number of fish, exact no of tilapia baby fish. until now, i already did until erosion and dilation. but, if the fish overlapped, it count as 1. how to solve this? what should i change? thankyou in advance
1 次查看(过去 30 天)
显示 更早的评论
clear all;
close all;
A = imread('cluster22.png'); threshold = 50; B = rgb2gray(A); C = B >threshold; figure,imshow(C);
se = strel('disk',4 ); erodedBW = imerode(C,se); figure, imshow(erodedBW)
SE = strel('disk',4 ); BW3 = imdilate(erodedBW,SE); figure, imshow(BW3)
s = regionprops(BW3, 'Area'); N_objects = numel(s);
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Image Segmentation and Analysis 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!