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

Gradient on right boarder of output image #3

Open
masc4ii opened this issue Mar 13, 2019 · 5 comments
Open

Gradient on right boarder of output image #3

masc4ii opened this issue Mar 13, 2019 · 5 comments

Comments

@masc4ii
Copy link

masc4ii commented Mar 13, 2019

First: this project is really great and I love how fast you get nice results out of it! Well done!

Unfortunately I have an little issue with it, and when watching your example picture I think it happens for you too: look the right boarder of the image. The ~10 rows on the very right have a kind of horizontal gradient effect - in your example picture going to white. You see what I mean? Is this to be expected, or is this a bug? The other 3 boarders look good so far.

pic

Edit: the bigger "sigma_spatial", the better visible this effect.

@pha-nguyen
Copy link

@masc4ii Have you resolved this problem? I got the same. :(

@masc4ii
Copy link
Author

masc4ii commented May 25, 2020

I solved the problem by using this library instead: https://github.com/Fig1024/OP_RBF

@marcel303
Copy link

The issue is a pointer not correctly being decremented.

Look for this line,
ypr = *in_x; ypg = *in_x; ypb = *in_x;

And change it into,
ypr = *--in_x; ypg = *--in_x; ypb = *--in_x;

That should fix the border issue.

@marcel303
Copy link

marcel303 commented Jan 6, 2021

(Perhaps there is another issue where the filter is now off by one pixel.. ?)

@marcel303
Copy link

Sorry the above change introduces another issue..

This,

        *--temp_x; *temp_x = 0.5f*((*temp_x) + (*--in_x));
        *--temp_x; *temp_x = 0.5f*((*temp_x) + (*--in_x));
        *--temp_x; *temp_x = 0.5f*((*temp_x) + (*--in_x));
        tpr = *--texture_x; 
        tpg = *--texture_x; 
        tpb = *--texture_x;
        ypr = *in_x; ypg = *in_x; ypb = *in_x;

Should be replaced with this,


        *--temp_x; *temp_x = 0.5f*((*temp_x) + (*--in_x)); ypr = *in_x;
        *--temp_x; *temp_x = 0.5f*((*temp_x) + (*--in_x)); ypg = *in_x;
        *--temp_x; *temp_x = 0.5f*((*temp_x) + (*--in_x)); ypb = *in_x;
        tpr = *--texture_x; 
        tpg = *--texture_x; 
        tpb = *--texture_x;

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