webots
webots copied to clipboard
documentation's code snippet doesn't work
cameraData = camera.getImage()
# get the gray component of the pixel (5,10)
gray = Camera.imageGetGray(cameraData, camera.getWidth(), 5, 10)
This crashes. You should also give a better example, since the fact that getImage returns a 1d byte array is not easy to find in the documentation. I would have been happy if there were helper functions so I didn't have to know getImage returns a 1d byte array.