How to extract 4 portions of main object of image with black background
Afficher commentaires plus anciens
Hi,
I have an image with a black background. I would like to extract 4 portions of the main object of the image, a leaf (as I show in the image B.png). I would like to extract 4 portions as matrixes of 100 x 100 pixels. I thought one way to do that it would be to split the leaf in 4 quadrants and then extract 1 portion of each quadrant.
The problem is that I need to do it without considering that black background of the image. So, when extracting those portions of the image, I don't want to get those black pixels too, only parts that are inside the leaf. Is this possible?
I need those portions to do a texture analysis with a Local Binary Pattern code I've developed.
I've attached both images: the original (A.png) and and example of what I need (B.png).
I really appreciate your help. Thank you in advance!


Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Agriculture dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
