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
f489eb9a
Commit
f489eb9a
authored
Jan 30, 2013
by
Andrey Kamaev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix build warnings in OpenCL samples
parent
3a55fb9d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
19 deletions
+19
-19
matrix_operations.hpp
modules/ocl/include/opencv2/ocl/matrix_operations.hpp
+14
-14
facedetect.cpp
samples/ocl/facedetect.cpp
+1
-1
squares.cpp
samples/ocl/squares.cpp
+4
-4
No files found.
modules/ocl/include/opencv2/ocl/matrix_operations.hpp
View file @
f489eb9a
...
...
@@ -141,7 +141,7 @@ namespace cv
}
inline
oclMat
::
oclMat
(
const
oclMat
&
m
,
const
Range
&
r
owRange
,
const
Range
&
col
Range
)
inline
oclMat
::
oclMat
(
const
oclMat
&
m
,
const
Range
&
r
Range
,
const
Range
&
c
Range
)
{
flags
=
m
.
flags
;
step
=
m
.
step
;
...
...
@@ -152,22 +152,22 @@ namespace cv
wholerows
=
m
.
wholerows
;
wholecols
=
m
.
wholecols
;
offset
=
m
.
offset
;
if
(
r
ow
Range
==
Range
::
all
()
)
if
(
rRange
==
Range
::
all
()
)
rows
=
m
.
rows
;
else
{
CV_Assert
(
0
<=
r
owRange
.
start
&&
rowRange
.
start
<=
rowRange
.
end
&&
row
Range
.
end
<=
m
.
rows
);
rows
=
r
ow
Range
.
size
();
offset
+=
step
*
r
ow
Range
.
start
;
CV_Assert
(
0
<=
r
Range
.
start
&&
rRange
.
start
<=
rRange
.
end
&&
r
Range
.
end
<=
m
.
rows
);
rows
=
rRange
.
size
();
offset
+=
step
*
rRange
.
start
;
}
if
(
c
ol
Range
==
Range
::
all
()
)
if
(
cRange
==
Range
::
all
()
)
cols
=
m
.
cols
;
else
{
CV_Assert
(
0
<=
c
olRange
.
start
&&
colRange
.
start
<=
colRange
.
end
&&
col
Range
.
end
<=
m
.
cols
);
cols
=
c
ol
Range
.
size
();
offset
+=
c
ol
Range
.
start
*
elemSize
();
CV_Assert
(
0
<=
c
Range
.
start
&&
cRange
.
start
<=
cRange
.
end
&&
c
Range
.
end
<=
m
.
cols
);
cols
=
cRange
.
size
();
offset
+=
cRange
.
start
*
elemSize
();
flags
&=
cols
<
m
.
cols
?
~
Mat
::
CONTINUOUS_FLAG
:
-
1
;
}
...
...
@@ -296,12 +296,12 @@ namespace cv
//CPP void oclMat::copyTo( oclMat& m, const oclMat& mask ) const;
//CPP void oclMat::convertTo( oclMat& m, int rtype, double alpha=1, double beta=0 ) const;
inline
void
oclMat
::
assignTo
(
oclMat
&
m
,
int
type
)
const
inline
void
oclMat
::
assignTo
(
oclMat
&
m
,
int
m
type
)
const
{
if
(
type
<
0
)
if
(
m
type
<
0
)
m
=
*
this
;
else
convertTo
(
m
,
type
);
convertTo
(
m
,
m
type
);
}
//CPP oclMat& oclMat::operator = (const Scalar& s);
...
...
@@ -370,9 +370,9 @@ namespace cv
return
*
this
;
}
inline
oclMat
oclMat
::
operator
()(
Range
r
owRange
,
Range
col
Range
)
const
inline
oclMat
oclMat
::
operator
()(
Range
r
Range
,
Range
c
Range
)
const
{
return
oclMat
(
*
this
,
r
owRange
,
col
Range
);
return
oclMat
(
*
this
,
r
Range
,
c
Range
);
}
inline
oclMat
oclMat
::
operator
()(
const
Rect
&
roi
)
const
{
...
...
samples/ocl/facedetect.cpp
View file @
f489eb9a
...
...
@@ -10,7 +10,7 @@
using
namespace
std
;
using
namespace
cv
;
void
help
()
static
void
help
()
{
cout
<<
"
\n
This program demonstrates the cascade recognizer.
\n
"
"This classifier can recognize many ~rigid objects, it's most known use is for faces.
\n
"
...
...
samples/ocl/squares.cpp
View file @
f489eb9a
...
...
@@ -14,7 +14,7 @@
using
namespace
cv
;
using
namespace
std
;
void
help
()
static
void
help
()
{
cout
<<
"
\n
A program using OCL module pyramid scaling, Canny, dilate functions, threshold, split; cpu contours, contour simpification and
\n
"
...
...
@@ -34,7 +34,7 @@ const char* wndname = "OpenCL Square Detection Demo";
// helper function:
// finds a cosine of angle between vectors
// from pt0->pt1 and from pt0->pt2
double
angle
(
Point
pt1
,
Point
pt2
,
Point
pt0
)
static
double
angle
(
Point
pt1
,
Point
pt2
,
Point
pt0
)
{
double
dx1
=
pt1
.
x
-
pt0
.
x
;
double
dy1
=
pt1
.
y
-
pt0
.
y
;
...
...
@@ -45,7 +45,7 @@ double angle( Point pt1, Point pt2, Point pt0 )
// returns sequence of squares detected on the image.
// the sequence is stored in the specified memory storage
void
findSquares
(
const
Mat
&
image
,
vector
<
vector
<
Point
>
>&
squares
)
static
void
findSquares
(
const
Mat
&
image
,
vector
<
vector
<
Point
>
>&
squares
)
{
squares
.
clear
();
...
...
@@ -131,7 +131,7 @@ void findSquares( const Mat& image, vector<vector<Point> >& squares )
// the function draws all the squares in the image
void
drawSquares
(
Mat
&
image
,
const
vector
<
vector
<
Point
>
>&
squares
)
static
void
drawSquares
(
Mat
&
image
,
const
vector
<
vector
<
Point
>
>&
squares
)
{
for
(
size_t
i
=
0
;
i
<
squares
.
size
();
i
++
)
{
...
...
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