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
2eebd8d9
Commit
2eebd8d9
authored
Nov 29, 2012
by
Vladislav Vinogradov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed build under windows
parent
2e0161c6
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
9 deletions
+9
-9
icf.hpp
modules/gpu/src/icf.hpp
+3
-3
softcascade.cpp
modules/gpu/src/softcascade.cpp
+6
-6
No files found.
modules/gpu/src/icf.hpp
View file @
2eebd8d9
...
...
@@ -88,11 +88,11 @@ struct __align__(8) Node
{
uchar4
rect
;
// ushort channel;
uint
threshold
;
u
nsigned
int
threshold
;
enum
{
THRESHOLD_MASK
=
0x0FFFFFFF
};
Node
(
const
uchar4
r
,
const
u
int
ch
,
const
u
int
t
)
:
rect
(
r
),
threshold
(
t
+
(
ch
<<
28
))
{}
Node
(
const
uchar4
r
,
const
u
nsigned
int
ch
,
const
unsigned
int
t
)
:
rect
(
r
),
threshold
(
t
+
(
ch
<<
28
))
{}
};
struct
__align__
(
16
)
Detection
...
...
@@ -144,7 +144,7 @@ struct CascadeInvoker
const
int
downscales
,
const
cudaStream_t
&
stream
=
0
)
const
;
template
<
bool
isUp
>
__device
void
detect
(
Detection
*
objects
,
const
u
int
ndetections
,
u
int
*
ctr
,
const
int
downscales
)
const
;
__device
void
detect
(
Detection
*
objects
,
const
u
nsigned
int
ndetections
,
unsigned
int
*
ctr
,
const
int
downscales
)
const
;
};
}
...
...
modules/gpu/src/softcascade.cpp
View file @
2eebd8d9
...
...
@@ -64,8 +64,8 @@ void cv::gpu::SCascade::read(const FileNode& fn) { Algorithm::read(fn); }
cv
::
gpu
::
device
::
icf
::
Level
::
Level
(
int
idx
,
const
Octave
&
oct
,
const
float
scale
,
const
int
w
,
const
int
h
)
:
octave
(
idx
),
step
(
oct
.
stages
),
relScale
(
scale
/
oct
.
scale
)
{
workRect
.
x
=
r
ound
(
w
/
(
float
)
oct
.
shrinkage
);
workRect
.
y
=
r
ound
(
h
/
(
float
)
oct
.
shrinkage
);
workRect
.
x
=
cvR
ound
(
w
/
(
float
)
oct
.
shrinkage
);
workRect
.
y
=
cvR
ound
(
h
/
(
float
)
oct
.
shrinkage
);
objSize
.
x
=
cv
::
saturate_cast
<
uchar
>
(
oct
.
size
.
x
*
relScale
);
objSize
.
y
=
cv
::
saturate_cast
<
uchar
>
(
oct
.
size
.
y
*
relScale
);
...
...
@@ -75,7 +75,7 @@ cv::gpu::device::icf::Level::Level(int idx, const Octave& oct, const float scale
scaling
[
0
]
=
scaling
[
1
]
=
1.
f
;
else
{
scaling
[
0
]
=
(
relScale
<
1.
f
)
?
0.89
f
*
::
pow
(
relScale
,
1.099
f
/
::
log
(
2
))
:
1.
f
;
scaling
[
0
]
=
(
relScale
<
1.
f
)
?
0.89
f
*
::
pow
(
relScale
,
1.099
f
/
::
log
(
2
.0
f
))
:
1.
f
;
scaling
[
1
]
=
relScale
*
relScale
;
}
}
...
...
@@ -199,7 +199,7 @@ struct cv::gpu::SCascade::Fields
// int feature = (int)(*(inIt +=2)) + feature_offset;
inIt
+=
3
;
// extract feature, Todo:check it
u
int
th
=
saturate_cast
<
u
int
>
((
float
)(
*
(
inIt
++
)));
u
nsigned
int
th
=
saturate_cast
<
unsigned
int
>
((
float
)(
*
(
inIt
++
)));
cv
::
FileNode
ftn
=
(
*
ftrs
)[
SC_F_RECT
];
cv
::
FileNodeIterator
r_it
=
ftn
.
begin
();
uchar4
rect
;
...
...
@@ -214,7 +214,7 @@ struct cv::gpu::SCascade::Fields
rect
.
w
-=
rect
.
y
;
}
u
int
channel
=
saturate_cast
<
u
int
>
((
int
)(
*
ftrs
)[
SC_F_CHANNEL
]);
u
nsigned
int
channel
=
saturate_cast
<
unsigned
int
>
((
int
)(
*
ftrs
)[
SC_F_CHANNEL
]);
vnodes
.
push_back
(
Node
(
rect
,
channel
,
th
));
++
ftrs
;
}
...
...
@@ -426,7 +426,7 @@ private:
GpuMat
nmag
(
fplane
,
cv
::
Rect
(
0
,
4
*
fh
,
fw
,
fh
));
GpuMat
nang
(
fplane
,
cv
::
Rect
(
0
,
5
*
fh
,
fw
,
fh
));
cv
::
gpu
::
multiply
(
mag
,
cv
::
Scalar
::
all
(
1.
f
/
(
8
*::
log
(
2
))),
nmag
,
1
,
-
1
,
s
);
cv
::
gpu
::
multiply
(
mag
,
cv
::
Scalar
::
all
(
1.
f
/
(
8
*::
log
(
2
.0
f
))),
nmag
,
1
,
-
1
,
s
);
cv
::
gpu
::
multiply
(
ang
,
cv
::
Scalar
::
all
(
1.
f
/
60.
f
),
nang
,
1
,
-
1
,
s
);
//create uchar magnitude
...
...
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