Not able to calibrate IP Camera when using in Camera stream input

asked 2017-06-14 03:56:17 -0500

astronaut gravatar image


'm using the camera calibration source code from OpenCV in this link (

Im using IP HD Camera. I have the IP address of the camera and able to get the live stream of the camera. But its very slow processing the camera live stream. Like for one real sec it need more then 20 sec. So Im not able to calibrate. This are the setting Im using

<?xml version="1.0"?>
<!-- Number of inner corners per a item row and column. (square, circle) -->
<!-- The size of a square in some user defined metric system (pixel, millimeter)-->
<!-- The type of input used for camera calibration. One of: CHESSBOARD CIRCLES_GRID 

<!-- If true (non-zero) we flip the input images around the horizontal axis.-->
<!-- Time delay between frames in case of camera. -->
<!-- How many frames to use, for calibration. -->
<!-- Consider only fy as a free parameter, the ratio fx/fy stays the same as in the input 

cameraMatrix. Use or not setting. 0 - False Non-Zero - True-->
<Calibrate_FixAspectRatio> 1 </Calibrate_FixAspectRatio>
<!-- If true (non-zero) tangential distortion coefficients are set to zeros and stay zero.-->
<!-- If true (non-zero) the principal point is not changed during the global optimization.-->
<Calibrate_FixPrincipalPointAtTheCenter> 1 </Calibrate_FixPrincipalPointAtTheCenter>
<!-- The name of the output log file. -->
<!-- If true (non-zero) we write to the output file the feature points.-->
<!-- If true (non-zero) we write to the output file the extrinsic camera parameters.-->
<!-- If true (non-zero) we show after calibration the undistorted images.-->

What is wrong? Also when use the video more as imput I have the same probolem. Recorded the video but then when run the calibration program processing video is so slow and not able to calibrate the camera, Please any help?

edit retag flag offensive close merge delete


don't use a videostream for this. instead, shoot like 50 single images waving your chessboard, later sort out the "bad ones" (chessboard not fully visible, reflections, bad lighting etc.). you'll need like ~20 good ones for a calibration

berak gravatar imageberak ( 2017-06-14 04:03:07 -0500 )edit

how about live stream? what do you mean waving the chessboard? what kind of images they should be?

astronaut gravatar imageastronaut ( 2017-06-14 04:52:58 -0500 )edit

see the tutorial again look at the images at the bottom, or the video there.

again, it's easier with images, because if the calibration is bad, you can just replace some of the images with better ones, while with a livestream, you have to replace the whole take.

berak gravatar imageberak ( 2017-06-14 10:56:07 -0500 )edit