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

May I ask which interface is used to implement the effect shown in the following figure? #691

Open
jueqing1015 opened this issue Apr 8, 2023 · 3 comments

Comments

@jueqing1015
Copy link

I want to remove the background color of the image in bulk to make it white, but I found that the CleanBackgroundToWhite interface will remove some of the colored parts from the image during cleaning.
微信截图_20230408223346

@DanBloomberg
Copy link
Owner

See prog/adaptmap_reg.c.

You'll see pixim, which is a mask over the image part. For the image pat that has the painting, we don't clean to white, just do a TRC using pixGammaTRCMasked().

@jueqing1015
Copy link
Author

jueqing1015 commented Apr 9, 2023

@DanBloomberg
I don't know why I couldn't produce the correct effect by referring to the code in the example. Could you please use the following image to handle it?
test

@DanBloomberg
Copy link
Owner

You can do this. Identify the bounding box of the image. (It was hardcoded in adaptmap_reg.c )
Then use the same approach.

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

2 participants