Difference in Vision Sensor data in Python & Matlab bindings
Posted: 26 Apr 2016, 23:10
Hi,
After getting the image data using simxGetVisionSensorImage() to get the image displayed:
For Python:
whereas for Matlab:
Why is there a difference in encoding the channel data? If it intentional or a bug in standardization.
Note: This is the latest V-Rep version on Linux 64. I haven't tested with other combinations or other remote API bindings.
After getting the image data using simxGetVisionSensorImage() to get the image displayed:
For Python:
Code: Select all
img = np.array(image,dtype=np.uint8)
img.resize([resolution[1],resolution[0],3])
cv2.imshow('image',img)
Code: Select all
image.setdatatype('uint8Ptr',1,resolution(1)*resolution(2)*3);
image = reshape(image.value, [3,resolution(2), resolution(1)]);
image = permute(image,[2 3 1]);
imshow(image);
Note: This is the latest V-Rep version on Linux 64. I haven't tested with other combinations or other remote API bindings.