Carla-RL icon indicating copy to clipboard operation
Carla-RL copied to clipboard

Cannot present continuous image through cv2.imshow() while receiving camera data from Carla

Open Exasor opened this issue 4 years ago • 1 comments

I'm learning the program from https://pythonprogramming.net/control-camera-sensor-self-driving-autonomous-cars-carla-python/ and run the code in this website on ubuntu 18.04,python 3.6 and carla 0.9.9, but I cannot get continuous images through the following code: 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 The image is freezing in the first frame which is strange, I really don't know what's going wrong with it and sincerely hoping for any help. Thank you very much!

Exasor avatar Jul 30 '20 13:07 Exasor

I downloaded the code and installed carla 0.9.9, and I run play.py, nothing happened, I don't know why.

Mengyuliu0520 avatar Aug 11 '20 19:08 Mengyuliu0520