Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv_contrib
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_contrib
Commits
8277ca6a
Commit
8277ca6a
authored
Aug 15, 2018
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
opencv-core: avoid using of multi-argument CV_Assert()
replace to CV_Assert_N()
parent
f368d83f
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
11 deletions
+15
-11
meshes.cpp
modules/ovis/src/meshes.cpp
+6
-3
ovis.cpp
modules/ovis/src/ovis.cpp
+3
-3
text_detectorCNN.cpp
modules/text/src/text_detectorCNN.cpp
+4
-3
tracking_utils.cpp
modules/tracking/src/tracking_utils.cpp
+2
-2
No files found.
modules/ovis/src/meshes.cpp
View file @
8277ca6a
...
...
@@ -37,8 +37,11 @@ void createPlaneMesh(const String& name, const Size2f& size, InputArray image)
void
createPointCloudMesh
(
const
String
&
name
,
InputArray
vertices
,
InputArray
colors
)
{
int
color_type
=
colors
.
type
();
CV_Assert
(
_app
,
vertices
.
type
()
==
CV_32FC3
&&
vertices
.
isContinuous
(),
colors
.
empty
()
||
color_type
==
CV_8UC3
||
color_type
==
CV_8UC4
);
CV_Assert
(
_app
);
CV_CheckTypeEQ
(
vertices
.
type
(),
CV_32FC3
,
""
)
CV_Assert
(
vertices
.
isContinuous
());
if
(
!
colors
.
empty
())
CV_CheckType
(
color_type
,
color_type
==
CV_8UC3
||
color_type
==
CV_8UC4
);
// material
MaterialPtr
mat
=
MaterialManager
::
getSingleton
().
create
(
name
,
RESOURCEGROUP_NAME
);
...
...
@@ -101,7 +104,7 @@ void createPointCloudMesh(const String& name, InputArray vertices, InputArray co
void
createGridMesh
(
const
String
&
name
,
const
Size2f
&
size
,
const
Size
&
segments
)
{
CV_Assert
(
_app
,
!
segments
.
empty
());
CV_Assert
_N
(
_app
,
!
segments
.
empty
());
// material
MaterialPtr
mat
=
MaterialManager
::
getSingleton
().
create
(
name
,
RESOURCEGROUP_NAME
);
...
...
modules/ovis/src/ovis.cpp
View file @
8277ca6a
...
...
@@ -67,8 +67,8 @@ void _createTexture(const String& name, Mat image)
static
void
_convertRT
(
InputArray
rot
,
InputArray
tvec
,
Quaternion
&
q
,
Vector3
&
t
,
bool
invert
=
false
)
{
CV_Assert
(
rot
.
empty
()
||
rot
.
rows
()
==
3
||
rot
.
size
()
==
Size
(
3
,
3
),
tvec
.
empty
()
||
tvec
.
rows
()
==
3
);
CV_Assert
_N
(
rot
.
empty
()
||
rot
.
rows
()
==
3
||
rot
.
size
()
==
Size
(
3
,
3
),
tvec
.
empty
()
||
tvec
.
rows
()
==
3
);
q
=
Quaternion
::
IDENTITY
;
t
=
Vector3
::
ZERO
;
...
...
@@ -717,7 +717,7 @@ void setMaterialProperty(const String& name, int prop, const Scalar& val)
void
setMaterialProperty
(
const
String
&
name
,
int
prop
,
const
String
&
value
)
{
CV_Assert
(
prop
>=
MATERIAL_TEXTURE0
,
prop
<=
MATERIAL_TEXTURE3
,
_app
);
CV_Assert
_N
(
prop
>=
MATERIAL_TEXTURE0
,
prop
<=
MATERIAL_TEXTURE3
,
_app
);
MaterialPtr
mat
=
MaterialManager
::
getSingleton
().
getByName
(
name
,
RESOURCEGROUP_NAME
);
CV_Assert
(
mat
);
...
...
modules/text/src/text_detectorCNN.cpp
View file @
8277ca6a
...
...
@@ -35,7 +35,8 @@ protected:
float
x_max
=
buffer
[
k
*
nCol
+
5
]
*
inputShape
.
width
;
float
y_max
=
buffer
[
k
*
nCol
+
6
]
*
inputShape
.
height
;
CV_Assert
(
x_min
<
x_max
,
y_min
<
y_max
);
CV_CheckLT
(
x_min
,
x_max
,
""
);
CV_CheckLT
(
y_min
,
y_max
,
""
);
x_min
=
std
::
max
(
0.
f
,
x_min
);
y_min
=
std
::
max
(
0.
f
,
y_min
);
...
...
@@ -62,7 +63,7 @@ public:
void
detect
(
InputArray
inputImage_
,
std
::
vector
<
Rect
>&
Bbox
,
std
::
vector
<
float
>&
confidence
)
CV_OVERRIDE
{
CV_
Assert
(
inputImage_
.
channels
()
==
inputChannelCount_
);
CV_
CheckEQ
(
inputImage_
.
channels
(),
inputChannelCount_
,
""
);
Mat
inputImage
=
inputImage_
.
getMat
();
Bbox
.
resize
(
0
);
confidence
.
resize
(
0
);
...
...
@@ -75,7 +76,7 @@ public:
int
nbrTextBoxes
=
outputNet
.
size
[
2
];
int
nCol
=
outputNet
.
size
[
3
];
int
outputChannelCount
=
outputNet
.
size
[
1
];
CV_
Assert
(
outputChannelCount
==
1
);
CV_
CheckEQ
(
outputChannelCount
,
1
,
""
);
getOutputs
((
float
*
)(
outputNet
.
data
),
nbrTextBoxes
,
nCol
,
Bbox
,
confidence
,
inputImage
.
size
());
}
}
...
...
modules/tracking/src/tracking_utils.cpp
View file @
8277ca6a
...
...
@@ -8,8 +8,8 @@ using namespace cv;
double
tracking_internal
::
computeNCC
(
const
Mat
&
patch1
,
const
Mat
&
patch2
)
{
CV_
Assert
(
patch1
.
rows
==
patch2
.
rows
,
patch1
.
cols
==
patch2
.
cols
);
CV_
CheckEQ
(
patch1
.
rows
,
patch2
.
rows
,
""
);
CV_CheckEQ
(
patch1
.
cols
,
patch2
.
cols
,
""
);
int
N
=
patch1
.
rows
*
patch1
.
cols
;
...
...
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