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

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

astronaut gravatar image

Hi

'm using the camera calibration source code from OpenCV in this link (http://docs.opencv.org/2.4/doc/tutori...)

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"?>
<opencv_storage>
<Settings>
<!-- Number of inner corners per a item row and column. (square, circle) -->
<BoardSize_Width>3</BoardSize_Width>
<BoardSize_Height>4</BoardSize_Height>
<!-- The size of a square in some user defined metric system (pixel, millimeter)-->
<Square_Size>4</Square_Size>
<!-- The type of input used for camera calibration. One of: CHESSBOARD CIRCLES_GRID 

ASYMMETRIC_CIRCLES_GRID -->
ra>
<Calibrate_Pattern>"CHESSBOARD"</Calibrate_Pattern>
<UseCamera>1</UseCamera>
<IPCamera>"192.168.0.10"</IPCamera>
<!-- If true (non-zero) we flip the input images around the horizontal axis.-->
<Input_FlipAroundHorizontalAxis>0</Input_FlipAroundHorizontalAxis>
<!-- Time delay between frames in case of camera. -->
<Input_Delay>1</Input_Delay>
<!-- How many frames to use, for calibration. -->
<Calibrate_NrOfFrameToUse>30</Calibrate_NrOfFrameToUse>
<!-- 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.-->
<Calibrate_AssumeZeroTangentialDistortion>1</Calibrate_AssumeZeroTangentialDistortion>
<!-- 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. -->
<Write_outputFileName>"out_camera_data.xml"</Write_outputFileName>
<!-- If true (non-zero) we write to the output file the feature points.-->
<Write_DetectedFeaturePoints>1</Write_DetectedFeaturePoints>
<!-- If true (non-zero) we write to the output file the extrinsic camera parameters.-->
<Write_extrinsicParameters>1</Write_extrinsicParameters>
<!-- If true (non-zero) we show after calibration the undistorted images.-->
<Show_UndistortedImage>1</Show_UndistortedImage>
</Settings>
</opencv_storage>

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

Comments

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