parent
fe30da6e2c
commit
abd9675a99
@ -3360,7 +3360,11 @@ void cv::projectPoints( InputArray _opoints,
|
||||
CvMat c_cameraMatrix = cameraMatrix;
|
||||
CvMat c_rvec = rvec, c_tvec = tvec;
|
||||
|
||||
double dc0buf[5]={0};
|
||||
Mat dc0(5,1,CV_64F,dc0buf);
|
||||
Mat distCoeffs = _distCoeffs.getMat();
|
||||
if( distCoeffs.empty() )
|
||||
distCoeffs = dc0;
|
||||
CvMat c_distCoeffs = distCoeffs;
|
||||
int ndistCoeffs = distCoeffs.rows + distCoeffs.cols - 1;
|
||||
|
||||
@ -3375,8 +3379,7 @@ void cv::projectPoints( InputArray _opoints,
|
||||
pdpddist = &(dpddist = jacobian.colRange(10, 10+ndistCoeffs));
|
||||
}
|
||||
|
||||
cvProjectPoints2( &c_objectPoints, &c_rvec, &c_tvec, &c_cameraMatrix,
|
||||
(distCoeffs.empty())? 0: &c_distCoeffs,
|
||||
cvProjectPoints2( &c_objectPoints, &c_rvec, &c_tvec, &c_cameraMatrix, &c_distCoeffs,
|
||||
&c_imagePoints, pdpdrot, pdpdt, pdpdf, pdpdc, pdpddist, aspectRatio );
|
||||
}
|
||||
|
||||
|
@ -460,20 +460,23 @@ int cv::estimateAffine3D(InputArray _from, InputArray _to,
|
||||
double param1, double param2)
|
||||
{
|
||||
Mat from = _from.getMat(), to = _to.getMat();
|
||||
int count = from.checkVector(3, CV_32F);
|
||||
int count = from.checkVector(3);
|
||||
|
||||
CV_Assert( count >= 0 && to.checkVector(3, CV_32F) == count );
|
||||
CV_Assert( count >= 0 && to.checkVector(3) == count );
|
||||
|
||||
_out.create(3, 4, CV_64F);
|
||||
Mat out = _out.getMat();
|
||||
|
||||
_inliers.create(count, 1, CV_8U, -1, true);
|
||||
_inliers.create(count, 1, CV_8U);
|
||||
Mat inliers = _inliers.getMat();
|
||||
inliers = Scalar::all(1);
|
||||
transpose(inliers, inliers);
|
||||
|
||||
Mat dFrom, dTo;
|
||||
from.convertTo(dFrom, CV_64F);
|
||||
to.convertTo(dTo, CV_64F);
|
||||
dFrom = dFrom.reshape(3, 1);
|
||||
dTo = dTo.reshape(3, 1);
|
||||
|
||||
CvMat F3x4 = out;
|
||||
CvMat mask = inliers;
|
||||
|
@ -16,6 +16,8 @@ import functools
|
||||
|
||||
import cv2.cv as cv
|
||||
|
||||
from test2 import *
|
||||
|
||||
class OpenCVTests(unittest.TestCase):
|
||||
|
||||
depths = [ cv.IPL_DEPTH_8U, cv.IPL_DEPTH_8S, cv.IPL_DEPTH_16U, cv.IPL_DEPTH_16S, cv.IPL_DEPTH_32S, cv.IPL_DEPTH_32F, cv.IPL_DEPTH_64F ]
|
||||
@ -2200,10 +2202,6 @@ class DocumentFragmentTests(OpenCVTests):
|
||||
self.assertEqual(self.hashimg(h1), self.hashimg(h3))
|
||||
self.assertNotEqual(self.hashimg(h1), self.hashimg(h2))
|
||||
|
||||
class NewTests(OpenCVTests):
|
||||
|
||||
pass
|
||||
|
||||
if __name__ == '__main__':
|
||||
print "testing", cv.__version__
|
||||
random.seed(0)
|
||||
|
Loading…
x
Reference in New Issue
Block a user