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
11626fe3
Commit
11626fe3
authored
Jul 14, 2017
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #8975 from sovrasov:fs_additional_errors
parents
63e89bc3
6dd9e18b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
7 deletions
+10
-7
cvstd.inl.hpp
modules/core/include/opencv2/core/cvstd.inl.hpp
+1
-3
persistence.hpp
modules/core/include/opencv2/core/persistence.hpp
+1
-0
persistence.cpp
modules/core/src/persistence.cpp
+8
-4
No files found.
modules/core/include/opencv2/core/cvstd.inl.hpp
View file @
11626fe3
...
...
@@ -153,9 +153,7 @@ FileNode::operator std::string() const
template
<>
inline
void
operator
>>
(
const
FileNode
&
n
,
std
::
string
&
value
)
{
String
val
;
read
(
n
,
val
,
val
);
value
=
val
;
read
(
n
,
value
,
std
::
string
());
}
template
<>
inline
...
...
modules/core/include/opencv2/core/persistence.hpp
View file @
11626fe3
...
...
@@ -712,6 +712,7 @@ CV_EXPORTS void read(const FileNode& node, int& value, int default_value);
CV_EXPORTS
void
read
(
const
FileNode
&
node
,
float
&
value
,
float
default_value
);
CV_EXPORTS
void
read
(
const
FileNode
&
node
,
double
&
value
,
double
default_value
);
CV_EXPORTS
void
read
(
const
FileNode
&
node
,
String
&
value
,
const
String
&
default_value
);
CV_EXPORTS
void
read
(
const
FileNode
&
node
,
std
::
string
&
value
,
const
std
::
string
&
default_value
);
CV_EXPORTS
void
read
(
const
FileNode
&
node
,
Mat
&
mat
,
const
Mat
&
default_mat
=
Mat
()
);
CV_EXPORTS
void
read
(
const
FileNode
&
node
,
SparseMat
&
mat
,
const
SparseMat
&
default_mat
=
SparseMat
()
);
CV_EXPORTS
void
read
(
const
FileNode
&
node
,
std
::
vector
<
KeyPoint
>&
keypoints
);
...
...
modules/core/src/persistence.cpp
View file @
11626fe3
...
...
@@ -7374,22 +7374,21 @@ size_t FileNode::size() const
void
read
(
const
FileNode
&
node
,
int
&
value
,
int
default_value
)
{
value
=
!
node
.
node
?
default_value
:
CV_NODE_IS_INT
(
node
.
node
->
tag
)
?
node
.
node
->
data
.
i
:
CV_NODE_IS_REAL
(
node
.
node
->
tag
)
?
cvRound
(
node
.
node
->
data
.
f
)
:
0x7fffffff
;
CV_NODE_IS_INT
(
node
.
node
->
tag
)
?
node
.
node
->
data
.
i
:
std
::
numeric_limits
<
int
>::
max
();
}
void
read
(
const
FileNode
&
node
,
float
&
value
,
float
default_value
)
{
value
=
!
node
.
node
?
default_value
:
CV_NODE_IS_INT
(
node
.
node
->
tag
)
?
(
float
)
node
.
node
->
data
.
i
:
CV_NODE_IS_REAL
(
node
.
node
->
tag
)
?
(
float
)
node
.
node
->
data
.
f
:
1e30
f
;
CV_NODE_IS_REAL
(
node
.
node
->
tag
)
?
saturate_cast
<
float
>
(
node
.
node
->
data
.
f
)
:
std
::
numeric_limits
<
float
>::
max
()
;
}
void
read
(
const
FileNode
&
node
,
double
&
value
,
double
default_value
)
{
value
=
!
node
.
node
?
default_value
:
CV_NODE_IS_INT
(
node
.
node
->
tag
)
?
(
double
)
node
.
node
->
data
.
i
:
CV_NODE_IS_REAL
(
node
.
node
->
tag
)
?
node
.
node
->
data
.
f
:
1e300
;
CV_NODE_IS_REAL
(
node
.
node
->
tag
)
?
node
.
node
->
data
.
f
:
std
::
numeric_limits
<
double
>::
max
()
;
}
void
read
(
const
FileNode
&
node
,
String
&
value
,
const
String
&
default_value
)
...
...
@@ -7397,6 +7396,11 @@ void read(const FileNode& node, String& value, const String& default_value)
value
=
!
node
.
node
?
default_value
:
CV_NODE_IS_STRING
(
node
.
node
->
tag
)
?
String
(
node
.
node
->
data
.
str
.
ptr
)
:
String
();
}
void
read
(
const
FileNode
&
node
,
std
::
string
&
value
,
const
std
::
string
&
default_value
)
{
value
=
!
node
.
node
?
default_value
:
CV_NODE_IS_STRING
(
node
.
node
->
tag
)
?
std
::
string
(
node
.
node
->
data
.
str
.
ptr
)
:
default_value
;
}
}
...
...
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