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

coreg.apply creates artifacts on the edges #314

Closed
adehecq opened this issue Oct 6, 2022 · 1 comment · Fixed by #267
Closed

coreg.apply creates artifacts on the edges #314

adehecq opened this issue Oct 6, 2022 · 1 comment · Fixed by #267
Assignees
Labels
bug Something isn't working

Comments

@adehecq
Copy link
Member

adehecq commented Oct 6, 2022

When running e.g. a Nuth&Kaab coregistration on a DEM with gaps on the edges, some artifacts appear after the coreg.apply step (see figure below).

image

After a lot of debugging, I figured out that this is caused by this line and the following. I really don't understand why the indexes need to be interpolated. If the indexes are set to NaN, it works just fine, but with the fillnodata and constant value filling on the edges, indexes can be interpolated to the position of a valid neighbor pixel, which is not what we want.
This is also somewhat related to #197, where the reason for these lines was discussed.

I will fix this as part of PR #267.

@adehecq adehecq added the bug Something isn't working label Oct 6, 2022
@adehecq adehecq self-assigned this Oct 6, 2022
@adehecq
Copy link
Member Author

adehecq commented Oct 6, 2022

Note that this would probably make the option dilate_mask obsolete, which was initially implemented to fix similar artifacts in PR #236.

adehecq added a commit to adehecq/xdem that referenced this issue Oct 6, 2022
@adehecq adehecq linked a pull request Oct 6, 2022 that will close this issue
2 tasks
adehecq added a commit that referenced this issue Oct 18, 2022
* Remove unused imports

* Include a one-liner function for DEM coregistration

* Split coreg into horizontal/vertical coreg. Update stats and plots

* Minor comment edit

* Fix issue with edge artifacts brought up in #314

* Add an experimatal function to slightly extrapolate DEM prior to applying transformation

* Load DEMs only in area of overlap using new geoutils functionalities.

* Linting and mypy

* Upgrade pre-commit

* Improve docstring. Make output file optional.

* Add a 5 NMAD filter to the filtering option.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant