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
1cf405d8
Commit
1cf405d8
authored
Oct 11, 2010
by
Evgeniy Kozinov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Russian comments was removed. Error code was added as returned value inLatentSVM parser.
parent
fbfccffb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
21 deletions
+28
-21
_lsvmparser.h
modules/objdetect/src/_lsvmparser.h
+10
-10
lsvmparser.cpp
modules/objdetect/src/lsvmparser.cpp
+18
-11
No files found.
modules/objdetect/src/_lsvmparser.h
View file @
1cf405d8
...
...
@@ -47,20 +47,19 @@
#define EBTAG (STEP_END + BTAG)
//extern "C" {
void
LSVMparser
(
const
char
*
filename
,
filterObject
***
model
,
int
*
last
,
int
*
max
,
int
**
comp
,
float
**
b
,
int
*
count
,
float
*
score
);
int
LSVMparser
(
const
char
*
filename
,
filterObject
***
model
,
int
*
last
,
int
*
max
,
int
**
comp
,
float
**
b
,
int
*
count
,
float
*
score
);
#ifdef __cplusplus
extern
"C"
#endif
int
loadModel
(
//
const
char
*
modelPath
,
// -
//
filterObject
***
filters
,
// -
int
*
kFilters
,
//-
int
*
kComponents
,
//-
int
**
kPartFilters
,
//- ,
float
**
b
,
//-
float
*
scoreThreshold
);
//- score)
const
char
*
modelPath
,
filterObject
***
filters
,
int
*
kFilters
,
int
*
kComponents
,
int
**
kPartFilters
,
float
**
b
,
float
*
scoreThreshold
);
//};
#endif
\ No newline at end of file
modules/objdetect/src/lsvmparser.cpp
View file @
1cf405d8
...
...
@@ -718,7 +718,7 @@ void parserModel(FILE * xmlf, filterObject *** model, int *last, int *max, int *
}
}
void
LSVMparser
(
const
char
*
filename
,
filterObject
***
model
,
int
*
last
,
int
*
max
,
int
**
comp
,
float
**
b
,
int
*
count
,
float
*
score
){
int
LSVMparser
(
const
char
*
filename
,
filterObject
***
model
,
int
*
last
,
int
*
max
,
int
**
comp
,
float
**
b
,
int
*
count
,
float
*
score
){
int
st
=
0
;
int
tag
;
char
ch
;
...
...
@@ -732,7 +732,11 @@ void LSVMparser(const char * filename, filterObject *** model, int *last, int *m
(
*
model
)
=
(
filterObject
**
)
malloc
((
sizeof
(
filterObject
*
))
*
(
*
max
));
//printf("parse : %s\n", filename);
xmlf
=
fopen
(
filename
,
"rb"
);
if
(
xmlf
==
NULL
){
return
-
1
;
}
i
=
0
;
j
=
0
;
...
...
@@ -762,28 +766,31 @@ void LSVMparser(const char * filename, filterObject *** model, int *last, int *m
}
}
}
return
0
;
}
int
loadModel
(
//
const
char
*
modelPath
,
// -
const
char
*
modelPath
,
//
filterObject
***
filters
,
// -
int
*
kFilters
,
//-
int
*
kComponents
,
//-
int
**
kPartFilters
,
//- ,
float
**
b
,
//-
float
*
scoreThreshold
){
//- score)
filterObject
***
filters
,
int
*
kFilters
,
int
*
kComponents
,
int
**
kPartFilters
,
float
**
b
,
float
*
scoreThreshold
){
int
last
;
int
max
;
int
*
comp
;
int
count
;
int
i
;
int
err
;
float
score
;
//printf("start_parse\n\n");
LSVMparser
(
modelPath
,
filters
,
&
last
,
&
max
,
&
comp
,
b
,
&
count
,
&
score
);
err
=
LSVMparser
(
modelPath
,
filters
,
&
last
,
&
max
,
&
comp
,
b
,
&
count
,
&
score
);
if
(
err
!=
0
){
return
-
1
;
}
(
*
kFilters
)
=
last
+
1
;
(
*
kComponents
)
=
count
;
(
*
scoreThreshold
)
=
(
float
)
score
;
...
...
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