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
5a53d82e
Commit
5a53d82e
authored
Nov 06, 2010
by
Vadim Pisarevsky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed most of the failures in opencv_test
parent
7d2e7d48
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
70 additions
and
53 deletions
+70
-53
fundam.cpp
modules/calib3d/src/fundam.cpp
+2
-2
modelest.cpp
modules/calib3d/src/modelest.cpp
+1
-1
matmul.cpp
modules/core/src/matmul.cpp
+22
-22
imgproc_c.h
modules/imgproc/include/opencv2/imgproc/imgproc_c.h
+1
-1
filter.cpp
modules/imgproc/src/filter.cpp
+6
-6
subdivision2d.cpp
modules/imgproc/src/subdivision2d.cpp
+2
-3
motempl.cpp
modules/video/src/motempl.cpp
+2
-2
acameracalibration.cpp
tests/cv/src/acameracalibration.cpp
+5
-2
acamshift.cpp
tests/cv/src/acamshift.cpp
+1
-1
aconvhull.cpp
tests/cv/src/aconvhull.cpp
+2
-0
aestimaterigid.cpp
tests/cv/src/aestimaterigid.cpp
+1
-1
amotiontemplates.cpp
tests/cv/src/amotiontemplates.cpp
+1
-1
aposit.cpp
tests/cv/src/aposit.cpp
+1
-1
apyrsegmentation.cpp
tests/cv/src/apyrsegmentation.cpp
+2
-2
cxts.cpp
tests/cxts/cxts.cpp
+16
-6
cxts.h
tests/cxts/cxts.h
+5
-2
No files found.
modules/calib3d/src/fundam.cpp
View file @
5a53d82e
...
...
@@ -620,14 +620,14 @@ CV_IMPL int cvFindFundamentalMat( const CvMat* points1, const CvMat* points2,
result
=
estimator
.
run7Point
(
m1
,
m2
,
&
_F9x3
);
else
if
(
count
==
8
||
method
==
CV_FM_8POINT
)
result
=
estimator
.
run8Point
(
m1
,
m2
,
&
_F3x3
);
else
if
(
count
>
8
)
else
if
(
count
>
=
8
)
{
if
(
param1
<=
0
)
param1
=
3
;
if
(
param2
<
DBL_EPSILON
||
param2
>
1
-
DBL_EPSILON
)
param2
=
0.99
;
if
(
(
method
&
~
3
)
==
CV_RANSAC
)
if
(
(
method
&
~
3
)
==
CV_RANSAC
&&
count
>=
15
)
result
=
estimator
.
runRANSAC
(
m1
,
m2
,
&
_F3x3
,
tempMask
,
param1
,
param2
);
else
result
=
estimator
.
runLMeDS
(
m1
,
m2
,
&
_F3x3
,
tempMask
,
param2
);
...
...
modules/calib3d/src/modelest.cpp
View file @
5a53d82e
...
...
@@ -261,7 +261,7 @@ bool CvModelEstimator2::runLMeDS( const CvMat* m1, const CvMat* m2, CvMat* model
if
(
minMedian
<
DBL_MAX
)
{
sigma
=
2.5
*
1.4826
*
(
1
+
5.
/
(
count
-
modelPoints
))
*
sqrt
(
minMedian
);
sigma
=
MAX
(
sigma
,
FLT_EPSILON
*
100
);
sigma
=
MAX
(
sigma
,
0.001
);
count
=
findInliers
(
m1
,
m2
,
model
,
err
,
mask
,
sigma
);
result
=
count
>=
modelPoints
;
...
...
modules/core/src/matmul.cpp
View file @
5a53d82e
...
...
@@ -2081,12 +2081,11 @@ void scaleAdd( const Mat& src1, double alpha, const Mat& src2, Mat& dst )
float
*
d
=
(
float
*
)
dst
.
data
;
size_t
step1
=
src1
.
step
/
sizeof
(
s1
[
0
]),
step2
=
src2
.
step
/
sizeof
(
s2
[
0
]);
size_t
step
=
dst
.
step
/
sizeof
(
d
[
0
]);
float
a
=
(
float
)
alpha
;
if
(
size
.
width
==
1
)
{
for
(
;
size
.
height
--
;
s1
+=
step1
,
s2
+=
step2
,
d
+=
step
)
d
[
0
]
=
s1
[
0
]
*
a
+
s2
[
0
]
;
d
[
0
]
=
(
float
)(
s1
[
0
]
*
alpha
+
s2
[
0
])
;
return
;
}
...
...
@@ -2095,18 +2094,18 @@ void scaleAdd( const Mat& src1, double alpha, const Mat& src2, Mat& dst )
int
i
;
for
(
i
=
0
;
i
<=
size
.
width
-
4
;
i
+=
4
)
{
float
t0
=
s1
[
i
]
*
a
+
s2
[
i
]
;
float
t1
=
s1
[
i
+
1
]
*
a
+
s2
[
i
+
1
]
;
float
t0
=
(
float
)(
s1
[
i
]
*
alpha
+
s2
[
i
])
;
float
t1
=
(
float
)(
s1
[
i
+
1
]
*
alpha
+
s2
[
i
+
1
])
;
d
[
i
]
=
t0
;
d
[
i
+
1
]
=
t1
;
t0
=
s1
[
i
+
2
]
*
a
+
s2
[
i
+
2
]
;
t1
=
s1
[
i
+
3
]
*
a
+
s2
[
i
+
3
]
;
t0
=
(
float
)(
s1
[
i
+
2
]
*
alpha
+
s2
[
i
+
2
])
;
t1
=
(
float
)(
s1
[
i
+
3
]
*
alpha
+
s2
[
i
+
3
])
;
d
[
i
+
2
]
=
t0
;
d
[
i
+
3
]
=
t1
;
}
for
(
;
i
<
size
.
width
;
i
++
)
d
[
i
]
=
s1
[
i
]
*
a
+
s2
[
i
]
;
d
[
i
]
=
(
float
)(
s1
[
i
]
*
alpha
+
s2
[
i
])
;
}
}
else
if
(
depth
==
CV_64F
)
...
...
@@ -2225,12 +2224,13 @@ double Mahalanobis( const Mat& v1, const Mat& v2, const Mat& icovar )
int
type
=
v1
.
type
(),
depth
=
v1
.
depth
();
Size
sz
=
v1
.
size
();
int
i
,
j
,
len
=
sz
.
width
*
sz
.
height
*
v1
.
channels
();
AutoBuffer
<
uchar
>
buf
(
len
*
v1
.
elemSize
()
);
AutoBuffer
<
double
>
buf
(
len
);
double
result
=
0
;
CV_Assert
(
type
==
v2
.
type
()
&&
type
==
icovar
.
type
()
&&
sz
==
v2
.
size
()
&&
len
==
icovar
.
rows
&&
len
==
icovar
.
cols
);
sz
.
width
*=
v1
.
channels
();
if
(
v1
.
isContinuous
()
&&
v2
.
isContinuous
()
)
{
sz
.
width
*=
sz
.
height
;
...
...
@@ -2243,7 +2243,7 @@ double Mahalanobis( const Mat& v1, const Mat& v2, const Mat& icovar )
const
float
*
src2
=
(
const
float
*
)
v2
.
data
;
size_t
step1
=
v1
.
step
/
sizeof
(
src1
[
0
]);
size_t
step2
=
v2
.
step
/
sizeof
(
src2
[
0
]);
float
*
diff
=
(
float
*
)(
uchar
*
)
buf
;
double
*
diff
=
buf
;
const
float
*
mat
=
(
const
float
*
)
icovar
.
data
;
size_t
matstep
=
icovar
.
step
/
sizeof
(
mat
[
0
]);
...
...
@@ -2253,7 +2253,7 @@ double Mahalanobis( const Mat& v1, const Mat& v2, const Mat& icovar )
diff
[
i
]
=
src1
[
i
]
-
src2
[
i
];
}
diff
=
(
float
*
)(
uchar
*
)
buf
;
diff
=
buf
;
for
(
i
=
0
;
i
<
len
;
i
++
,
mat
+=
matstep
)
{
double
row_sum
=
0
;
...
...
@@ -2271,7 +2271,7 @@ double Mahalanobis( const Mat& v1, const Mat& v2, const Mat& icovar )
const
double
*
src2
=
(
const
double
*
)
v2
.
data
;
size_t
step1
=
v1
.
step
/
sizeof
(
src1
[
0
]);
size_t
step2
=
v2
.
step
/
sizeof
(
src2
[
0
]);
double
*
diff
=
(
double
*
)(
uchar
*
)
buf
;
double
*
diff
=
buf
;
const
double
*
mat
=
(
const
double
*
)
icovar
.
data
;
size_t
matstep
=
icovar
.
step
/
sizeof
(
mat
[
0
]);
...
...
@@ -2281,7 +2281,7 @@ double Mahalanobis( const Mat& v1, const Mat& v2, const Mat& icovar )
diff
[
i
]
=
src1
[
i
]
-
src2
[
i
];
}
diff
=
(
double
*
)(
uchar
*
)
buf
;
diff
=
buf
;
for
(
i
=
0
;
i
<
len
;
i
++
,
mat
+=
matstep
)
{
double
row_sum
=
0
;
...
...
@@ -2372,7 +2372,7 @@ MulTransposedR( const Mat& srcmat, Mat& dstmat, const Mat& deltamat, double scal
const
sT
*
tsrc
=
src
+
j
;
for
(
k
=
0
;
k
<
size
.
height
;
k
++
,
tsrc
+=
srcstep
)
s0
+=
col_buf
[
k
]
*
tsrc
[
0
];
s0
+=
(
double
)
col_buf
[
k
]
*
tsrc
[
0
];
tdst
[
j
]
=
(
dT
)(
s0
*
scale
);
}
...
...
@@ -2415,7 +2415,7 @@ MulTransposedR( const Mat& srcmat, Mat& dstmat, const Mat& deltamat, double scal
const
dT
*
d
=
delta_buf
?
delta_buf
:
delta
+
j
;
for
(
k
=
0
;
k
<
size
.
height
;
k
++
,
tsrc
+=
srcstep
,
d
+=
deltastep
)
s0
+=
col_buf
[
k
]
*
(
tsrc
[
0
]
-
d
[
0
]);
s0
+=
(
double
)
col_buf
[
k
]
*
(
tsrc
[
0
]
-
d
[
0
]);
tdst
[
j
]
=
(
dT
)(
s0
*
scale
);
}
...
...
@@ -2446,10 +2446,10 @@ MulTransposedL( const Mat& srcmat, Mat& dstmat, const Mat& deltamat, double scal
const
sT
*
tsrc2
=
src
+
j
*
srcstep
;
for
(
k
=
0
;
k
<=
size
.
width
-
4
;
k
+=
4
)
s
+=
tsrc1
[
k
]
*
tsrc2
[
k
]
+
tsrc1
[
k
+
1
]
*
tsrc2
[
k
+
1
]
+
tsrc1
[
k
+
2
]
*
tsrc2
[
k
+
2
]
+
tsrc1
[
k
+
3
]
*
tsrc2
[
k
+
3
];
s
+=
(
double
)
tsrc1
[
k
]
*
tsrc2
[
k
]
+
(
double
)
tsrc1
[
k
+
1
]
*
tsrc2
[
k
+
1
]
+
(
double
)
tsrc1
[
k
+
2
]
*
tsrc2
[
k
+
2
]
+
(
double
)
tsrc1
[
k
+
3
]
*
tsrc2
[
k
+
3
];
for
(
;
k
<
size
.
width
;
k
++
)
s
+=
tsrc1
[
k
]
*
tsrc2
[
k
];
s
+=
(
double
)
tsrc1
[
k
]
*
tsrc2
[
k
];
tdst
[
j
]
=
(
dT
)(
s
*
scale
);
}
else
...
...
@@ -2483,12 +2483,12 @@ MulTransposedL( const Mat& srcmat, Mat& dstmat, const Mat& deltamat, double scal
tdelta2
=
delta_buf
;
}
for
(
k
=
0
;
k
<=
size
.
width
-
4
;
k
+=
4
,
tdelta2
+=
delta_shift
)
s
+=
row_buf
[
k
]
*
(
tsrc2
[
k
]
-
tdelta2
[
0
])
+
row_buf
[
k
+
1
]
*
(
tsrc2
[
k
+
1
]
-
tdelta2
[
1
])
+
row_buf
[
k
+
2
]
*
(
tsrc2
[
k
+
2
]
-
tdelta2
[
2
])
+
row_buf
[
k
+
3
]
*
(
tsrc2
[
k
+
3
]
-
tdelta2
[
3
]);
s
+=
(
double
)
row_buf
[
k
]
*
(
tsrc2
[
k
]
-
tdelta2
[
0
])
+
(
double
)
row_buf
[
k
+
1
]
*
(
tsrc2
[
k
+
1
]
-
tdelta2
[
1
])
+
(
double
)
row_buf
[
k
+
2
]
*
(
tsrc2
[
k
+
2
]
-
tdelta2
[
2
])
+
(
double
)
row_buf
[
k
+
3
]
*
(
tsrc2
[
k
+
3
]
-
tdelta2
[
3
]);
for
(
;
k
<
size
.
width
;
k
++
,
tdelta2
++
)
s
+=
row_buf
[
k
]
*
(
tsrc2
[
k
]
-
tdelta2
[
0
]);
s
+=
(
double
)
row_buf
[
k
]
*
(
tsrc2
[
k
]
-
tdelta2
[
0
]);
tdst
[
j
]
=
(
dT
)(
s
*
scale
);
}
}
...
...
modules/imgproc/include/opencv2/imgproc/imgproc_c.h
View file @
5a53d82e
...
...
@@ -445,7 +445,7 @@ CV_INLINE CvSubdiv2DPoint* cvSubdiv2DEdgeDst( CvSubdiv2DEdge edge )
CV_INLINE
double
cvTriangleArea
(
CvPoint2D32f
a
,
CvPoint2D32f
b
,
CvPoint2D32f
c
)
{
return
(
b
.
x
-
a
.
x
)
*
(
c
.
y
-
a
.
y
)
-
(
b
.
y
-
a
.
y
)
*
(
c
.
x
-
a
.
x
);
return
(
(
double
)
b
.
x
-
a
.
x
)
*
((
double
)
c
.
y
-
a
.
y
)
-
((
double
)
b
.
y
-
a
.
y
)
*
((
double
)
c
.
x
-
a
.
x
);
}
...
...
modules/imgproc/src/filter.cpp
View file @
5a53d82e
...
...
@@ -2879,14 +2879,14 @@ Ptr<BaseFilter> getLinearFilter(int srcType, int dstType,
anchor
=
normalizeAnchor
(
anchor
,
_kernel
.
size
());
if
(
sdepth
==
CV_8U
&&
ddepth
==
CV_8U
&&
kdepth
==
CV_32S
)
/*
if( sdepth == CV_8U && ddepth == CV_8U && kdepth == CV_32S )
return Ptr<BaseFilter>(new Filter2D<uchar, FixedPtCastEx<int, uchar>, FilterVec_8u>
(_kernel, anchor, delta, FixedPtCastEx<int, uchar>(bits),
FilterVec_8u(_kernel, bits, delta)));
if( sdepth == CV_8U && ddepth == CV_16S && kdepth == CV_32S )
return Ptr<BaseFilter>(new Filter2D<uchar, FixedPtCastEx<int, short>, FilterVec_8u16s>
(_kernel, anchor, delta, FixedPtCastEx<int, short>(bits),
FilterVec_8u16s
(
_kernel
,
bits
,
delta
)));
FilterVec_8u16s(_kernel, bits, delta)));
*/
kdepth
=
sdepth
==
CV_64F
||
ddepth
==
CV_64F
?
CV_64F
:
CV_32F
;
Mat
kernel
;
...
...
@@ -2952,21 +2952,21 @@ Ptr<FilterEngine> createLinearFilter( int _srcType, int _dstType, const Mat& _ke
const
Scalar
&
_borderValue
)
{
_srcType
=
CV_MAT_TYPE
(
_srcType
);
_dstType
=
CV_MAT_TYPE
(
_dstType
);
int
sdepth
=
CV_MAT_DEPTH
(
_srcType
),
ddepth
=
CV_MAT_DEPTH
(
_dstType
);
_dstType
=
CV_MAT_TYPE
(
_dstType
);
int
cn
=
CV_MAT_CN
(
_srcType
);
CV_Assert
(
cn
==
CV_MAT_CN
(
_dstType
)
);
Mat
kernel
=
_kernel
;
int
ktype
=
_kernel
.
depth
()
==
CV_32S
?
KERNEL_INTEGER
:
getKernelType
(
_kernel
,
_anchor
);
int
bits
=
0
;
/*int sdepth = CV_MAT_DEPTH(_srcType), ddepth = CV_MAT_DEPTH(_dstType);
int ktype = _kernel.depth() == CV_32S ? KERNEL_INTEGER : getKernelType(_kernel, _anchor);
if( sdepth == CV_8U && (ddepth == CV_8U || ddepth == CV_16S) &&
_kernel.rows*_kernel.cols <= (1 << 10) )
{
bits = (ktype & KERNEL_INTEGER) ? 0 : 11;
_kernel.convertTo(kernel, CV_32S, 1 << bits);
}
}
*/
Ptr
<
BaseFilter
>
_filter2D
=
getLinearFilter
(
_srcType
,
_dstType
,
kernel
,
_anchor
,
_delta
,
bits
);
...
...
modules/imgproc/src/subdivision2d.cpp
View file @
5a53d82e
...
...
@@ -189,10 +189,9 @@ static int
icvIsRightOf
(
CvPoint2D32f
&
pt
,
CvSubdiv2DEdge
edge
)
{
CvSubdiv2DPoint
*
org
=
cvSubdiv2DEdgeOrg
(
edge
),
*
dst
=
cvSubdiv2DEdgeDst
(
edge
);
Cv32suf
cw_area
;
cw_area
.
f
=
(
float
)
cvTriangleArea
(
pt
,
dst
->
pt
,
org
->
pt
);
double
cw_area
=
cvTriangleArea
(
pt
,
dst
->
pt
,
org
->
pt
);
return
(
cw_area
.
i
>
0
)
*
2
-
(
cw_area
.
i
*
2
!=
0
);
return
(
cw_area
>
0
)
-
(
cw_area
<
0
);
}
...
...
modules/video/src/motempl.cpp
View file @
5a53d82e
...
...
@@ -271,7 +271,7 @@ cvCalcGlobalOrientation( const void* orientation, const void* maskimg, const voi
// find the maximum index (the dominant orientation)
cvGetMinMaxHistValue
(
hist
,
0
,
0
,
0
,
&
base_orient
);
base_orient
*=
360
/
hist_size
;
base_orient
=
cvRound
(
base_orient
*
360.
/
hist_size
)
;
// override timestamp with the maximum value in MHI
cvMinMaxLoc
(
mhi
,
0
,
&
curr_mhi_timestamp
,
0
,
0
,
mask
);
...
...
@@ -325,7 +325,7 @@ cvCalcGlobalOrientation( const void* orientation, const void* maskimg, const voi
rel_angle
+=
(
rel_angle
<
-
180
?
360
:
0
);
rel_angle
+=
(
rel_angle
>
180
?
-
360
:
0
);
if
(
abs
(
rel_angle
)
<
90
)
if
(
abs
(
rel_angle
)
<
45
)
{
shift_orient
+=
weight
*
rel_angle
;
shift_weight
+=
weight
;
...
...
tests/cv/src/acameracalibration.cpp
View file @
5a53d82e
...
...
@@ -1014,6 +1014,8 @@ void CV_ProjectPointsTest::run(int)
const
float
imgPointErr
=
1e-3
f
,
dEps
=
1e-3
f
;
double
err
;
Size
imgSize
(
600
,
800
);
Mat_
<
float
>
objPoints
(
pointCount
,
3
),
rvec
(
1
,
3
),
rmat
,
tvec
(
1
,
3
),
cameraMatrix
(
3
,
3
),
distCoeffs
(
1
,
4
),
...
...
@@ -1100,9 +1102,10 @@ void CV_ProjectPointsTest::run(int)
rightImgPoints
[
i
],
valDpdrot
,
valDpdt
,
valDpdf
,
valDpdc
,
valDpddist
,
0
);
}
calcdfdx
(
leftImgPoints
,
rightImgPoints
,
dEps
,
valDpdrot
);
if
(
norm
(
dpdrot
,
valDpdrot
,
NORM_INF
)
>
2.5
)
err
=
norm
(
dpdrot
,
valDpdrot
,
NORM_INF
);
if
(
err
>
3
)
{
ts
->
printf
(
CvTS
::
LOG
,
"bad dpdrot
\n
"
);
ts
->
printf
(
CvTS
::
LOG
,
"bad dpdrot
: too big difference = %g
\n
"
,
err
);
code
=
CvTS
::
FAIL_BAD_ACCURACY
;
}
...
...
tests/cv/src/acamshift.cpp
View file @
5a53d82e
...
...
@@ -352,7 +352,7 @@ int CV_CamShiftTest::validate_test_results( int /*test_case_idx*/ )
goto
_exit_
;
}
if
(
fabs
(
comp
.
area
-
area0
)
>
area0
*
0.1
)
if
(
fabs
(
comp
.
area
-
area0
)
>
area0
*
0.1
5
)
{
ts
->
printf
(
CvTS
::
LOG
,
"Incorrect CvConnectedComp area (=%.1f, should be %d)
\n
"
,
comp
.
area
,
area0
);
...
...
tests/cv/src/aconvhull.cpp
View file @
5a53d82e
...
...
@@ -371,6 +371,8 @@ int CV_BaseShapeDescrTest::prepare_test_case( int test_case_idx )
double
t
;
CV_SWAP
(
low
.
val
[
i
],
high
.
val
[
i
],
t
);
}
if
(
high
.
val
[
i
]
<
low
.
val
[
i
]
+
1
)
high
.
val
[
i
]
+=
1
;
}
generate_point_set
(
points
);
...
...
tests/cv/src/aestimaterigid.cpp
View file @
5a53d82e
...
...
@@ -110,7 +110,7 @@ bool CV_RigidTransform_Test::testNPoints(int from)
Mat
aff_est
=
estimateRigidTransform
(
fpts
,
tpts
,
true
);
double
thres
=
0.
03
*
norm
(
aff
);
double
thres
=
0.
1
*
norm
(
aff
);
double
d
=
norm
(
aff_est
,
aff
,
NORM_L2
);
if
(
d
>
thres
)
{
...
...
tests/cv/src/amotiontemplates.cpp
View file @
5a53d82e
...
...
@@ -493,7 +493,7 @@ cvTsCalcGlobalOrientation( const CvMat* orient, const CvMat* mask, const CvMat*
if
(
diff
<
-
180
)
diff
+=
360
;
if
(
diff
>
180
)
diff
-=
360
;
if
(
delta_weight
>
0
&&
fabs
(
diff
)
<
90
)
if
(
delta_weight
>
0
&&
fabs
(
diff
)
<
45
)
{
delta_orientation
+=
diff
*
delta_weight
;
weight
+=
delta_weight
;
...
...
tests/cv/src/aposit.cpp
View file @
5a53d82e
...
...
@@ -92,7 +92,7 @@ void CV_POSITTest::run( int start_from )
CvMat
*
true_translation
=
cvCreateMat
(
3
,
1
,
CV_32F
);
const
float
flFocalLength
=
760.
f
;
const
float
flEpsilon
=
0.
1
f
;
const
float
flEpsilon
=
0.
5
f
;
/* Initilization */
criteria
.
type
=
CV_TERMCRIT_EPS
|
CV_TERMCRIT_ITER
;
...
...
tests/cv/src/apyrsegmentation.cpp
View file @
5a53d82e
...
...
@@ -60,7 +60,7 @@ CV_PyrSegmentationTest::CV_PyrSegmentationTest():
void
CV_PyrSegmentationTest
::
run
(
int
/*start_from*/
)
{
const
int
level
=
5
;
const
double
range
=
20
;
const
double
range
=
15
;
int
code
=
CvTS
::
OK
;
...
...
@@ -104,7 +104,7 @@ void CV_PyrSegmentationTest::run( int /*start_from*/ )
if
(
channels
==
1
)
{
int
color1
=
30
,
color2
=
110
,
color3
=
1
8
0
;
int
color1
=
30
,
color2
=
110
,
color3
=
1
9
0
;
cvSet
(
image
,
cvScalarAll
(
color1
));
cvFillPoly
(
image
,
&
cp
,
&
nPoints
,
1
,
cvScalar
(
color2
));
...
...
tests/cxts/cxts.cpp
View file @
5a53d82e
...
...
@@ -1100,7 +1100,8 @@ void CvTS::clear()
params
.
rng_seed
=
0
;
params
.
debug_mode
=
-
1
;
params
.
print_only_failed
=
0
;
params
.
skip_header
=
0
;
params
.
skip_header
=
-
1
;
params
.
ignore_blacklist
=
-
1
;
params
.
test_mode
=
CORRECTNESS_CHECK_MODE
;
params
.
timing_mode
=
MIN_TIME
;
params
.
use_optimized
=
-
1
;
...
...
@@ -1347,6 +1348,10 @@ int CvTS::run( int argc, char** argv, const char** blacklist )
set_data_path
(
argv
[
++
i
]);
else
if
(
strcmp
(
argv
[
i
],
"-nc"
)
==
0
)
params
.
color_terminal
=
0
;
else
if
(
strcmp
(
argv
[
i
],
"-nh"
)
==
0
)
params
.
skip_header
=
1
;
else
if
(
strcmp
(
argv
[
i
],
"-nb"
)
==
0
)
params
.
ignore_blacklist
=
1
;
else
if
(
strcmp
(
argv
[
i
],
"-r"
)
==
0
)
params
.
debug_mode
=
0
;
else
if
(
strcmp
(
argv
[
i
],
"-tn"
)
==
0
)
...
...
@@ -1370,7 +1375,7 @@ int CvTS::run( int argc, char** argv, const char** blacklist )
if
(
datapath_dir
)
{
sprintf
(
buf
,
"%s/%s"
,
datapath_dir
,
module_name
?
module_name
:
""
);
printf
(
LOG
+
SUMMARY
,
"Data Path = %s
\n
"
,
buf
);
//
printf( LOG + SUMMARY, "Data Path = %s\n", buf);
set_data_path
(
buf
);
}
}
...
...
@@ -1406,7 +1411,8 @@ int CvTS::run( int argc, char** argv, const char** blacklist )
}
if
(
!
config_name
)
printf
(
LOG
,
"WARNING: config name is not specified, using default parameters
\n
"
);
;
//printf( LOG, "WARNING: config name is not specified, using default parameters\n" );
else
{
// 2. read common parameters of test system
...
...
@@ -1589,7 +1595,8 @@ void CvTS::print_help()
"-l - list all the registered tests or subset of the tests,
\n
"
" selected in the config file, and exit
\n
"
"-tn - only run a specific test
\n
"
"-nc - do not use colors in the console output
\n
"
"-nc - do not use colors in the console output
\n
"
"-nh - do not print the header
\n
"
"-O{0|1} - disable/enable on-fly detection of IPP and other
\n
"
" supported optimized libs. It's enabled by default
\n
"
"-r - continue running tests after OS/Hardware exception occured
\n
"
...
...
@@ -1615,7 +1622,10 @@ int CvTS::read_params( CvFileStorage* fs )
CvFileNode
*
node
=
fs
?
cvGetFileNodeByName
(
fs
,
0
,
"common"
)
:
0
;
if
(
params
.
debug_mode
<
0
)
params
.
debug_mode
=
cvReadIntByName
(
fs
,
node
,
"debug_mode"
,
1
)
!=
0
;
params
.
skip_header
=
cvReadIntByName
(
fs
,
node
,
"skip_header"
,
0
)
!=
0
;
if
(
params
.
skip_header
<
0
)
params
.
skip_header
=
cvReadIntByName
(
fs
,
node
,
"skip_header"
,
0
)
>
0
;
if
(
params
.
ignore_blacklist
<
0
)
params
.
ignore_blacklist
=
cvReadIntByName
(
fs
,
node
,
"ignore_blacklist"
,
0
)
>
0
;
params
.
print_only_failed
=
cvReadIntByName
(
fs
,
node
,
"print_only_failed"
,
0
)
!=
0
;
params
.
rerun_failed
=
cvReadIntByName
(
fs
,
node
,
"rerun_failed"
,
0
)
!=
0
;
params
.
rerun_immediately
=
cvReadIntByName
(
fs
,
node
,
"rerun_immediately"
,
0
)
!=
0
;
...
...
@@ -1869,7 +1879,7 @@ int CvTS::filter( CvTest* test, int& filter_state, const char** blacklist )
int
inverse
=
0
;
int
greater_or_equal
=
0
;
if
(
blacklist
)
if
(
blacklist
&&
!
params
.
ignore_blacklist
)
{
for
(
;
*
blacklist
!=
0
;
blacklist
++
)
{
...
...
tests/cxts/cxts.h
View file @
5a53d82e
...
...
@@ -482,8 +482,11 @@ protected:
// otherwise the system tries to catch the exceptions and continue with other tests
int
debug_mode
;
// if non-zero, the header is not print
bool
skip_header
;
// if > 0, the header is not print
int
skip_header
;
// if > 0, the blacklist is ignored
int
ignore_blacklist
;
// if non-zero, the system includes only failed tests into summary
bool
print_only_failed
;
...
...
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