summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Braza <james.braza@synthego.com>2022-01-02 15:11:17 -0500
committerJames Braza <james.braza@synthego.com>2022-01-02 15:11:17 -0500
commit72dc1bb4dd14e9fa9ee18f95e7b8c9ebd42bd424 (patch)
treecf617a4edcd96a4effc24348ba24a204a546d5c0
parent878e3d57f6f8ed01045dbe1956aeabd727836d03 (diff)
downloadbullet3-72dc1bb4dd14e9fa9ee18f95e7b8c9ebd42bd424.tar.gz
Added numpy reshapings to raw image
-rw-r--r--examples/pybullet/examples/pointCloudFromCameraImage.py4
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)