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
13134595
Commit
13134595
authored
Nov 15, 2010
by
Alexey Spizhevoy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added HOGDescriptor on GPU
parent
7bd4ba99
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
57 additions
and
1 deletion
+57
-1
CMakeLists.txt
modules/gpu/CMakeLists.txt
+1
-1
gpu.hpp
modules/gpu/include/opencv2/gpu/gpu.hpp
+56
-0
hog.cu
modules/gpu/src/cuda/hog.cu
+0
-0
hog.cpp
modules/gpu/src/hog.cpp
+0
-0
No files found.
modules/gpu/CMakeLists.txt
View file @
13134595
set
(
name
"gpu"
)
set
(
DEPS
"opencv_core"
"opencv_imgproc"
)
set
(
DEPS
"opencv_core"
"opencv_imgproc"
"opencv_objdetect"
)
set
(
OPENCV_LINKER_LIBS
${
OPENCV_LINKER_LIBS
}
opencv_gpu
)
...
...
modules/gpu/include/opencv2/gpu/gpu.hpp
View file @
13134595
...
...
@@ -46,6 +46,7 @@
#include <vector>
#include "opencv2/core/core.hpp"
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/objdetect/objdetect.hpp"
#include "opencv2/gpu/devmem2d.hpp"
namespace
cv
...
...
@@ -973,8 +974,63 @@ namespace cv
GpuMat
table_color
;
GpuMat
table_space
;
};
struct
CV_EXPORTS
HOGDescriptor
{
public
:
enum
{
DEFAULT_WIN_SIGMA
=
-
1
};
enum
{
DEFAULT_NLEVELS
=
64
};
HOGDescriptor
(
Size
win_size
=
Size
(
64
,
128
),
Size
block_size
=
Size
(
16
,
16
),
Size
block_stride
=
Size
(
8
,
8
),
Size
cell_size
=
Size
(
8
,
8
),
bool
gamma_correction
=
true
,
int
nbins
=
9
,
double
win_sigma
=
DEFAULT_WIN_SIGMA
,
double
threshold_L2hys
=
0.2
,
int
nlevels
=
DEFAULT_NLEVELS
);
size_t
getDescriptorSize
()
const
;
size_t
getBlockHistogramSize
()
const
;
double
getWinSigma
()
const
;
static
vector
<
float
>
getDefaultPeopleDetector
();
void
setSVMDetector
(
const
vector
<
float
>&
detector
);
bool
checkDetectorSize
()
const
;
void
computeGradient
(
const
GpuMat
&
img
,
GpuMat
&
grad
,
GpuMat
&
qangle
);
void
detect
(
const
GpuMat
&
img
,
vector
<
Point
>&
found_locations
,
double
hit_threshold
=
0
,
Size
win_stride
=
Size
(),
Size
padding
=
Size
());
void
detectMultiScale
(
const
GpuMat
&
img
,
vector
<
Rect
>&
found_locations
,
double
hit_threshold
=
0
,
Size
win_stride
=
Size
(),
Size
padding
=
Size
(),
double
scale0
=
1.05
,
int
group_threshold
=
2
);
GpuMat
getLastBlockHists
()
const
;
Size
win_size
;
Size
block_size
;
Size
block_stride
;
Size
cell_size
;
bool
gamma_correction
;
int
nbins
;
double
win_sigma
;
double
threshold_L2hys
;
int
nlevels
;
// Coefficients of the separating plane
float
free_coef
;
GpuMat
detector
;
// Results of the last classification step
GpuMat
labels
;
Mat
labels_host
;
// Results of the last histogram evaluation step
GpuMat
block_hists
;
private
:
static
int
numPartsWithin
(
int
size
,
int
part_size
,
int
stride
);
static
Size
numPartsWithin
(
Size
size
,
Size
part_size
,
Size
stride
);
};
}
//! Speckle filtering - filters small connected components on diparity image.
//! It sets pixel (x,y) to newVal if it coresponds to small CC with size < maxSpeckleSize.
//! Threshold for border between CC is diffThreshold;
...
...
modules/gpu/src/cuda/hog.cu
0 → 100644
View file @
13134595
This diff is collapsed.
Click to expand it.
modules/gpu/src/hog.cpp
0 → 100644
View file @
13134595
This diff is collapsed.
Click to expand it.
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