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
41c9377d
Commit
41c9377d
authored
Dec 18, 2012
by
Vladislav Vinogradov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed warnings under windows
parent
ab25fe9e
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
30 additions
and
30 deletions
+30
-30
cascadeclassifier.cpp
modules/gpu/src/cascadeclassifier.cpp
+1
-1
element_operations.cpp
modules/gpu/src/element_operations.cpp
+4
-4
fgd_bgfg.cpp
modules/gpu/src/fgd_bgfg.cpp
+3
-3
hough.cpp
modules/gpu/src/hough.cpp
+1
-1
softcascade.cpp
modules/gpu/src/softcascade.cpp
+3
-3
test_hough.cpp
modules/gpu/test/test_hough.cpp
+1
-1
test_labeling.cpp
modules/gpu/test/test_labeling.cpp
+1
-1
test_video.cpp
modules/gpu/test/test_video.cpp
+2
-2
houghlines.cpp
samples/gpu/houghlines.cpp
+3
-3
optical_flow.cpp
samples/gpu/optical_flow.cpp
+11
-11
No files found.
modules/gpu/src/cascadeclassifier.cpp
View file @
41c9377d
...
...
@@ -623,7 +623,7 @@ private:
}
// copy data structures on gpu
stage_mat
.
upload
(
cv
::
Mat
(
1
,
stages
.
size
()
*
sizeof
(
Stage
),
CV_8UC1
,
(
uchar
*
)
&
(
stages
[
0
])
));
stage_mat
.
upload
(
cv
::
Mat
(
1
,
(
int
)
(
stages
.
size
()
*
sizeof
(
Stage
)
),
CV_8UC1
,
(
uchar
*
)
&
(
stages
[
0
])
));
trees_mat
.
upload
(
cv
::
Mat
(
cl_trees
).
reshape
(
1
,
1
));
nodes_mat
.
upload
(
cv
::
Mat
(
cl_nodes
).
reshape
(
1
,
1
));
leaves_mat
.
upload
(
cv
::
Mat
(
cl_leaves
).
reshape
(
1
,
1
));
...
...
modules/gpu/src/element_operations.cpp
View file @
41c9377d
...
...
@@ -2086,7 +2086,7 @@ void cv::gpu::bitwise_not(const GpuMat& src, GpuMat& dst, const GpuMat& mask, St
cudaStream_t
stream
=
StreamAccessor
::
getStream
(
s
);
const
int
bcols
=
src
.
cols
*
src
.
elemSize
(
);
const
int
bcols
=
(
int
)
(
src
.
cols
*
src
.
elemSize
()
);
if
((
bcols
&
3
)
==
0
)
{
...
...
@@ -2139,7 +2139,7 @@ void cv::gpu::bitwise_and(const GpuMat& src1, const GpuMat& src2, GpuMat& dst, c
cudaStream_t
stream
=
StreamAccessor
::
getStream
(
s
);
const
int
bcols
=
src1
.
cols
*
src1
.
elemSize
(
);
const
int
bcols
=
(
int
)
(
src1
.
cols
*
src1
.
elemSize
()
);
if
((
bcols
&
3
)
==
0
)
{
...
...
@@ -2186,7 +2186,7 @@ void cv::gpu::bitwise_or(const GpuMat& src1, const GpuMat& src2, GpuMat& dst, co
cudaStream_t
stream
=
StreamAccessor
::
getStream
(
s
);
const
int
bcols
=
src1
.
cols
*
src1
.
elemSize
(
);
const
int
bcols
=
(
int
)
(
src1
.
cols
*
src1
.
elemSize
()
);
if
((
bcols
&
3
)
==
0
)
{
...
...
@@ -2233,7 +2233,7 @@ void cv::gpu::bitwise_xor(const GpuMat& src1, const GpuMat& src2, GpuMat& dst, c
cudaStream_t
stream
=
StreamAccessor
::
getStream
(
s
);
const
int
bcols
=
src1
.
cols
*
src1
.
elemSize
(
);
const
int
bcols
=
(
int
)
(
src1
.
cols
*
src1
.
elemSize
()
);
if
((
bcols
&
3
)
==
0
)
{
...
...
modules/gpu/src/fgd_bgfg.cpp
View file @
41c9377d
...
...
@@ -523,15 +523,15 @@ namespace
size_t
total
=
all_contours
.
size
();
_contours
.
create
(
total
,
1
,
0
,
-
1
,
true
);
_contours
.
create
(
(
int
)
total
,
1
,
0
,
-
1
,
true
);
cv
::
SeqIterator
<
CvSeq
*>
it
=
all_contours
.
begin
();
for
(
size_t
i
=
0
;
i
<
total
;
++
i
,
++
it
)
{
CvSeq
*
c
=
*
it
;
((
CvContour
*
)
c
)
->
color
=
(
int
)
i
;
_contours
.
create
((
int
)
c
->
total
,
1
,
CV_32SC2
,
i
,
true
);
cv
::
Mat
ci
=
_contours
.
getMat
(
i
);
_contours
.
create
((
int
)
c
->
total
,
1
,
CV_32SC2
,
(
int
)
i
,
true
);
cv
::
Mat
ci
=
_contours
.
getMat
(
(
int
)
i
);
CV_Assert
(
ci
.
isContinuous
()
);
cvCvtSeqToArray
(
c
,
ci
.
data
);
}
...
...
modules/gpu/src/hough.cpp
View file @
41c9377d
...
...
@@ -579,7 +579,7 @@ namespace
const
func_t
func
=
funcs
[
dx
.
depth
()];
CV_Assert
(
func
!=
0
);
edgePointList
.
cols
=
edgePointList
.
step
/
sizeof
(
int
);
edgePointList
.
cols
=
(
int
)
(
edgePointList
.
step
/
sizeof
(
int
)
);
ensureSizeIsEnough
(
2
,
edges
.
size
().
area
(),
CV_32SC1
,
edgePointList
);
edgePointList
.
cols
=
func
(
edges
,
dx
,
dy
,
edgePointList
.
ptr
<
unsigned
int
>
(
0
),
edgePointList
.
ptr
<
float
>
(
1
));
...
...
modules/gpu/src/softcascade.cpp
View file @
41c9377d
...
...
@@ -235,13 +235,13 @@ struct cv::gpu::SCascade::Fields
++
octIndex
;
}
cv
::
Mat
hoctaves
(
1
,
voctaves
.
size
()
*
sizeof
(
Octave
),
CV_8UC1
,
(
uchar
*
)
&
(
voctaves
[
0
]));
cv
::
Mat
hoctaves
(
1
,
(
int
)
(
voctaves
.
size
()
*
sizeof
(
Octave
)
),
CV_8UC1
,
(
uchar
*
)
&
(
voctaves
[
0
]));
CV_Assert
(
!
hoctaves
.
empty
());
cv
::
Mat
hstages
(
cv
::
Mat
(
vstages
).
reshape
(
1
,
1
));
CV_Assert
(
!
hstages
.
empty
());
cv
::
Mat
hnodes
(
1
,
vnodes
.
size
()
*
sizeof
(
Node
),
CV_8UC1
,
(
uchar
*
)
&
(
vnodes
[
0
])
);
cv
::
Mat
hnodes
(
1
,
(
int
)
(
vnodes
.
size
()
*
sizeof
(
Node
)
),
CV_8UC1
,
(
uchar
*
)
&
(
vnodes
[
0
])
);
CV_Assert
(
!
hnodes
.
empty
());
cv
::
Mat
hleaves
(
cv
::
Mat
(
vleaves
).
reshape
(
1
,
1
));
...
...
@@ -296,7 +296,7 @@ struct cv::gpu::SCascade::Fields
scale
=
::
std
::
min
(
maxScale
,
::
expf
(
::
log
(
scale
)
+
logFactor
));
}
cv
::
Mat
hlevels
=
cv
::
Mat
(
1
,
vlevels
.
size
()
*
sizeof
(
Level
),
CV_8UC1
,
(
uchar
*
)
&
(
vlevels
[
0
])
);
cv
::
Mat
hlevels
=
cv
::
Mat
(
1
,
(
int
)
(
vlevels
.
size
()
*
sizeof
(
Level
)
),
CV_8UC1
,
(
uchar
*
)
&
(
vlevels
[
0
])
);
CV_Assert
(
!
hlevels
.
empty
());
levels
.
upload
(
hlevels
);
downscales
=
dcs
;
...
...
modules/gpu/test/test_hough.cpp
View file @
41c9377d
...
...
@@ -89,7 +89,7 @@ TEST_P(HoughLines, Accuracy)
const
bool
useRoi
=
GET_PARAM
(
2
);
const
float
rho
=
1.0
f
;
const
float
theta
=
1.5
f
*
CV_PI
/
180.0
f
;
const
float
theta
=
(
float
)
(
1.5
*
CV_PI
/
180.0
)
;
const
int
threshold
=
100
;
cv
::
Mat
src
(
size
,
CV_8UC1
);
...
...
modules/gpu/test/test_labeling.cpp
View file @
41c9377d
...
...
@@ -82,7 +82,7 @@ namespace {
int
cc
=
-
1
;
int
*
dist_labels
=
(
int
*
)
labels
.
data
;
int
pitch
=
labels
.
step1
();
int
pitch
=
(
int
)
labels
.
step1
();
unsigned
char
*
source
=
(
unsigned
char
*
)
image
.
data
;
int
width
=
image
.
cols
;
...
...
modules/gpu/test/test_video.cpp
View file @
41c9377d
...
...
@@ -606,8 +606,8 @@ static void FastOpticalFlowBM_gold(const cv::Mat_<uchar>& I0, const cv::Mat_<uch
}
}
velx
(
y
,
x
)
=
bestDx
;
vely
(
y
,
x
)
=
bestDy
;
velx
(
y
,
x
)
=
(
float
)
bestDx
;
vely
(
y
,
x
)
=
(
float
)
bestDy
;
}
}
}
...
...
samples/gpu/houghlines.cpp
View file @
41c9377d
...
...
@@ -38,7 +38,7 @@ int main(int argc, const char* argv[])
vector
<
Vec4i
>
lines_cpu
;
{
const
double
start
=
getTickCount
();
const
int64
start
=
getTickCount
();
HoughLinesP
(
mask
,
lines_cpu
,
1
,
CV_PI
/
180
,
50
,
60
,
5
);
...
...
@@ -57,9 +57,9 @@ int main(int argc, const char* argv[])
GpuMat
d_lines
;
HoughLinesBuf
d_buf
;
{
const
double
start
=
getTickCount
();
const
int64
start
=
getTickCount
();
gpu
::
HoughLinesP
(
d_src
,
d_lines
,
d_buf
,
1
,
CV_PI
/
180
,
50
,
5
);
gpu
::
HoughLinesP
(
d_src
,
d_lines
,
d_buf
,
1
.0
f
,
(
float
)
(
CV_PI
/
180.0
f
)
,
50
,
5
);
const
double
timeSec
=
(
getTickCount
()
-
start
)
/
getTickFrequency
();
cout
<<
"GPU Time : "
<<
timeSec
*
1000
<<
" ms"
<<
endl
;
...
...
samples/gpu/optical_flow.cpp
View file @
41c9377d
...
...
@@ -57,7 +57,7 @@ static Vec3b computeColor(float fx, float fy)
}
const
float
rad
=
sqrt
(
fx
*
fx
+
fy
*
fy
);
const
float
a
=
atan2
(
-
fy
,
-
fx
)
/
CV_PI
;
const
float
a
=
atan2
(
-
fy
,
-
fx
)
/
(
float
)
CV_PI
;
const
float
fk
=
(
a
+
1.0
f
)
/
2.0
f
*
(
NCOLS
-
1
);
const
int
k0
=
static_cast
<
int
>
(
fk
);
...
...
@@ -68,8 +68,8 @@ static Vec3b computeColor(float fx, float fy)
for
(
int
b
=
0
;
b
<
3
;
b
++
)
{
const
float
col0
=
colorWheel
[
k0
][
b
]
/
255.0
;
const
float
col1
=
colorWheel
[
k1
][
b
]
/
255.0
;
const
float
col0
=
colorWheel
[
k0
][
b
]
/
255.0
f
;
const
float
col1
=
colorWheel
[
k1
][
b
]
/
255.0
f
;
float
col
=
(
1
-
f
)
*
col0
+
f
*
col1
;
...
...
@@ -78,7 +78,7 @@ static Vec3b computeColor(float fx, float fy)
else
col
*=
.75
;
// out of range
pix
[
2
-
b
]
=
static_cast
<
int
>
(
255.0
*
col
);
pix
[
2
-
b
]
=
static_cast
<
uchar
>
(
255.0
*
col
);
}
return
pix
;
...
...
@@ -166,7 +166,7 @@ int main(int argc, const char* argv[])
GpuMat
d_flowx
(
frame0
.
size
(),
CV_32FC1
);
GpuMat
d_flowy
(
frame0
.
size
(),
CV_32FC1
);
BroxOpticalFlow
brox
(
0.197
,
50.0
,
0.8
,
10
,
77
,
10
);
BroxOpticalFlow
brox
(
0.197
f
,
50.0
f
,
0.8
f
,
10
,
77
,
10
);
PyrLKOpticalFlow
lk
;
lk
.
winSize
=
Size
(
7
,
7
);
FarnebackOpticalFlow
farn
;
OpticalFlowDual_TVL1_GPU
tvl1
;
...
...
@@ -179,7 +179,7 @@ int main(int argc, const char* argv[])
d_frame0
.
convertTo
(
d_frame0f
,
CV_32F
,
1.0
/
255.0
);
d_frame1
.
convertTo
(
d_frame1f
,
CV_32F
,
1.0
/
255.0
);
const
double
start
=
getTickCount
();
const
int64
start
=
getTickCount
();
brox
(
d_frame0f
,
d_frame1f
,
d_flowx
,
d_flowy
);
...
...
@@ -190,7 +190,7 @@ int main(int argc, const char* argv[])
}
{
const
double
start
=
getTickCount
();
const
int64
start
=
getTickCount
();
lk
.
dense
(
d_frame0
,
d_frame1
,
d_flowx
,
d_flowy
);
...
...
@@ -201,7 +201,7 @@ int main(int argc, const char* argv[])
}
{
const
double
start
=
getTickCount
();
const
int64
start
=
getTickCount
();
farn
(
d_frame0
,
d_frame1
,
d_flowx
,
d_flowy
);
...
...
@@ -212,7 +212,7 @@ int main(int argc, const char* argv[])
}
{
const
double
start
=
getTickCount
();
const
int64
start
=
getTickCount
();
tvl1
(
d_frame0
,
d_frame1
,
d_flowx
,
d_flowy
);
...
...
@@ -223,7 +223,7 @@ int main(int argc, const char* argv[])
}
{
const
double
start
=
getTickCount
();
const
int64
start
=
getTickCount
();
GpuMat
buf
;
calcOpticalFlowBM
(
d_frame0
,
d_frame1
,
Size
(
7
,
7
),
Size
(
1
,
1
),
Size
(
21
,
21
),
false
,
d_flowx
,
d_flowy
,
buf
);
...
...
@@ -235,7 +235,7 @@ int main(int argc, const char* argv[])
}
{
const
double
start
=
getTickCount
();
const
int64
start
=
getTickCount
();
fastBM
(
d_frame0
,
d_frame1
,
d_flowx
,
d_flowy
);
...
...
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