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

Unable to remove black borders #3

Open
Amanda-M-UK opened this issue Sep 7, 2017 · 1 comment
Open

Unable to remove black borders #3

Amanda-M-UK opened this issue Sep 7, 2017 · 1 comment

Comments

@Amanda-M-UK
Copy link

Amanda-M-UK commented Sep 7, 2017

I would like to use the algorithms from bayer2rgb in my project. I have Nearest Neighbour working perfectly, however, HQLinear and Bilinear attach thin black borders to the delayed image. Is there a way to remove the black borders?

Many thanks

@ljbade
Copy link

ljbade commented Feb 25, 2021

The issue is the call to ClearBorders.

For the bi-linear and HQ linear the filter needs pixels that are past the edge of the image on the borders.

For bi linear this can be solved by changing the weights by the number of available pixels, e.g. for the filters that need 4 pixels you add the four pixels and divide by 4, but if an edge then add the 3 pixels and divide by 3, same for 2 pixels.

For HQ linear it seems harder but in that case I think you could revert to the same technique as bi-linear.

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