mirror of
https://github.com/bulletphysics/bullet3
synced 2025-01-18 21:10:05 +00:00
Merge pull request #1184 from mbreyer/bugfix-pybulletGetCameraImage
fix memcpy of depth and segmentation images to numpy arrays
This commit is contained in:
commit
e24dbec146
@ -5178,9 +5178,9 @@ static PyObject* pybullet_getCameraImage(PyObject* self, PyObject* args, PyObjec
|
||||
memcpy(PyArray_DATA(pyRGB), imageData.m_rgbColorData,
|
||||
imageData.m_pixelHeight * imageData.m_pixelWidth * bytesPerPixel);
|
||||
memcpy(PyArray_DATA(pyDep), imageData.m_depthValues,
|
||||
imageData.m_pixelHeight * imageData.m_pixelWidth);
|
||||
imageData.m_pixelHeight * imageData.m_pixelWidth * sizeof(float));
|
||||
memcpy(PyArray_DATA(pySeg), imageData.m_segmentationMaskValues,
|
||||
imageData.m_pixelHeight * imageData.m_pixelWidth);
|
||||
imageData.m_pixelHeight * imageData.m_pixelWidth * sizeof(int));
|
||||
|
||||
PyTuple_SetItem(pyResultList, 2, pyRGB);
|
||||
PyTuple_SetItem(pyResultList, 3, pyDep);
|
||||
|
Loading…
Reference in New Issue
Block a user