Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
f1aae52d
Commit
f1aae52d
authored
Oct 18, 2016
by
Tomoaki Teshima
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
clean up unused #if
parent
be086540
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
0 additions
and
84 deletions
+0
-84
compat_ptsetreg.cpp
modules/calib3d/src/compat_ptsetreg.cpp
+0
-4
fisheye.cpp
modules/calib3d/src/fisheye.cpp
+0
-24
triangulate.cpp
modules/calib3d/src/triangulate.cpp
+0
-46
test_chesscorners.cpp
modules/calib3d/test/test_chesscorners.cpp
+0
-10
No files found.
modules/calib3d/src/compat_ptsetreg.cpp
View file @
f1aae52d
...
...
@@ -313,11 +313,7 @@ void CvLevMarq::step()
if
(
!
err
)
completeSymm
(
_JtJN
,
completeSymmFlag
);
#if 1
_JtJN
.
diag
()
*=
1.
+
lambda
;
#else
_JtJN
.
diag
()
+=
lambda
;
#endif
solve
(
_JtJN
,
_JtErr
,
nonzero_param
,
solveMethod
);
int
j
=
0
;
...
...
modules/calib3d/src/fisheye.cpp
View file @
f1aae52d
...
...
@@ -542,19 +542,6 @@ void cv::fisheye::estimateNewCameraMatrixForUndistortRectify(InputArray K, Input
pptr
[
6
]
=
Vec2d
(
0
,
h
);
pptr
[
7
]
=
Vec2d
(
0
,
h
/
2
);
#if 0
const int N = 10;
cv::Mat points(1, N * 4, CV_64FC2);
Vec2d* pptr = points.ptr<Vec2d>();
for(int i = 0, k = 0; i < 10; ++i)
{
pptr[k++] = Vec2d(w/2, 0) - Vec2d(w/8, 0) + Vec2d(w/4/N*i, 0);
pptr[k++] = Vec2d(w/2, h-1) - Vec2d(w/8, h-1) + Vec2d(w/4/N*i, h-1);
pptr[k++] = Vec2d(0, h/2) - Vec2d(0, h/8) + Vec2d(0, h/4/N*i);
pptr[k++] = Vec2d(w-1, h/2) - Vec2d(w-1, h/8) + Vec2d(w-1, h/4/N*i);
}
#endif
fisheye
::
undistortPoints
(
points
,
points
,
K
,
D
,
R
);
cv
::
Scalar
center_mass
=
mean
(
points
);
cv
::
Vec2d
cn
(
center_mass
.
val
);
...
...
@@ -580,17 +567,6 @@ void cv::fisheye::estimateNewCameraMatrixForUndistortRectify(InputArray K, Input
maxx
=
std
::
max
(
maxx
,
std
::
abs
(
pptr
[
i
][
0
]
-
cn
[
0
]));
}
#if 0
double minx = -DBL_MAX, miny = -DBL_MAX, maxx = DBL_MAX, maxy = DBL_MAX;
for(size_t i = 0; i < points.total(); ++i)
{
if (i % 4 == 0) miny = std::max(miny, pptr[i][1]);
if (i % 4 == 1) maxy = std::min(maxy, pptr[i][1]);
if (i % 4 == 2) minx = std::max(minx, pptr[i][0]);
if (i % 4 == 3) maxx = std::min(maxx, pptr[i][0]);
}
#endif
double
f1
=
w
*
0.5
/
(
minx
);
double
f2
=
w
*
0.5
/
(
maxx
);
double
f3
=
h
*
0.5
*
aspect_ratio
/
(
miny
);
...
...
modules/calib3d/src/triangulate.cpp
View file @
f1aae52d
...
...
@@ -114,52 +114,6 @@ cvTriangulatePoints(CvMat* projMatr1, CvMat* projMatr2, CvMat* projPoints1, CvMa
cvmSet
(
points4D
,
2
,
i
,
matrV
(
3
,
2
));
/* Z */
cvmSet
(
points4D
,
3
,
i
,
matrV
(
3
,
3
));
/* W */
}
#if 0
double err = 0;
/* Points was reconstructed. Try to reproject points */
/* We can compute reprojection error if need */
{
int i;
CvMat point3D;
double point3D_dat[4];
point3D = cvMat(4,1,CV_64F,point3D_dat);
CvMat point2D;
double point2D_dat[3];
point2D = cvMat(3,1,CV_64F,point2D_dat);
for( i = 0; i < numPoints; i++ )
{
double W = cvmGet(points4D,3,i);
point3D_dat[0] = cvmGet(points4D,0,i)/W;
point3D_dat[1] = cvmGet(points4D,1,i)/W;
point3D_dat[2] = cvmGet(points4D,2,i)/W;
point3D_dat[3] = 1;
/* !!! Project this point for each camera */
for( int currCamera = 0; currCamera < 2; currCamera++ )
{
cvMatMul(projMatrs[currCamera], &point3D, &point2D);
float x,y;
float xr,yr,wr;
x = (float)cvmGet(projPoints[currCamera],0,i);
y = (float)cvmGet(projPoints[currCamera],1,i);
wr = (float)point2D_dat[2];
xr = (float)(point2D_dat[0]/wr);
yr = (float)(point2D_dat[1]/wr);
float deltaX,deltaY;
deltaX = (float)fabs(x-xr);
deltaY = (float)fabs(y-yr);
err += deltaX*deltaX + deltaY*deltaY;
}
}
}
#endif
}
...
...
modules/calib3d/test/test_chesscorners.cpp
View file @
f1aae52d
...
...
@@ -268,14 +268,6 @@ void CV_ChessboardDetectorTest::run_batch( const string& filename )
#ifndef WRITE_POINTS
double
err
=
calcError
(
v
,
expected
);
#if 0
if( err > rough_success_error_level )
{
ts.printf( cvtest::TS::LOG, "bad accuracy of corner guesses\n" );
ts.set_failed_test_info( cvtest::TS::FAIL_BAD_ACCURACY );
continue;
}
#endif
max_rough_error
=
MAX
(
max_rough_error
,
err
);
#endif
if
(
pattern
==
CHESSBOARD
)
...
...
@@ -287,14 +279,12 @@ void CV_ChessboardDetectorTest::run_batch( const string& filename )
err
=
calcError
(
v
,
expected
);
sum_error
+=
err
;
count
++
;
#if 1
if
(
err
>
precise_success_error_level
)
{
ts
->
printf
(
cvtest
::
TS
::
LOG
,
"Image %s: bad accuracy of adjusted corners %f
\n
"
,
img_file
.
c_str
(),
err
);
ts
->
set_failed_test_info
(
cvtest
::
TS
::
FAIL_BAD_ACCURACY
);
return
;
}
#endif
ts
->
printf
(
cvtest
::
TS
::
LOG
,
"Error on %s is %f
\n
"
,
img_file
.
c_str
(),
err
);
max_precise_error
=
MAX
(
max_precise_error
,
err
);
#endif
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment