\cvdefC{void cvFindHomography( \par const CvMat* srcPoints,\par const CvMat* dstPoints,\par CvMat* H \par
int method=0, \par double ransacReprojThreshold=0, \par CvMat* status=NULL);}
-\cvdefPy{FindHomography(srcPoints,dstPoints,H,method,ransacReprojThreshold=0.0)-> H}
+\cvdefPy{FindHomography(srcPoints,dstPoints,H,method,ransacReprojThreshold=0.0, status=None)-> H}
\cvdefCpp{Mat findHomography( const Mat\& srcPoints, const Mat\& dstPoints,\par
Mat\& status, int method=0,\par
double ransacReprojThreshold=0 );\newline
\par CvMat* newCameraMatrix,
\par CvSize newImageSize=cvSize(0,0),
\par CvRect* validPixROI=0 );}
-\cvdefPy{GetOptimalNewCameraMatrix(cameraMatrix, distCoeffs, imageSize, alpha, newImageSize=(0,0), validPixROI=0) -> None}
+\cvdefPy{GetOptimalNewCameraMatrix(cameraMatrix, distCoeffs, imageSize, alpha, newCameraMatrix, newImageSize=(0,0), validPixROI=0) -> None}
\cvdefCpp{Mat getOptimalNewCameraMatrix(
\par const Mat\& cameraMatrix, const Mat\& distCoeffs,
\par Size imageSize, double alpha, Size newImageSize=Size(),
\cvarg{distCoeffs}{The input 4x1, 1x4, 5x1 or 1x5 vector of distortion coefficients $(k_1, k_2, p_1, p_2[, k_3])$}.
\cvarg{imageSize}{The original image size}
\cvarg{alpha}{The free scaling parameter between 0 (when all the pixels in the undistorted image will be valid) and 1 (when all the source image pixels will be retained in the undistorted image); see \cvCross{StereoRectify}{stereoRectify}}
-\cvC{\cvarg{newCameraMatrix}{The output new camera matrix.}}
+\cvarg{newCameraMatrix}{The output new camera matrix.}
\cvarg{newImageSize}{The image size after rectification. By default it will be set to \texttt{imageSize}.}
\cvarg{validPixROI}{The optional output rectangle that will outline all-good-pixels region in the undistorted image. See \texttt{roi1, roi2} description in \cvCross{StereoRectify}{stereoRectify}}
\end{description}
\par const CvMat* npoints, CvSize imageSize,
\par CvMat* cameraMatrix,
\par double aspectRatio=1.);}
-\cvdefPy{InitCameraMatrix2D( objectPoints, imagePoints, npoints, imageSize, cameraMatrix, aspectRatio=1.) -> None}
+\cvdefPy{InitIntrinsicParams2D(objectPoints, imagePoints, npoints, imageSize, cameraMatrix, aspectRatio=1.) -> None}
\cvdefCpp{Mat initCameraMatrix2D( const vector<vector<Point3f> >\& objectPoints,\par
const vector<vector<Point2f> >\& imagePoints,\par
Size imageSize, double aspectRatio=1.);}
\par CvMat* Q=0, int flags=CV\_CALIB\_ZERO\_DISPARITY,
\par double alpha=-1, CvSize newImageSize=cvSize(0,0),
\par CvRect* roi1=0, CvRect* roi2=0);}
-\cvdefPy{StereoRectify( cameraMatrix1, cameraMatrix2, distCoeffs1, distCoeffs2, imageSize, R, T, R1, R2, P1, P2, Q=NULL, flags=CV\_CALIB\_ZERO\_DISPARITY, alpha=-1, newImageSize=(0,0))-> None}
+\cvdefPy{StereoRectify( cameraMatrix1, cameraMatrix2, distCoeffs1, distCoeffs2, imageSize, R, T, R1, R2, P1, P2, Q=NULL, flags=CV\_CALIB\_ZERO\_DISPARITY, alpha=-1, newImageSize=(0,0))-> (roi1, roi2)}
\cvdefCpp{void stereoRectify( const Mat\& cameraMatrix1, const Mat\& distCoeffs1,\par
const Mat\& cameraMatrix2, const Mat\& distCoeffs2,\par
\cvdefC{
int cvCamShift( \par const CvArr* prob\_image,\par CvRect window,\par CvTermCriteria criteria,\par CvConnectedComp* comp,\par CvBox2D* box=NULL );
-}\cvdefPy{CamShift(prob\_image,window,criteria,box=NULL)-> comp}
+}
+\cvdefPy{CamShift(prob\_image,window,criteria)-> (int, comp, box)}
\begin{description}
\cvarg{prob\_image}{Back projection of object histogram (see \cvCPyCross{CalcBackProject})}
\cvarg{window}{Initial search window}
\cvarg{criteria}{Criteria applied to determine when the window search should be finished}
\cvarg{comp}{Resultant structure that contains the converged search window coordinates (\texttt{comp->rect} field) and the sum of all of the pixels inside the window (\texttt{comp->area} field)}
+\ifC % {
\cvarg{box}{Circumscribed box for the object. If not \texttt{NULL}, it contains object size and orientation}
+\else % }{
+\cvarg{box}{Circumscribed box for the object.}
+\fi % }
\end{description}
The function implements the CAMSHIFT object tracking algrorithm
\cvCPyFunc{GetRows}
Returns array row span.
-\cvdefPy{GetRows(arr,startRow,endRow)-> submat}
+\cvdefPy{GetRows(arr,startRow,endRow,deltaRow=1)-> submat}
\begin{description}
\cvarg{arr}{Input array}
\cvarg{startRow}{Zero-based index of the starting row (inclusive) of the span}
\cvarg{endRow}{Zero-based index of the ending row (exclusive) of the span}
+\cvarg{deltaRow}{Index step in the row span.}
\cvarg{submat}{resulting multi-row array}
\end{description}
Performs singular value decomposition of a real floating-point matrix.
\cvdefC{void cvSVD(\par CvArr* A, \par CvArr* W, \par CvArr* U=NULL, \par CvArr* V=NULL, \par int flags=0);}
-\cvdefPy{SVD(A,flags=0)-> (W,U,V)}
+\cvdefPy{SVD(A,W, U = None, V = None, flags=0)-> None}
\begin{description}
\cvarg{A}{Source $\texttt{M} \times \texttt{N}$ matrix}
if str(l[0]) != self.function_props['name']:
self.report_error(c, 'Decl "%s" does not match function name "%s"' % (str(l[0]), self.function_props['name']))
self.function_props['signature'] = l
+ if l[0] in python_api:
+ (ins, outs) = python_api[l[0]]
+ ins = [a for a in ins if not 'O' in a.flags]
+ if outs != None:
+ outs = outs.split(',')
+ if len(ins) != len(l[1]):
+ self.report_error(c, "function %s documented arity %d, code arity %d" % (l[0], len(l[1]), len(ins)))
+ if outs == None:
+ if l[2] != 'None':
+ self.report_error(c, "function %s documented None, but code has %s" % (l[0], l[2]))
+ else:
+ if isinstance(l[2], str):
+ doc_outs = [l[2]]
+ else:
+ doc_outs = l[2]
+ print doc_outs, len(doc_outs)
+ if len(outs) != len(doc_outs):
+ self.report_error(c, "function %s output documented tuple %d, code %d" % (l[0], len(outs), len(doc_outs)))
except pp.ParseException, pe:
self.report_error(c, str(pe))
print s