I'm trying to run the OAK camera preview script : https://maxsitt.github.io/insect-detect-docs/software/programming/
and I'm running into an issue :
pi@camtrap1:~/insect-detect $ python3 cam_preview.py
Unable to init server: Could not connect: Connection refused
Traceback (most recent call last):
File "/home/pi/insect-detect/cam_preview.py", line 98, in
cv2.imshow("cam_preview", frame_lq)
cv2.error: OpenCV(4.5.5) /tmp/pip-wheel-efxaz4j7/opencv-python_bedc0fac27944da0921e079da44d32bf/opencv/modules/highgui/src/window_gtk.cpp:635: error: (-2:Unspecified error) Can't initialize GTK backend in function 'cvInitSystem'
Does anyone have an idea on how to make this work ?
Thanks :)