Auto Cropping #788
-
I'm looking to use the auto crop function of plantcv to help crop an image containing several leaves into an image of each leaf. I have a large data set of leaves to crop so this would be extremely helpful. Looking at the documentation I'm confused what object is meant to be passed into the obj argument of the auto_crop function. It seems to ask for a contour but the documentation isn't clear on how to make those. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Hi @SeanCullen11 , thanks for reaching out! The |
Beta Was this translation helpful? Give feedback.
Hi @SeanCullen11 , thanks for reaching out! The
pcv.find_objects
function will return a list of contours from a binary mask. Another method that might be a better approach depending on your images would be to usepcv.roi.multi
and thenpcv.roi_objects
to filter down the contours within a binary mask so they can each get autocropped (example here.