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

Value of d in jointBilateralFilter #2

Open
avani17101 opened this issue Feb 24, 2022 · 2 comments
Open

Value of d in jointBilateralFilter #2

avani17101 opened this issue Feb 24, 2022 · 2 comments

Comments

@avani17101
Copy link

avani17101 commented Feb 24, 2022

Can you confirm the value of d in JointBilateralFilter. In the code it is used as -1 but is not mentioned in paper.

With self as flat image and sigmaColor=22, sigmaSpace=20 (as given in paper) and d=-1
I am getting a very blurred out result.

  • JointBilateralFiltered image
    image
  • Original image
    image

When doing the filtering with flat image as joint image(as obtained by using https://github.com/sai-bi/L1Flattening) I get this:
image
Used this as code for bilateral joint and guided

filtered = cv2.ximgproc.jointBilateralFilter(joint,
                                                 im,
                                                 d=-1,
                                                 sigmaColor=15,
                                                 sigmaSpace=28)

filtered_g = cv2.ximgproc.guidedFilter(guide=joint,
                                                 src=im,
                                                 radius=int(45),
                                                 eps=3)


Are the filtering results supposed to be this blurred?

Thanks
PS: I used IIW dataset R image

@avani17101
Copy link
Author

@tnestmeyer do you have any comments over this?
Thanks

@tnestmeyer
Copy link
Owner

yes, I can confirm I used d = -1, as the documentation says: Diameter of each pixel neighborhood that is used during filtering. If it is non-positive, it is computed from sigmaSpace.

But this bluriness definitely seems wrong as the joint bilateral and guided filter are designed to be edge-aware. Might be that the given parameters don't fit well the artificial synthetic data that you are using.
To me it seems like on this specific synthetic data, the "im" is not an image that properly resembles light, there is no smooth/cast shadows or similar, so the input image "im" is already a reflectance 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

No branches or pull requests

2 participants