Calibrating smarphone

asked 2017-11-18 17:58:53 -0500

cesarPR gravatar image

updated 2017-11-21 17:17:56 -0500


I wanna use my s7 edge to capture videos and run a slam algorithm with the frames captured. For that i need to calibrate my camera. I already calibrated many usb cameras and i always did:

  • rosrun uvc_camera uvc_camera_node _device:=/dev/video1
  • rosrun camera_calibration --size 8x6 --square 0.108 image:=/image_raw camera:=/

And always worked fine.

I used DroidCam to get the video from my phone to the pc, worked fine, i could see the video stream using 'cheese'. Although when i do the first command above, the uvc_camera_node i get an error, saying:

opening /dev/video0 pixfmt 0 = 'YU12' desc = 'Planar YUV 4:2:0' discrete: 640x480: 1/30 terminate called after throwing an instance of 'std::runtime_error' what(): couldn't set format [1]+ Killed guvcview -d /dev/video0 Aborted (core dumped)

I guess uvc_camera can't understand the format of the video. How can i solve this and get the calibration parameters of my phone?


edit retag flag offensive close merge delete


I have this same problem with my Zenfone Max Pro M1 phone. I'm using Droidcam and the camera only supports YU12 pixel format. I've tried usb_cam and video_stream_opencv packages, and they don't support this format. Did you solve this problem?

xxros gravatar image xxros  ( 2020-06-21 09:26:23 -0500 )edit