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

colormaps: add "gray" #2058

Merged
merged 4 commits into from
Jun 12, 2023
Merged

colormaps: add "gray" #2058

merged 4 commits into from
Jun 12, 2023

Conversation

f-dy
Copy link
Contributor

@f-dy f-dy commented Jun 9, 2023

  • Add the trivial "gray" colormap, useful to eg extract accumulation.
  • Don't show "pca" in the viewer menu (it crashes the server)

- The "pca" choice didn't work when applied to a single-channel image (it crashed the viewer), and it's applied by default to any image of more than 3 channels, where the colormap choice is ignore anyway.
- Add the trivial "gray" colormap, useful to eg extract accumulation.
f-dy added a commit to f-dy/nerfstudio that referenced this pull request Jun 9, 2023
…d crop box

Previously, ns-render interpolate:
- ignored distortion parameters
- used an interpolated focal length, but principal point was from the first camera
- rendered all images with the same size, even if input views were of different sizes
- forgot to render the last frame
- There was no default support for crop box and background color, except when rendering from a camera path, where these would exclusively be fetched from the camera_path.json

Now:
- There is an command-line option `--fixed-intrinsics` to keep fixed intrinsics through the whole sequence, but they are all interpolated by default
- Everything is interpolated, even size, so that `ns-render interpolate -step 1` should render exactly the input images
- All render modes have the options `--use-bounding-box` `--background-color` `--bounding-box-min` `--bouding-box-max` (same syntax as ns-export), which can override the json settings when rendering a camera path.

Works great with the gray colormap from nerfstudio-project#2058 to render object masks.
@tancik
Copy link
Contributor

tancik commented Jun 10, 2023

The PCA was there for typing reasons. This logic would also need to change . Maybe there should be a separate 1d colomaps list. Currently "PCA" and "Default" are weird.

@f-dy f-dy changed the title colormaps: remove useless "pca" choice, add "gray" colormaps: add "gray" Jun 12, 2023
@f-dy
Copy link
Contributor Author

f-dy commented Jun 12, 2023

@tancik I updated to re-add "pca" to the list, and fixed the viewer code to not show the "pca" option for single-channel images

Copy link
Contributor

@tancik tancik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tancik tancik merged commit d18588d into nerfstudio-project:main Jun 12, 2023
4 checks passed
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.

None yet

2 participants