I want to run a python file in google colab. The file will also show an image in a loop. But whatever I do, I am not able to show the image.
cam = cv2.VideoCapture('etcs/waste_2.mp4')
ret_val, image = cam.read()
while i<50:
ret_val, image = cam.read()
i+=1
image,new_centers = TfPoseEstimator.draw_humans(image, humans, imgcopy=False)
logger.debug('show+')
cv2.putText(image,
"FPS: %f" % (1.0 / (time.time() - fps_time)),
(10, 10), cv2.FONT_HERSHEY_SIMPLEX, 0.5,
(0, 255, 0), 2)
cv2_imshow(image)
imshow(np.asarray(image))
plt.show()
sleep(1)
fps_time = time.time()
if cv2.waitKey(1) == 27:
break
logger.debug('finished+')
Output:

