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

Added patch for folding augmentation. #57

Merged
merged 1 commit into from Aug 21, 2021
Merged

Added patch for folding augmentation. #57

merged 1 commit into from Aug 21, 2021

Conversation

kwcckw
Copy link
Collaborator

@kwcckw kwcckw commented Aug 20, 2021

Basically gradient width and height of folding is based on % of image width and height. If the image size is too small , the width or height range will be the same and causing those errors. We would need 4 unique points for the perspective transform. I added an if loop to show warning message and prevent further computation if there is no 4 unique points.

@proofconstruction proofconstruction merged commit 0ed15e6 into sparkfish:dev Aug 21, 2021
@proofconstruction
Copy link
Collaborator

proofconstruction commented Aug 21, 2021

I tested this and still found errors (see below), but I'm still merging this.

Bug

fold_width_one_side can be 0 (line 193) if images are less than 20x20. I didn't see this originally when I found the bug with 10x10 images. If images are larger than 20x20, this doesn't seem to happen, so I won't consider this a problem. We will deal with minimum image sizes some other way, see discussion in #58

@kwcckw
Copy link
Collaborator Author

kwcckw commented Aug 21, 2021

I tested this and still found errors (see below), but I'm still merging this.

Bug

fold_width_one_side can be 0 (line 193) if images are less than 20x20. I didn't see this originally when I found the bug with 10x10 images. If images are larger than 20x20, this doesn't seem to happen, so I won't consider this a problem. We will deal with minimum image sizes some other way, see discussion in #58

Thanks, you are right. So a better way is to check the folding width:

if (fold_width_one_side != 0) and (fold_y_shift !=0) :

I will include this in the next update:

image

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.

None yet

2 participants