diff options
author | James Braza <james.braza@synthego.com> | 2022-01-02 15:20:30 -0500 |
---|---|---|
committer | James Braza <james.braza@synthego.com> | 2022-01-02 15:20:30 -0500 |
commit | 0e114e9f9b6e53a96d810d935d358b62d8defffe (patch) | |
tree | e268d9c2035e3ad23032eb5fa0d6ee9ee5f7884e | |
parent | 72dc1bb4dd14e9fa9ee18f95e7b8c9ebd42bd424 (diff) | |
download | bullet3-0e114e9f9b6e53a96d810d935d358b62d8defffe.tar.gz |
Added comment about why H x W differ from expected
-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) |