Page 1 of 1

How to add noise to vision sensor

Posted: 14 May 2022, 23:03
by zhy149
Hello, if I want to minimize transfer learning from simulation to the real world, I may need to add some noise like lighting or perception to simulate a real-world setting. Is this necessary and if I can do this? Thank you very much!

Re: How to add noise to vision sensor

Posted: 16 May 2022, 16:30
by coppelia
Hello,

you can add noise after reading an image via sim.getVisionSensorImg (or sim.getVisionSensorCharImage). If the change needs to be displayed in CoppeliaSim, you can set the modified image via sim.setVisionSensorImg (or sim.setVisionSensorCharImage). From within CoppeliaSim, e.g. in Lua, this can be quite slow, so you better handle the image processing from a plugin, or an external application, e.g. via the ZeroMQ remote API.

Cheers