def obj_get_vision_image(self, handle):
resolution, image = self.RAPI_rc(vrep.simxGetVisionSensorImage( self.cID,handle,
0, # assume RGB
vrep.simx_opmode_blocking,
))
dim, im = resolution, image
nim = np.array(im, dtype='uint8')
nim = np.reshape(nim, (dim[1], dim[0], 3))
nim = np.flip(nim, 0) # horizontal flip
#nim = np.flip(nim, 2) # RGB -> BGR
return nim
# "setters"
评论列表
文章目录