Add support for Gaussian noise render pass in Ogre2DepthCamera #122
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Depth cameras in ign-rendering generates both depth and color data using custom shader scripts so we can not apply regular image based Gaussian noise pass to its output. Instead, I updated Ogre2DepthCamera class to support its own render pass chain, and wrote a separate fragment shader that works with the depth camera data format.
The Gaussian noise is applied individually to each component in the point cloud data, i.e. x, y, z, and r, g, b.
Here's a depth_noise.sdf for testing in ign-gazebo (requires gazebosim/gz-sensors#35). To launch:
Select the
/camera/image
topic in the ImageDisplay plugin to see the following image output:As for the depth image, the effect is not very noticeable in the
/camera/depth_image
topic in ImageDisplay because I think the conversion of depth to color image normalizes the data and that reduces the effect of noise. Here's a better visualization in rviz that shows noise in the point cloud data generated by the depth camera: