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
64d6e6a4
Commit
64d6e6a4
authored
Oct 02, 2012
by
marina.kolpakova
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add getROISize
parent
672cf1f4
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
7 deletions
+21
-7
gpu.hpp
modules/gpu/include/opencv2/gpu/gpu.hpp
+4
-2
softcascade.cpp
modules/gpu/src/softcascade.cpp
+17
-5
No files found.
modules/gpu/include/opencv2/gpu/gpu.hpp
View file @
64d6e6a4
...
@@ -1572,7 +1572,7 @@ public:
...
@@ -1572,7 +1572,7 @@ public:
//! Param objects 4-channel matrix thet contain detected rectangles
//! Param objects 4-channel matrix thet contain detected rectangles
//! Param rejectfactor used for final object box computing
//! Param rejectfactor used for final object box computing
virtual
void
detectMultiScale
(
const
GpuMat
&
image
,
const
GpuMat
&
rois
,
GpuMat
&
objects
,
virtual
void
detectMultiScale
(
const
GpuMat
&
image
,
const
GpuMat
&
rois
,
GpuMat
&
objects
,
int
rejectfactor
=
1
,
int
specificScale
=
-
1
);
int
rejectfactor
=
1
,
int
specificScale
=
-
1
)
const
;
//! detect specific objects on in the input frame for all scales computed flom minScale and maxscale values.
//! detect specific objects on in the input frame for all scales computed flom minScale and maxscale values.
//! asynchronous version.
//! asynchronous version.
...
@@ -1583,7 +1583,9 @@ public:
...
@@ -1583,7 +1583,9 @@ public:
//! Param ndet retrieves number of detections
//! Param ndet retrieves number of detections
//! Param stream wrapper for CUDA stream
//! Param stream wrapper for CUDA stream
virtual
void
detectMultiScale
(
const
GpuMat
&
image
,
const
GpuMat
&
rois
,
GpuMat
&
objects
,
virtual
void
detectMultiScale
(
const
GpuMat
&
image
,
const
GpuMat
&
rois
,
GpuMat
&
objects
,
int
rejectfactor
,
GpuMat
&
ndet
,
Stream
stream
);
int
rejectfactor
,
GpuMat
&
ndet
,
Stream
stream
)
const
;
cv
::
Size
getRoiSize
()
const
;
private
:
private
:
struct
Filds
;
struct
Filds
;
...
...
modules/gpu/src/softcascade.cpp
View file @
64d6e6a4
...
@@ -49,12 +49,18 @@ cv::gpu::SoftCascade::SoftCascade() : filds(0) { throw_nogpu(); }
...
@@ -49,12 +49,18 @@ cv::gpu::SoftCascade::SoftCascade() : filds(0) { throw_nogpu(); }
cv
::
gpu
::
SoftCascade
::
SoftCascade
(
const
string
&
,
const
float
,
const
float
)
:
filds
(
0
)
{
throw_nogpu
();
}
cv
::
gpu
::
SoftCascade
::
SoftCascade
(
const
string
&
,
const
float
,
const
float
)
:
filds
(
0
)
{
throw_nogpu
();
}
cv
::
gpu
::
SoftCascade
::~
SoftCascade
()
{
throw_nogpu
();
}
cv
::
gpu
::
SoftCascade
::~
SoftCascade
()
{
throw_nogpu
();
}
bool
cv
::
gpu
::
SoftCascade
::
load
(
const
string
&
,
const
float
,
const
float
)
{
throw_nogpu
();
return
false
;
}
bool
cv
::
gpu
::
SoftCascade
::
load
(
const
string
&
,
const
float
,
const
float
)
{
throw_nogpu
();
return
false
;
}
void
cv
::
gpu
::
SoftCascade
::
detectMultiScale
(
const
GpuMat
&
,
const
GpuMat
&
,
GpuMat
&
,
const
int
,
int
)
{
throw_nogpu
();}
void
cv
::
gpu
::
SoftCascade
::
detectMultiScale
(
const
GpuMat
&
,
const
GpuMat
&
,
GpuMat
&
,
const
int
,
int
)
const
void
cv
::
gpu
::
SoftCascade
::
detectMultiScale
(
const
GpuMat
&
,
const
GpuMat
&
,
GpuMat
&
,
int
,
GpuMat
&
,
Stream
)
{
{
throw_nogpu
();
throw_nogpu
();
}
}
void
cv
::
gpu
::
SoftCascade
::
detectMultiScale
(
const
GpuMat
&
,
const
GpuMat
&
,
GpuMat
&
,
int
,
GpuMat
&
,
Stream
)
const
{
throw_nogpu
();
}
cv
::
Size
cv
::
gpu
::
SoftCascade
::
getRoiSize
()
const
{
throw_nogpu
();
return
cv
::
Size
();}
#else
#else
#include <icf.hpp>
#include <icf.hpp>
...
@@ -455,8 +461,8 @@ namespace {
...
@@ -455,8 +461,8 @@ namespace {
//================================== synchronous version ============================================================//
//================================== synchronous version ============================================================//
void
cv
::
gpu
::
SoftCascade
::
detectMultiScale
(
const
GpuMat
&
colored
,
const
GpuMat
&
/*rois*/
,
void
cv
::
gpu
::
SoftCascade
::
detectMultiScale
(
const
GpuMat
&
colored
,
const
GpuMat
&
rois
,
GpuMat
&
objects
,
const
int
/*rejectfactor*/
,
int
specificScale
)
GpuMat
&
objects
,
const
int
/*rejectfactor*/
,
int
specificScale
)
const
{
{
// only color images are supperted
// only color images are supperted
CV_Assert
(
colored
.
type
()
==
CV_8UC3
);
CV_Assert
(
colored
.
type
()
==
CV_8UC3
);
...
@@ -555,10 +561,15 @@ void cv::gpu::SoftCascade::detectMultiScale(const GpuMat& colored, const GpuMat&
...
@@ -555,10 +561,15 @@ void cv::gpu::SoftCascade::detectMultiScale(const GpuMat& colored, const GpuMat&
objects
=
GpuMat
(
objects
,
cv
::
Rect
(
0
,
0
,
ndetections
*
sizeof
(
Detection
),
1
));
objects
=
GpuMat
(
objects
,
cv
::
Rect
(
0
,
0
,
ndetections
*
sizeof
(
Detection
),
1
));
}
}
void
cv
::
gpu
::
SoftCascade
::
detectMultiScale
(
const
GpuMat
&
,
const
GpuMat
&
,
GpuMat
&
,
int
,
GpuMat
&
,
Stream
)
void
cv
::
gpu
::
SoftCascade
::
detectMultiScale
(
const
GpuMat
&
,
const
GpuMat
&
,
GpuMat
&
,
int
,
GpuMat
&
,
Stream
)
const
{
{
// cudaStream_t stream = StreamAccessor::getStream(s);
// cudaStream_t stream = StreamAccessor::getStream(s);
}
}
cv
::
Size
cv
::
gpu
::
SoftCascade
::
getRoiSize
()
const
{
return
cv
::
Size
(
Filds
::
FRAME_WIDTH
/
4
,
Filds
::
FRAME_HEIGHT
/
4
);
}
#endif
#endif
\ No newline at end of file
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