Hello Coppelia,
I'd like to retrieve the image from a vision sensor in the scene and save it into some formats (I may need to look at it later, but these images are for training purposes use mostly). So, I'd like to know how to achieve this both using Python Remote API and in Lua Scripts (using getVisionSensorImage gives me a 1d array(table), so I don't know how to deal with this in Lua and save it into what format is proper).
Thanks a lot!
Save image from Vision Sensor into .png or .npy
Re: Save image from Vision Sensor into .png or .npy
Also, what should I do if I want the image to be saved as a gray scale value?
Thank you!
Thank you!
Re: Save image from Vision Sensor into .png or .npy
sim.getVisionSensorImage
gives you the binary image data.Use
sim.saveImage
to save the image data to various formats.