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

WIP: rescale precomputed coordinates when image is too large (crossed) #12

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

Conversation

baurst
Copy link

@baurst baurst commented Apr 27, 2022

This PR is an attempt / basis for discussion to fix #8 . When the image is too large, the precomputed coordinate & radius lookup tables in "crossed-large.h" and "crossed-xlarge.h" are insufficiently scaled for the image size and no longer covering all of the image.

I was able to reproduce the problem using this image: 2,345 × 3,313 pixels

Before

My fix: For large images, where the coordinates from the precomputed lookup table would not be sufficient, scaling is applied to the coordinates in order to fit the image canvas. For unproblematic cases (small images) the old behavior remains unchanged.

After

The underlying calculations behind the lookup tables in "crossed-large.h" and "crossed-xlarge.h" are not 100% clear to me, maybe someone with a deeper understanding could chime in.

Branch: master

CC @jvolker @pjmsullivan

For unproblematic cases, old behavior remains unchanged.
Only problematic cases are handled differently than before.

Branch: master
@baurst baurst changed the title rescale precomputed coordinates when image is too large (crossed) WIP: rescale precomputed coordinates when image is too large (crossed) Apr 27, 2022
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.

Crossed get's cut off with high resultion input images
1 participant