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
afa62c41
Commit
afa62c41
authored
Jan 29, 2014
by
Roman Donchenko
Committed by
OpenCV Buildbot
Jan 29, 2014
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2212 from SpecLad:hog-sample-const-mat
parents
9b9eadc9
6a511755
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
train_HOG.cpp
samples/cpp/train_HOG.cpp
+2
-2
No files found.
samples/cpp/train_HOG.cpp
View file @
afa62c41
...
...
@@ -14,7 +14,7 @@ void get_svm_detector(const SVM& svm, vector< float > & hog_detector );
void
convert_to_ml
(
const
std
::
vector
<
cv
::
Mat
>
&
train_samples
,
cv
::
Mat
&
trainData
);
void
load_images
(
const
string
&
prefix
,
const
string
&
filename
,
vector
<
Mat
>
&
img_lst
);
void
sample_neg
(
const
vector
<
Mat
>
&
full_neg_lst
,
vector
<
Mat
>
&
neg_lst
,
const
Size
&
size
);
Mat
get_hogdescriptor_visu
(
Mat
&
color_origImg
,
vector
<
float
>&
descriptorValues
,
const
Size
&
size
);
Mat
get_hogdescriptor_visu
(
const
Mat
&
color_origImg
,
vector
<
float
>&
descriptorValues
,
const
Size
&
size
);
void
compute_hog
(
const
vector
<
Mat
>
&
img_lst
,
vector
<
Mat
>
&
gradient_lst
,
const
Size
&
size
);
void
train_svm
(
const
vector
<
Mat
>
&
gradient_lst
,
const
vector
<
int
>
&
labels
);
void
draw_locations
(
Mat
&
img
,
const
vector
<
Rect
>
&
locations
,
const
Scalar
&
color
);
...
...
@@ -155,7 +155,7 @@ void sample_neg( const vector< Mat > & full_neg_lst, vector< Mat > & neg_lst, co
}
// From http://www.juergenwiki.de/work/wiki/doku.php?id=public:hog_descriptor_computation_and_visualization
Mat
get_hogdescriptor_visu
(
Mat
&
color_origImg
,
vector
<
float
>&
descriptorValues
,
const
Size
&
size
)
Mat
get_hogdescriptor_visu
(
const
Mat
&
color_origImg
,
vector
<
float
>&
descriptorValues
,
const
Size
&
size
)
{
const
int
DIMX
=
size
.
width
;
const
int
DIMY
=
size
.
height
;
...
...
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