kacpertopol/cam_board

Error on startup

Closed this issue · 4 comments

Packaged current cam_board for openSUSE Tumbleweed, this is what I see at launch:

~> cam_board 
Traceback (most recent call last):
  File "/usr/bin/cam_board", line 41, in <module>
    buff = int(config["perspectiveMatrix"]["buffer"])
  File "/usr/lib64/python3.8/configparser.py", line 960, in __getitem__
    raise KeyError(key)
KeyError: 'perspectiveMatrix'

Hi. It looks like the configuration file is not parsing properly. Could you navigate to the script directory and paste the output of:

ls -l

and

cat aruco_cam_config

Shame on me, I had installed the configuration file in the wrong place 😳

However, I see this other error now:

~> cam_board
[ WARN:0] global /home/abuild/rpmbuild/BUILD/opencv-4.5.0/modules/videoio/src/cap_gstreamer.cpp (1760) handleMessage OpenCV | GStreamer warning: Embedded video playback halted; module v4l2src0 reported: Cannot identify device '/dev/video0'.
[ WARN:0] global /home/abuild/rpmbuild/BUILD/opencv-4.5.0/modules/videoio/src/cap_gstreamer.cpp (888) open OpenCV | GStreamer warning: unable to start pipeline
[ WARN:0] global /home/abuild/rpmbuild/BUILD/opencv-4.5.0/modules/videoio/src/cap_gstreamer.cpp (480) isPipelinePlaying OpenCV | GStreamer warning: GStreamer: pipeline have not been created
[ WARN:0] global /home/abuild/rpmbuild/BUILD/opencv-4.5.0/modules/videoio/src/cap_v4l.cpp (893) open VIDEOIO(V4L2:/dev/video0): can't open camera by index
QSettings::value: Empty key passed
QSettings::value: Empty key passed
Traceback (most recent call last):
  File "/usr/bin/cam_board", line 93, in <module>
    aruco_dict = cv2.aruco.Dictionary_get(cv2.aruco.DICT_4X4_250)
AttributeError: module 'cv2' has no attribute 'aruco'

Is it to be expected when there is no camera available?

It looks like it is not detecting the camera. You can try different cameras by using the -c option and supplying a camera number.

In addition to this it seems like the aruco module is not installed in opencv. To do this you will probably need to install opencv-contrib-python.

I'm closing the issue. If the problem persists please let me know by starting a new issue thread.