diff options
-rw-r--r-- | examples/pybullet/examples/pointCloudFromCameraImage.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/pybullet/examples/pointCloudFromCameraImage.py b/examples/pybullet/examples/pointCloudFromCameraImage.py index a156090f8..c56a3eb86 100644 --- a/examples/pybullet/examples/pointCloudFromCameraImage.py +++ b/examples/pybullet/examples/pointCloudFromCameraImage.py @@ -72,8 +72,8 @@ imgW = int(width / 10) imgH = int(height / 10) img = p.getCameraImage(imgW, imgH, renderer=p.ER_BULLET_HARDWARE_OPENGL) -rgbBuffer = img[2] -depthBuffer = img[3] +rgbBuffer = np.reshape(img[2], (imgH, imgW, 4)) +depthBuffer = np.reshape(img[3], [imgW, imgH]) print("rgbBuffer.shape=", rgbBuffer.shape) print("depthBuffer.shape=", depthBuffer.shape) |