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
f162a935
Commit
f162a935
authored
Feb 09, 2016
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #536 from berak:datasets_or_pascal
parents
9d12e14f
e4acf5a6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
8 deletions
+11
-8
or_pascal.cpp
modules/datasets/src/or_pascal.cpp
+11
-8
No files found.
modules/datasets/src/or_pascal.cpp
View file @
f162a935
...
...
@@ -61,8 +61,8 @@ public:
private
:
void
loadDataset
(
const
string
&
path
,
const
string
&
nameImageSet
,
vector
<
Ptr
<
Object
>
>
&
imageSet
);
Ptr
<
Object
>
parseAnnotation
(
const
string
path
,
const
string
id
);
const
char
*
parseNodeText
(
XMLElement
*
node
,
const
string
nodeName
,
const
string
defaultValue
);
Ptr
<
Object
>
parseAnnotation
(
const
string
&
path
,
const
string
&
id
);
const
char
*
parseNodeText
(
XMLElement
*
node
,
const
string
&
nodeName
,
const
string
&
defaultValue
);
};
...
...
@@ -105,17 +105,20 @@ void OR_pascalImp::loadDataset(const string &path, const string &nameImageSet, v
}
}
const
char
*
OR_pascalImp
::
parseNodeText
(
XMLElement
*
node
,
const
string
nodeName
,
const
string
defaultValue
)
const
char
*
OR_pascalImp
::
parseNodeText
(
XMLElement
*
node
,
const
string
&
nodeName
,
const
string
&
defaultValue
)
{
const
char
*
e
=
node
->
FirstChildElement
(
nodeName
.
c_str
())
->
GetText
();
XMLElement
*
child
=
node
->
FirstChildElement
(
nodeName
.
c_str
());
if
(
child
==
0
)
return
defaultValue
.
c_str
();
if
(
e
!=
0
)
return
e
;
else
const
char
*
e
=
child
->
GetText
();
if
(
e
==
0
)
return
defaultValue
.
c_str
();
return
e
;
}
Ptr
<
Object
>
OR_pascalImp
::
parseAnnotation
(
const
string
path
,
const
string
id
)
Ptr
<
Object
>
OR_pascalImp
::
parseAnnotation
(
const
string
&
path
,
const
string
&
id
)
{
string
pathAnnotations
(
path
+
"Annotations/"
);
string
pathImages
(
path
+
"JPEGImages/"
);
...
...
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