OpenCV cv2.imshow crashes or never shows a window on macOS when called from a thread
@devsingh05▲ 10 net votes
macOS only allows GUI windows on the main thread, so cv2.imshow from a worker thread crashes or does nothing, and imshow without cv2.waitKey(1) never paints. Keep capture and processing in a thread if you like, but pass frames to the main thread for display, or skip native windows and stream frames to a browser (an MJPEG endpoint or a websocket).