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

Color artifacts when mask reaches boundaries #3

Open
YotamNitzan opened this issue Jan 6, 2024 · 3 comments
Open

Color artifacts when mask reaches boundaries #3

YotamNitzan opened this issue Jan 6, 2024 · 3 comments
Assignees

Comments

@YotamNitzan
Copy link

Thanks for sharing this repository!

The blended result often has some color artifacts when the mask reaches the image's boundary.
For exmaple -
(src,dst, and mask resized for readability. Everything at 1024x1024 originally).

Source Target Mask
src dst mask

Result:
out-fullres

The result image has faded yellow and blue "color artifacts" near the right and left image boundaries. At least for the right side, I'm assuming it might be caused by lack of accurate boundary conditions. But on the other hand, some cases where the mask reaches the boundary are fine...

Do you have a suggestion for solving this issue?
Thanks!

@matt-baugh
Copy link
Owner

matt-baugh commented Jan 12, 2024

Hmm not sure exactly, which implementation are you using (Green's function or DST)? From the result I also assume you're using mixed_gradients, but a code snipped would help to clarify what you're running here.

@matt-baugh matt-baugh self-assigned this Jan 17, 2024
@conti3000
Copy link

I found some color artifacts that I solved clampling the blended result in the range 0 to 1

@matt-baugh
Copy link
Owner

Ah yes if you are using images with a specific value range it is often helpful to wrap any call to the blend function with a clipping function that uses the min/max values of that range. This is not part of the library as it is specific to the type of images being blended, but I would definitely recommend it if you are working with natural images (encoded as 0-1, if they are 0-255 you should clip with those values instead).

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

No branches or pull requests

3 participants