why threholded image didn't show objects
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
Tian Tian
il 18 Ago 2017
Commentato: Image Analyst
il 19 Ago 2017
Hi, I have a binary image (multithreholded; 3472 * 3256), and now I want to get objects larger than 50 pixels in area, but every time the output is nothing (pure white or pure black when i changed 50 to others). Does it mean it regards the whole as one object after threholding? Mine is like grain distributed image. Could anyone help me? Thank you.
3 Commenti
Risposta accettata
Image Analyst
il 18 Ago 2017
Use either bwareafilt() or bwareaopen()
binaryImage = bwareaopen(binaryImage, 50);
or
binaryImage = bwareafilt(binaryImage, [50, inf]);
If you have a multilevel image, like 3 gray levels, then extract just one of the numbers to form a binary image:
binaryImage = grayImage == 1; % or whatever number you want.
Più risposte (0)
Vedere anche
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!