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
a3af5ede
Commit
a3af5ede
authored
Sep 20, 2012
by
marina.kolpakova
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CUDA callers
parent
4aac1444
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
10 deletions
+27
-10
isf-sc.cu
modules/gpu/src/cuda/isf-sc.cu
+13
-2
icf.hpp
modules/gpu/src/icf.hpp
+3
-1
softcascade.cpp
modules/gpu/src/softcascade.cpp
+11
-7
No files found.
modules/gpu/src/cuda/isf-sc.cu
View file @
a3af5ede
...
@@ -40,4 +40,15 @@
...
@@ -40,4 +40,15 @@
//
//
//M*/
//M*/
#include <icf.hpp>
#include <icf.hpp>
\ No newline at end of file
void icf::Cascade::detect(const cv::gpu::PtrStepSzb& hogluv) const
{
// detection kernel
}
void icf::ChannelStorage::frame(const cv::gpu::PtrStepSz<uchar4>& image)
{
// color convertin kernel
// hog calculation kernel
}
\ No newline at end of file
modules/gpu/src/icf.hpp
View file @
a3af5ede
...
@@ -64,6 +64,8 @@ struct Cascade
...
@@ -64,6 +64,8 @@ struct Cascade
const
cv
::
gpu
::
PtrStepSzf
&
lvs
,
const
cv
::
gpu
::
PtrStepSzb
&
fts
,
const
cv
::
gpu
::
PtrStepSzb
&
lls
)
const
cv
::
gpu
::
PtrStepSzf
&
lvs
,
const
cv
::
gpu
::
PtrStepSzb
&
fts
,
const
cv
::
gpu
::
PtrStepSzb
&
lls
)
:
octaves
(
octs
),
stages
(
sts
),
nodes
(
nds
),
leaves
(
lvs
),
features
(
fts
),
levels
(
lls
)
{}
:
octaves
(
octs
),
stages
(
sts
),
nodes
(
nds
),
leaves
(
lvs
),
features
(
fts
),
levels
(
lls
)
{}
void
detect
(
const
cv
::
gpu
::
PtrStepSzb
&
hogluv
)
const
;
PtrStepSzb
octaves
;
PtrStepSzb
octaves
;
PtrStepSzf
stages
;
PtrStepSzf
stages
;
PtrStepSzb
nodes
;
PtrStepSzb
nodes
;
...
@@ -81,7 +83,7 @@ struct ChannelStorage
...
@@ -81,7 +83,7 @@ struct ChannelStorage
const
cv
::
gpu
::
PtrStepSzb
&
itg
,
const
int
s
)
const
cv
::
gpu
::
PtrStepSzb
&
itg
,
const
int
s
)
:
dmem
(
buff
),
shrunk
(
shr
),
hogluv
(
itg
),
shrinkage
(
s
)
{}
:
dmem
(
buff
),
shrunk
(
shr
),
hogluv
(
itg
),
shrinkage
(
s
)
{}
void
frame
(
const
cv
::
gpu
::
PtrStepSz
b
&
image
)
{}
void
frame
(
const
cv
::
gpu
::
PtrStepSz
<
uchar4
>&
image
);
PtrStepSzb
dmem
;
PtrStepSzb
dmem
;
PtrStepSzb
shrunk
;
PtrStepSzb
shrunk
;
...
...
modules/gpu/src/softcascade.cpp
View file @
a3af5ede
...
@@ -74,7 +74,7 @@ struct cv::gpu::SoftCascade::Filds
...
@@ -74,7 +74,7 @@ struct cv::gpu::SoftCascade::Filds
GpuMat
features
;
GpuMat
features
;
GpuMat
levels
;
GpuMat
levels
;
// preallocated buffer 640x480x10
// preallocated buffer 640x480x10
+ 640x480
GpuMat
dmem
;
GpuMat
dmem
;
// 160x120x10
// 160x120x10
GpuMat
shrunk
;
GpuMat
shrunk
;
...
@@ -86,9 +86,6 @@ struct cv::gpu::SoftCascade::Filds
...
@@ -86,9 +86,6 @@ struct cv::gpu::SoftCascade::Filds
icf
::
Cascade
cascade
;
icf
::
Cascade
cascade
;
icf
::
ChannelStorage
storage
;
icf
::
ChannelStorage
storage
;
bool
fill
(
const
FileNode
&
root
,
const
float
mins
,
const
float
maxs
);
void
detect
()
const
{}
enum
{
BOOST
=
0
};
enum
{
BOOST
=
0
};
enum
enum
{
{
...
@@ -102,6 +99,12 @@ struct cv::gpu::SoftCascade::Filds
...
@@ -102,6 +99,12 @@ struct cv::gpu::SoftCascade::Filds
HOG_LUV_BINS
=
10
HOG_LUV_BINS
=
10
};
};
bool
fill
(
const
FileNode
&
root
,
const
float
mins
,
const
float
maxs
);
void
detect
()
const
{
cascade
.
detect
(
hogluv
);
}
private
:
private
:
void
calcLevels
(
const
std
::
vector
<
icf
::
Octave
>&
octs
,
void
calcLevels
(
const
std
::
vector
<
icf
::
Octave
>&
octs
,
int
frameW
,
int
frameH
,
int
nscales
);
int
frameW
,
int
frameH
,
int
nscales
);
...
@@ -278,7 +281,7 @@ inline bool cv::gpu::SoftCascade::Filds::fill(const FileNode &root, const float
...
@@ -278,7 +281,7 @@ inline bool cv::gpu::SoftCascade::Filds::fill(const FileNode &root, const float
cascade
=
icf
::
Cascade
(
octaves
,
stages
,
nodes
,
leaves
,
features
,
levels
);
cascade
=
icf
::
Cascade
(
octaves
,
stages
,
nodes
,
leaves
,
features
,
levels
);
// allocate buffers
// allocate buffers
dmem
.
create
(
FRAME_HEIGHT
*
HOG_LUV_BINS
,
FRAME_WIDTH
,
CV_8UC1
);
dmem
.
create
(
FRAME_HEIGHT
*
(
HOG_LUV_BINS
+
1
)
,
FRAME_WIDTH
,
CV_8UC1
);
shrunk
.
create
(
FRAME_HEIGHT
/
shrinkage
*
HOG_LUV_BINS
,
FRAME_WIDTH
/
shrinkage
,
CV_8UC1
);
shrunk
.
create
(
FRAME_HEIGHT
/
shrinkage
*
HOG_LUV_BINS
,
FRAME_WIDTH
/
shrinkage
,
CV_8UC1
);
hogluv
.
create
(
(
FRAME_HEIGHT
/
shrinkage
*
HOG_LUV_BINS
)
+
1
,
(
FRAME_WIDTH
/
shrinkage
)
+
1
,
CV_16UC1
);
hogluv
.
create
(
(
FRAME_HEIGHT
/
shrinkage
*
HOG_LUV_BINS
)
+
1
,
(
FRAME_WIDTH
/
shrinkage
)
+
1
,
CV_16UC1
);
...
@@ -395,7 +398,7 @@ void cv::gpu::SoftCascade::detectMultiScale(const GpuMat& image, const GpuMat& /
...
@@ -395,7 +398,7 @@ void cv::gpu::SoftCascade::detectMultiScale(const GpuMat& image, const GpuMat& /
GpuMat
&
/*objects*/
,
const
int
/*rejectfactor*/
,
Stream
/*stream*/
)
GpuMat
&
/*objects*/
,
const
int
/*rejectfactor*/
,
Stream
/*stream*/
)
{
{
// only color images are supperted
// only color images are supperted
CV_Assert
(
image
.
type
()
==
CV_8UC
3
);
CV_Assert
(
image
.
type
()
==
CV_8UC
4
);
// only this window size allowed
// only this window size allowed
CV_Assert
(
image
.
cols
==
640
&&
image
.
rows
==
480
);
CV_Assert
(
image
.
cols
==
640
&&
image
.
rows
==
480
);
...
@@ -406,4 +409,4 @@ void cv::gpu::SoftCascade::detectMultiScale(const GpuMat& image, const GpuMat& /
...
@@ -406,4 +409,4 @@ void cv::gpu::SoftCascade::detectMultiScale(const GpuMat& image, const GpuMat& /
flds
.
detect
();
flds
.
detect
();
}
}
#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