Skip to content

How to subset ROIs by size? #676

Answered by km4htc
km4htc asked this question in Q&A
Jan 25, 2021 · 2 comments · 2 replies
Discussion options

You must be logged in to vote

Looking through the source code for roi_objects gave me the tools to figure out how to subset ROIs by size; it's cut down my post-classification time quite a bit by being able to skip some intermediate steps that I no longer needed. It's working well for me because the objects/contours I want are close to an order of magnitude larger than any unwanted objects/contours so I can pretty safely set a contour length threshold and have it work across all my images. The code below has also made it a lot more reliable at discerning between images that may have anywhere from 0-5 plants in the image by counting the objects kept after size subsetting. Anyway, here's the fix! (maybe useful to incorpo…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@km4htc
Comment options

Comment options

You must be logged in to vote
1 reply
@nfahlgren
Comment options

Answer selected by km4htc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants