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
88125136
Commit
88125136
authored
Sep 19, 2018
by
Hamdi Sahloul
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove cuda.HOG unnamed enum
parent
bcf8f15a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
16 deletions
+11
-16
cudaobjdetect.hpp
modules/cudaobjdetect/include/opencv2/cudaobjdetect.hpp
+3
-8
hog.cpp
modules/cudaobjdetect/src/hog.cpp
+6
-6
test_objdetect.cpp
modules/cudaobjdetect/test/test_objdetect.cpp
+2
-2
No files found.
modules/cudaobjdetect/include/opencv2/cudaobjdetect.hpp
View file @
88125136
...
@@ -48,6 +48,7 @@
...
@@ -48,6 +48,7 @@
#endif
#endif
#include "opencv2/core/cuda.hpp"
#include "opencv2/core/cuda.hpp"
#include "opencv2/objdetect.hpp"
/**
/**
@addtogroup cuda
@addtogroup cuda
...
@@ -78,12 +79,6 @@ namespace cv { namespace cuda {
...
@@ -78,12 +79,6 @@ namespace cv { namespace cuda {
class
CV_EXPORTS_W
HOG
:
public
Algorithm
class
CV_EXPORTS_W
HOG
:
public
Algorithm
{
{
public
:
public
:
enum
{
DESCR_FORMAT_ROW_BY_ROW
,
DESCR_FORMAT_COL_BY_COL
};
/** @brief Creates the HOG descriptor and detector.
/** @brief Creates the HOG descriptor and detector.
@param win_size Detection window size. Align to block size and block stride.
@param win_size Detection window size. Align to block size and block stride.
...
@@ -138,8 +133,8 @@ public:
...
@@ -138,8 +133,8 @@ public:
//! Descriptor storage format:
//! Descriptor storage format:
//! - **DESCR_FORMAT_ROW_BY_ROW** - Row-major order.
//! - **DESCR_FORMAT_ROW_BY_ROW** - Row-major order.
//! - **DESCR_FORMAT_COL_BY_COL** - Column-major order.
//! - **DESCR_FORMAT_COL_BY_COL** - Column-major order.
CV_WRAP
virtual
void
setDescriptorFormat
(
in
t
descr_format
)
=
0
;
CV_WRAP
virtual
void
setDescriptorFormat
(
HOGDescriptor
::
DescriptorStorageForma
t
descr_format
)
=
0
;
CV_WRAP
virtual
in
t
getDescriptorFormat
()
const
=
0
;
CV_WRAP
virtual
HOGDescriptor
::
DescriptorStorageForma
t
getDescriptorFormat
()
const
=
0
;
/** @brief Returns the number of coefficients required for the classification.
/** @brief Returns the number of coefficients required for the classification.
*/
*/
...
...
modules/cudaobjdetect/src/hog.cpp
View file @
88125136
...
@@ -170,8 +170,8 @@ namespace
...
@@ -170,8 +170,8 @@ namespace
virtual
void
setGroupThreshold
(
int
group_threshold
)
{
group_threshold_
=
group_threshold
;
}
virtual
void
setGroupThreshold
(
int
group_threshold
)
{
group_threshold_
=
group_threshold
;
}
virtual
int
getGroupThreshold
()
const
{
return
group_threshold_
;
}
virtual
int
getGroupThreshold
()
const
{
return
group_threshold_
;
}
virtual
void
setDescriptorFormat
(
in
t
descr_format
)
{
descr_format_
=
descr_format
;
}
virtual
void
setDescriptorFormat
(
HOGDescriptor
::
DescriptorStorageForma
t
descr_format
)
{
descr_format_
=
descr_format
;
}
virtual
in
t
getDescriptorFormat
()
const
{
return
descr_format_
;
}
virtual
HOGDescriptor
::
DescriptorStorageForma
t
getDescriptorFormat
()
const
{
return
descr_format_
;
}
virtual
size_t
getDescriptorSize
()
const
;
virtual
size_t
getDescriptorSize
()
const
;
...
@@ -208,7 +208,7 @@ namespace
...
@@ -208,7 +208,7 @@ namespace
Size
win_stride_
;
Size
win_stride_
;
double
scale0_
;
double
scale0_
;
int
group_threshold_
;
int
group_threshold_
;
in
t
descr_format_
;
HOGDescriptor
::
DescriptorStorageForma
t
descr_format_
;
Size
cells_per_block_
;
Size
cells_per_block_
;
private
:
private
:
...
@@ -240,7 +240,7 @@ namespace
...
@@ -240,7 +240,7 @@ namespace
win_stride_
(
block_stride
),
win_stride_
(
block_stride
),
scale0_
(
1.05
),
scale0_
(
1.05
),
group_threshold_
(
2
),
group_threshold_
(
2
),
descr_format_
(
DESCR_FORMAT_COL_BY_COL
),
descr_format_
(
HOGDescriptor
::
DESCR_FORMAT_COL_BY_COL
),
cells_per_block_
(
block_size
.
width
/
cell_size
.
width
,
block_size
.
height
/
cell_size
.
height
)
cells_per_block_
(
block_size
.
width
/
cell_size
.
width
,
block_size
.
height
/
cell_size
.
height
)
{
{
CV_Assert
((
win_size
.
width
-
block_size
.
width
)
%
block_stride
.
width
==
0
&&
CV_Assert
((
win_size
.
width
-
block_size
.
width
)
%
block_stride
.
width
==
0
&&
...
@@ -502,7 +502,7 @@ namespace
...
@@ -502,7 +502,7 @@ namespace
switch
(
descr_format_
)
switch
(
descr_format_
)
{
{
case
DESCR_FORMAT_ROW_BY_ROW
:
case
HOGDescriptor
:
:
DESCR_FORMAT_ROW_BY_ROW
:
hog
::
extract_descrs_by_rows
(
win_size_
.
height
,
win_size_
.
width
,
hog
::
extract_descrs_by_rows
(
win_size_
.
height
,
win_size_
.
width
,
block_stride_
.
height
,
block_stride_
.
width
,
block_stride_
.
height
,
block_stride_
.
width
,
win_stride_
.
height
,
win_stride_
.
width
,
win_stride_
.
height
,
win_stride_
.
width
,
...
@@ -512,7 +512,7 @@ namespace
...
@@ -512,7 +512,7 @@ namespace
descriptors
,
descriptors
,
StreamAccessor
::
getStream
(
stream
));
StreamAccessor
::
getStream
(
stream
));
break
;
break
;
case
DESCR_FORMAT_COL_BY_COL
:
case
HOGDescriptor
:
:
DESCR_FORMAT_COL_BY_COL
:
hog
::
extract_descrs_by_cols
(
win_size_
.
height
,
win_size_
.
width
,
hog
::
extract_descrs_by_cols
(
win_size_
.
height
,
win_size_
.
width
,
block_stride_
.
height
,
block_stride_
.
width
,
block_stride_
.
height
,
block_stride_
.
width
,
win_stride_
.
height
,
win_stride_
.
width
,
win_stride_
.
height
,
win_stride_
.
width
,
...
...
modules/cudaobjdetect/test/test_objdetect.cpp
View file @
88125136
...
@@ -187,10 +187,10 @@ CUDA_TEST_P(HOG, GetDescriptors)
...
@@ -187,10 +187,10 @@ CUDA_TEST_P(HOG, GetDescriptors)
hog
->
setWinStride
(
Size
(
64
,
128
));
hog
->
setWinStride
(
Size
(
64
,
128
));
hog
->
setDescriptorFormat
(
cv
::
cuda
::
HOG
::
DESCR_FORMAT_ROW_BY_ROW
);
hog
->
setDescriptorFormat
(
HOGDescriptor
::
DESCR_FORMAT_ROW_BY_ROW
);
hog
->
compute
(
d_img
,
descriptors
);
hog
->
compute
(
d_img
,
descriptors
);
hog
->
setDescriptorFormat
(
cv
::
cuda
::
HOG
::
DESCR_FORMAT_COL_BY_COL
);
hog
->
setDescriptorFormat
(
HOGDescriptor
::
DESCR_FORMAT_COL_BY_COL
);
hog
->
compute
(
d_img
,
descriptors_by_cols
);
hog
->
compute
(
d_img
,
descriptors_by_cols
);
// Check size of the result train table
// Check size of the result train table
...
...
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