[Synthetic Data] Camera and Post Processing

Hello everyone!

For the recording of synthetic data from a camera, the goal is to be as similar to the real camera images. Hence, I would like to change some parameters of the camera like contrast, saturation as well as other effects. I have seen that there is a post-processing available (Post-Processing — Omniverse Robotics documentation) and I want to know, how to set those parameters in a python script and if the settings affect all cameras or just individuals? Please give some example scripts.

Thank you a lot!

Best regards,

Hi there,

apologies for the late reply, here is an example script you can run int he Script Editor to set for example grain noise:

import carb
carb_settings = carb.settings.get_settings()
carb_settings.set_bool("/rtx/post/tvNoise/enabled", True)
carb_settings.set_float("/rtx/post/tvNoise/grainAmount", 0.5)

Thank you!

This setting affects all cameras right? Is it possible to have individual settings for the cameras?

Correct, these settings are global. We offer an augmentation system for implementing custom per-camera augmentations. Here’s a super simple example taking an RGBA input and producing an RGB output array:

import omni.replicator.core as rep
import warp as wp
def rgba_to_rgb(data_in: wp.array3d(dtype=wp.uint8), data_out: wp.array3d(dtype=wp.uint8)):
   i, j = wp.tid()
   data_out[i, j, 0] = data_in[i, j, 0]
   data_out[i, j, 1] = data_in[i, j, 1]
   data_out[i, j, 2] = data_in[i, j, 2]
augmentation = rep.annotators.Augmentation.from_function(rgba_to_rgb, data_out_shape=(-1, -1, 3))

You can find more info in the API docs (API — omni_replicator 1.6.4 documentation). We’re also planning more default augmentations and some more examples to cover more use cases. Let us know if you have any feedback or suggestions on the type of augmentations that you’d like to see us cover!

1 Like

Thank you!

Here are some more examples: [Isaac 2022.2] Generalize the example for adding noise to sensors - #3 by ahaidu

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.