Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Addition of an additional crown cleaning function to remove very small "false" fragmented tree crowns #132

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

zeppehpt1
Copy link

Hi, this change is to fix #120 by applying a additional cleaning step to the crowns after the clean_crowns() function has been applied in order to optimize the quality of the resulting tree crowns.

PS: First PR, I hope I got it right.

@PatBall1
Copy link
Owner

Hi Richard,
@zeppehpt1 thanks for contributing this. And well done on submitting your thesis! The thing is we already have a haphazard area filtering process here:

crowns = crowns[crowns.area > area_threshold]

Your function would need to be integrated within this function for it to be cohesively integrated within the current set up.

What really needs fixing is this step:

if contour[:2] != contour[-2:]: # if not closed

I think it would be better to skip non-closed polygons in that function. But I didn't implement it before because it seemed to give some unexpected outputs. But I was in a rush and wasn't sure whether I'd overlooked something. We should check that again. Skipping those cases would be the quickest and cleanest way to proceed. Would you be willing to check that on your pipeline (I can send you and edited branch)?

@zeppehpt1
Copy link
Author

Thank you very much!

Oh yes, I must have overlooked that. But it seems that the step you mentioned might be the reason, because with my pipeline the additional cleaning step was always necessary even though I was using the latest version of the package.

Yes, I'm willing to look into it and hope I can help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix small artifactual polygon ouputs
2 participants