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 个)

类别

Help CenterFile Exchange 中查找有关 Image Segmentation and Analysis 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by