Can I use cv.CreateMat(2, 1, cv.CV_32FC1) in OpenCV 3.0.0?
Hi, everyone. I am a OpenCV newbie. Can I use cv.CreateMat(2, 1, cv.CV_32FC1) in OpenCV 3.0.0? If not, what is a good alternative?
Also, I want to do the camera calibration by using OpenCV. Referring to others' code, there is a function I used, but there is an error occuring.
retcode, cor = cv2.findChessboardCorners(image[i], patternSize, cv2.CALIB_CB_ADAPTIVE_THRESH | cv2.CALIB_CB_FILTER_QUADS)
cv2.error:2494: error: (-206) Unrecognized or unsupported array type in function cvGetMat
Any body can help me with this problem?
Thanks a lot!
Update~~~~~~~~~~~~~
no, you can't use cv functions in opencv3.0 any more, the old cv python api was removed.
if you want to create an empty image in cv2, use numpy:
img = np.zeros((h, w, 3), np.uint8)
Thanks, berak! As for the second problem, would you please give me any information?
we'll try , at least ;)
but please, could you update your question, and show a liitle more code ?
somehow, it does not like your
image[i]
, but impossible to say why, atm.Thanks berak! I update with a screenshot of the code, I am new to the forum so I am really sorry if any inconvenience caused! Thank you for your time and help~~~
please no, not an unreadable screenshot ! ;(
please paste some text , so folks here can even go and try it ..
when in doubt, try python's builtin help function:
so, since there's an optional
corners
argument before theflags
one, you have to specify flags as key-value pair, like: