Help remove unconnected small pixel from image
Show older comments
Hello, maybe this question have been ask from other people, but i not fully understand how this code work. when i combine with my code it appear "index exceeds the number of array element" . can u help fix my code and help me understand the function 

Accepted Answer
More Answers (1)
Image Analyst
on 8 Jun 2022
You can now use bwareafilt instead of that ExtractNLargestBlobs() function I wrote (before bwareafilt was available) that you are using.
largestBlob = bwareafilt(binaryImage, 1); % Take largest blob only.
Categories
Find more on Image Category Classification in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!