I'm learning the program from https://pythonprogramming.net/control-camera-sensor-self-driving-autonomous-cars-carla-python/ , but i can only get static image through cv2.imshow(), while receiving carame data from Carlaļ¼and the code related to image processing is as follows:
def process_img(image):
i = np.array(image.raw_data)
i2 = i.reshape((IM_HEIGHT, IM_WIDTH, 4))
i3 = i2[:, :, :3]
cv2.imshow("", i3)
cv2.waitKey(1)
return i3/255.0
while cv2.waitKey(1)
, i can only get a blank image, so i choose larger number like cv2.waitKey(30),then i can only get the first frame of the camera, and the image doesn't update, the version of related software or packages are as follows: ubuntu 18.04, python 3.6, Carla 0.9.9, opencv-python 4.2.0.34, cuda10.0, cudnn 7.6.5 for cuda 10.0, tensorflow 1.14
I'm really confused and hoping for help, any answers are appreciated