0

I was trying to calibrate my web camera with the official Aruco camera calibration program using default ArUco Boards, however, I didn't get the output yml file and I received the error message below.

VIDEOIO ERROR: V4L2: setting property #-1 is not supported
VIDEOIO ERROR: V4L2: setting property #-1 is not supported
1 500 0.002

This is the arguments I input, ./aruco_calibration live[:1] aruco_calibration_grid_board_a4.yml camera_results.yml -size=0.04. I saw the live video window pop out, and I could add images for calibration by press a, but I didn't see press c to calibrate as suggested in tutorial. Here is the screenshot of the in window.

Screenshot

Can someone please tell me what went wrong?

samliu
  • 73
  • 1
  • 1
  • 7
  • Which version of OpenCV? Which version of ArUco? – Chungzuwalla Jun 27 '18 at 07:08
  • @Chungzuwalla OpenCV 3.3.1 and ArUco 3.0.10 – samliu Jun 27 '18 at 12:26
  • The code you're using looks different to the "official" Aruco camera calibration program for 3.3.1, which is on GitHub at: https://github.com/opencv/opencv_contrib/blob/3.3.1/modules/aruco/samples/calibrate_camera.cpp (it uses different keyboard commands). You might try a version of ArUco from the official GitHub repo and see if it solves your problem. Trying the very latest stable release is also a good idea. – Chungzuwalla Jun 28 '18 at 02:13
  • @Chungzuwalla So I build the executable file using the `calibrate_camera.cpp` from github, and I tried this input command `./calibrate_camera -a=1 --ci=0 -d=16 -h=6 -l=0.04 -s=0.01 -w=4 out.yml` to use the integrated camera and I got `Unable to stop the stream: Invalid argument`. I'm confused, could you please tell me what's the correct argument? – samliu Jun 28 '18 at 07:49
  • The message "Unable to stop the stream: Invalid argument" comes from the V4L (Video for Linux) library, which is used by OpenCV. So it is not a bug in OpenCV directly, but indicates that something unexpected happened with your camera. If you search StackOverflow for "Unable to stop the stream" you might find a fix; for example, checking that drivers are up to date. – Chungzuwalla Jul 05 '18 at 06:06
  • The initial error you got, "VIDEOIO ERROR: V4L2: setting property #-1 is not supported", is also from V4L. My gut feeling is that, if you can see the live camera feed correctly in the Aruco camera calibration program, you can probably ignore those messages -- they are not causing the failure to calibrate your camera correctly. But if you can't see the camera feed, you will need to find the cause, which lies with your V4L installation. – Chungzuwalla Jul 05 '18 at 06:10
  • @Chungzuwalla Thanks for your reply, however, I wasn't able to solve this problem. I tried to build OpenCV `WITH_LIBV4L` and `WITH_V4L` on, but still met this error, I've also installed `libv4l-dev` and the error remained the same. What I did was to capture some images with my camera and use `aruco_calibration_fromimages` to calibrate and got the expected result. Maybe it's still some library or platform specific problem. – samliu Jul 14 '18 at 03:37
  • I'm glad you were able to calibrate finally. OpenCV is actually a pretty good library so it should get easier from here! Good luck. – Chungzuwalla Jul 16 '18 at 05:57

1 Answers1

0

So I've searched online and thought maybe v4l2 wasn't compatible with TX2 platform or something. What I did was to capture some images with my camera using guvcview and use aruco_calibration_fromimages to calibrate and got the expected result.

An alternative method is to use OpenCV's built-in calibration and modify the generated .yml file to Aruco's format.

samliu
  • 73
  • 1
  • 1
  • 7