I try to calibrate a camera with python and opnecv. I use a video-file instead of a webcam live stream.
Everything seems to work except of the last step. This is:
print "now get ready, camera is switching on"
while(1):
image=cv.QueryFrame(capture)
t = cv.CloneImage(image);
cv.ShowImage( "Calibration", image )
cv.Remap( t, image, mapx, mapy )
cv.ShowImage("Undistort", image)
c = cv.WaitKey(33)
if(c == 1048688): # enter 'p' key to pause for some time
cv.WaitKey(2000)
elif c==1048603: # enter esc key to exit
break
print "everything is fine"
There I receive following error:
Traceback (most recent call last):
File "V:\Studenten\Christian_Fuerstenhoefer\02_Kamerakalibrierung\openCV\camCalib.py", line 137, in <module>
t = cv.CloneImage(image);
TypeError: Argument 'image' must be IplImage
I already checked print type (image). Then it says None.
Does anyone know how to fix this problem?
Thanks for your help.