Since libcamera2 (which replaces raspistill and raspivid) suggests using qt-preview for remote setups, you can modify your OpenCV pipeline to preview in Qt instead of imshow().
Modify your Python script:
Modify your Python script:
Code:
import cv2from libcamera import controlscamera = cv2.VideoCapture(0) # Assuming your camera is /dev/video0while True: ret, frame = camera.read() if not ret: break cv2.imshow("Camera Feed", frame) # Replace with Qt-based preview if needed if cv2.waitKey(1) & 0xFF == ord("q"): breakcamera.release()cv2.destroyAllWindows()Statistics: Posted by ahsrabrifat — Thu Mar 13, 2025 11:48 am