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

No clip to 0-1 #19

Merged
merged 1 commit into from
Jan 16, 2024
Merged

No clip to 0-1 #19

merged 1 commit into from
Jan 16, 2024

Conversation

shinyoung-yi
Copy link

Generally images may not belong to the range [0, 1] for several reasons:

  • HDR images (captured real image or rendered synthetic image)
  • Difference map of two images
  • Signed values for differentiable rendering
  • Other non-RGB radiance quantities can be considered as images including normal vectors, wave optics-based images, etc.

@haruishi43 haruishi43 merged commit dc352ee into haruishi43:master Jan 16, 2024
3 checks passed
@haruishi43
Copy link
Owner

@class255 thank you for your work. I merged your revisions, but I thought clipping the values based on the input tensor/ndarray seemed a better approach than using the output. Sometimes, the values will overflow or become weird based on the interpolation methods, especially around the image borders. I also added clip_output argument for all functions based on a previous pull request, so if you pass clip_output=False to any of the functions, it will skip the clipping entirely. Hope this helps

@shinyoung-yi
Copy link
Author

Thanks for accepting this PR.
Now I realized that clipping by np.nanmin(out) and np.nanmax(out) does not have any meaning and using horizon in the current version is much better.
Thank you again for your work!

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

Successfully merging this pull request may close these issues.

2 participants