diff options
-rw-r--r-- | examples/pybullet/examples/pointCloudFromCameraImage.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/examples/pybullet/examples/pointCloudFromCameraImage.py b/examples/pybullet/examples/pointCloudFromCameraImage.py index c56a3eb86..16e85db2d 100644 --- a/examples/pybullet/examples/pointCloudFromCameraImage.py +++ b/examples/pybullet/examples/pointCloudFromCameraImage.py @@ -73,7 +73,9 @@ imgH = int(height / 10) img = p.getCameraImage(imgW, imgH, renderer=p.ER_BULLET_HARDWARE_OPENGL) rgbBuffer = np.reshape(img[2], (imgH, imgW, 4)) -depthBuffer = np.reshape(img[3], [imgW, imgH]) +# Note: this depth buffer's reshaping does not match the [w, h] convention for +# OpenGL depth buffers. See getCameraImageTest.py for an OpenGL depth buffer +depthBuffer = np.reshape(img[3], [imgH, imgW]) print("rgbBuffer.shape=", rgbBuffer.shape) print("depthBuffer.shape=", depthBuffer.shape) |