Merge pull request #3966 from Dikay900:master_diff_to_2_4_2

This commit is contained in:
Vadim Pisarevsky
2015-04-28 11:00:57 +00:00
13 changed files with 76 additions and 71 deletions

View File

@@ -138,7 +138,12 @@ protected:
{
InT d = disp(y, x);
double from[4] = { x, y, d, 1 };
double from[4] = {
static_cast<double>(x),
static_cast<double>(y),
static_cast<double>(d),
1.0,
};
Mat_<double> res = Q * Mat_<double>(4, 1, from);
res /= res(3, 0);

View File

@@ -104,7 +104,10 @@ void CV_UndistortPointsBadArgTest::run(int)
img_size.height = 600;
double cam[9] = {150.f, 0.f, img_size.width/2.f, 0, 300.f, img_size.height/2.f, 0.f, 0.f, 1.f};
double dist[4] = {0.01,0.02,0.001,0.0005};
double s_points[N_POINTS2] = {img_size.width/4,img_size.height/4};
double s_points[N_POINTS2] = {
static_cast<double>(img_size.width) / 4.0,
static_cast<double>(img_size.height) / 4.0,
};
double d_points[N_POINTS2];
double p[9] = {155.f, 0.f, img_size.width/2.f+img_size.width/50.f, 0, 310.f, img_size.height/2.f+img_size.height/50.f, 0.f, 0.f, 1.f};
double r[9] = {1,0,0,0,1,0,0,0,1};