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
1a018c26
Commit
1a018c26
authored
Jun 21, 2017
by
Vadim Pisarevsky
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1243 from sovrasov:eliminate_exit
parents
1864cc4c
1537cbb9
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
41 deletions
+11
-41
descriptor.hpp
...descriptor/include/opencv2/line_descriptor/descriptor.hpp
+1
-4
plot.cpp
modules/plot/src/plot.cpp
+4
-20
test_common.cpp
modules/sfm/test/test_common.cpp
+2
-5
ppf_helpers.cpp
modules/surface_matching/src/ppf_helpers.cpp
+4
-12
No files found.
modules/line_descriptor/include/opencv2/line_descriptor/descriptor.hpp
View file @
1a018c26
...
...
@@ -747,10 +747,7 @@ class CV_EXPORTS BinaryDescriptor : public Algorithm
/* check parameters */
if
(
n
<
0
||
k
<
0
||
k
>
n
||
p
<=
0.0
||
p
>=
1.0
)
{
std
::
cout
<<
"nfa: wrong n, k or p values."
<<
std
::
endl
;
exit
(
0
);
}
CV_Error
(
Error
::
StsBadArg
,
"nfa: wrong n, k or p values.
\n
"
);
/* trivial cases */
if
(
n
==
0
||
k
==
0
)
return
-
logNT
;
...
...
modules/plot/src/plot.cpp
View file @
1a018c26
...
...
@@ -62,17 +62,9 @@ namespace cv
Mat
_plotData
=
plotData
.
getMat
();
//if the matrix is not Nx1 or 1xN
if
(
_plotData
.
cols
>
1
&&
_plotData
.
rows
>
1
)
{
std
::
cout
<<
"ERROR: Plot data must be a 1xN or Nx1 matrix."
<<
std
::
endl
;
exit
(
0
);
}
CV_Error
(
Error
::
StsBadArg
,
"ERROR: Plot data must be a 1xN or Nx1 matrix.
\n
"
);
//if the matrix type is not CV_64F
if
(
_plotData
.
type
()
!=
CV_64F
)
{
std
::
cout
<<
"ERROR: Plot data type must be double (CV_64F)."
<<
std
::
endl
;
exit
(
0
);
}
CV_Assert
(
_plotData
.
type
()
==
CV_64F
);
//in case we have a row matrix than needs to be transposed
if
(
_plotData
.
cols
>
_plotData
.
rows
)
...
...
@@ -98,17 +90,9 @@ namespace cv
Mat
_plotDataY
=
plotDataY_
.
getMat
();
//f the matrix is not Nx1 or 1xN
if
((
_plotDataX
.
cols
>
1
&&
_plotDataX
.
rows
>
1
)
||
(
_plotDataY
.
cols
>
1
&&
_plotDataY
.
rows
>
1
))
{
std
::
cout
<<
"ERROR: Plot data must be a 1xN or Nx1 matrix."
<<
std
::
endl
;
exit
(
0
);
}
CV_Error
(
Error
::
StsBadArg
,
"ERROR: Plot data must be a 1xN or Nx1 matrix.
\n
"
);
//if the matrix type is not CV_64F
if
(
_plotDataX
.
type
()
!=
CV_64F
||
_plotDataY
.
type
()
!=
CV_64F
)
{
std
::
cout
<<
"ERROR: Plot data type must be double (CV_64F)."
<<
std
::
endl
;
exit
(
0
);
}
CV_Assert
(
_plotDataX
.
type
()
==
CV_64F
&&
_plotDataY
.
type
()
==
CV_64F
);
//in case we have a row matrix than needs to be transposed
if
(
_plotDataX
.
cols
>
_plotDataX
.
rows
)
...
...
modules/sfm/test/test_common.cpp
View file @
1a018c26
...
...
@@ -86,11 +86,8 @@ parser_2D_tracks(const string &_filename, std::vector<Mat> &points2d )
ifstream
myfile
(
_filename
.
c_str
());
if
(
!
myfile
.
is_open
())
{
cout
<<
"Unable to read file: "
<<
_filename
<<
endl
;
exit
(
0
);
}
else
{
CV_Error
(
cv
::
Error
::
StsError
,
string
(
"Unable to read file: "
)
+
_filename
+
"
\n
"
);
else
{
double
x
,
y
;
string
line_str
;
...
...
modules/surface_matching/src/ppf_helpers.cpp
View file @
1a018c26
...
...
@@ -114,12 +114,8 @@ void writePLY(Mat PC, const char* FileName)
{
std
::
ofstream
outFile
(
FileName
);
if
(
!
outFile
)
{
//cerr << "Error opening output file: " << FileName << "!" << endl;
printf
(
"Error opening output file: %s!
\n
"
,
FileName
);
exit
(
1
);
}
if
(
!
outFile
.
is_open
()
)
CV_Error
(
Error
::
StsError
,
String
(
"Error opening output file: "
)
+
String
(
FileName
)
+
"
\n
"
);
////
// Header
...
...
@@ -167,12 +163,8 @@ void writePLYVisibleNormals(Mat PC, const char* FileName)
{
std
::
ofstream
outFile
(
FileName
);
if
(
!
outFile
)
{
//cerr << "Error opening output file: " << FileName << "!" << endl;
printf
(
"Error opening output file: %s!
\n
"
,
FileName
);
exit
(
1
);
}
if
(
!
outFile
.
is_open
())
CV_Error
(
Error
::
StsError
,
String
(
"Error opening output file: "
)
+
String
(
FileName
)
+
"
\n
"
);
////
// Header
...
...
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