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
d65b3e06
Commit
d65b3e06
authored
Sep 05, 2012
by
marina.kolpakova
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix warning in CUDA samples
parent
4d059e9e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
14 deletions
+14
-14
bf_knnmatch.cu
modules/gpu/src/cuda/bf_knnmatch.cu
+1
-1
NCV.hpp
modules/gpu/src/nvidia/core/NCV.hpp
+1
-1
cascadeclassifier_nvidia_api.cpp
samples/gpu/cascadeclassifier_nvidia_api.cpp
+4
-4
opticalflow_nvidia_api.cpp
samples/gpu/opticalflow_nvidia_api.cpp
+8
-8
No files found.
modules/gpu/src/cuda/bf_knnmatch.cu
View file @
d65b3e06
...
...
@@ -1034,7 +1034,7 @@ namespace cv { namespace gpu { namespace device
cudaSafeCall( cudaDeviceSynchronize() );
}
void findKnnMatchDispatcher(int k, const PtrStepSzb& trainIdx, const PtrStepSzb& distance, const PtrStepSzf& allDist, int
cc
, cudaStream_t stream)
void findKnnMatchDispatcher(int k, const PtrStepSzb& trainIdx, const PtrStepSzb& distance, const PtrStepSzf& allDist, int
/*cc*/
, cudaStream_t stream)
{
findKnnMatch<256>(k, static_cast<PtrStepSzi>(trainIdx), static_cast<PtrStepSzf>(distance), allDist, stream);
}
...
...
modules/gpu/src/nvidia/core/NCV.hpp
View file @
d65b3e06
...
...
@@ -288,7 +288,7 @@ NCV_EXPORTS void ncvSetDebugOutputHandler(NCVDebugOutputHandler* func);
do \
{ \
cudaError_t res = cudacall; \
ncvAssertPrintReturn(cudaSuccess==res, "cudaError_t=" << res, errCode); \
ncvAssertPrintReturn(cudaSuccess==res, "cudaError_t=" <<
(int)
res, errCode); \
} while (0)
...
...
samples/gpu/cascadeclassifier_nvidia_api.cpp
View file @
d65b3e06
...
...
@@ -30,7 +30,7 @@ const Size2i preferredVideoFrameSize(640, 480);
const
string
wndTitle
=
"NVIDIA Computer Vision :: Haar Classifiers Cascade"
;
void
matPrint
(
Mat
&
img
,
int
lineOffsY
,
Scalar
fontColor
,
const
string
&
ss
)
static
void
matPrint
(
Mat
&
img
,
int
lineOffsY
,
Scalar
fontColor
,
const
string
&
ss
)
{
int
fontFace
=
FONT_HERSHEY_DUPLEX
;
double
fontScale
=
0.8
;
...
...
@@ -45,7 +45,7 @@ void matPrint(Mat &img, int lineOffsY, Scalar fontColor, const string &ss)
}
void
displayState
(
Mat
&
canvas
,
bool
bHelp
,
bool
bGpu
,
bool
bLargestFace
,
bool
bFilter
,
double
fps
)
static
void
displayState
(
Mat
&
canvas
,
bool
bHelp
,
bool
bGpu
,
bool
bLargestFace
,
bool
bFilter
,
double
fps
)
{
Scalar
fontColorRed
=
CV_RGB
(
255
,
0
,
0
);
Scalar
fontColorNV
=
CV_RGB
(
118
,
185
,
0
);
...
...
@@ -74,7 +74,7 @@ void displayState(Mat &canvas, bool bHelp, bool bGpu, bool bLargestFace, bool bF
}
NCVStatus
process
(
Mat
*
srcdst
,
static
NCVStatus
process
(
Mat
*
srcdst
,
Ncv32u
width
,
Ncv32u
height
,
NcvBool
bFilterRects
,
NcvBool
bLargestFace
,
HaarClassifierCascadeDescriptor
&
haar
,
...
...
@@ -281,7 +281,7 @@ int main(int argc, const char** argv)
//==============================================================================
namedWindow
(
wndTitle
,
1
);
Mat
gray
,
frameDisp
;
Mat
frameDisp
;
do
{
...
...
samples/gpu/opticalflow_nvidia_api.cpp
View file @
d65b3e06
...
...
@@ -59,7 +59,7 @@ public:
class
RgbToR
{
public
:
float
operator
()(
unsigned
char
b
,
unsigned
char
g
,
unsigned
char
r
)
float
operator
()(
unsigned
char
/*b*/
,
unsigned
char
/*g*/
,
unsigned
char
r
)
{
return
static_cast
<
float
>
(
r
)
/
255.0
f
;
}
...
...
@@ -69,7 +69,7 @@ public:
class
RgbToG
{
public
:
float
operator
()(
unsigned
char
b
,
unsigned
char
g
,
unsigned
char
r
)
float
operator
()(
unsigned
char
/*b*/
,
unsigned
char
g
,
unsigned
char
/*r*/
)
{
return
static_cast
<
float
>
(
g
)
/
255.0
f
;
}
...
...
@@ -78,7 +78,7 @@ public:
class
RgbToB
{
public
:
float
operator
()(
unsigned
char
b
,
unsigned
char
g
,
unsigned
char
r
)
float
operator
()(
unsigned
char
b
,
unsigned
char
/*g*/
,
unsigned
char
/*r*/
)
{
return
static_cast
<
float
>
(
b
)
/
255.0
f
;
}
...
...
@@ -135,7 +135,7 @@ NCVStatus CopyData(const IplImage *image, const NCVMatrixAlloc<Ncv32f> &dst)
return
NCV_SUCCESS
;
}
NCVStatus
LoadImages
(
const
char
*
frame0Name
,
static
NCVStatus
LoadImages
(
const
char
*
frame0Name
,
const
char
*
frame1Name
,
int
&
width
,
int
&
height
,
...
...
@@ -186,7 +186,7 @@ inline T MapValue (T x, T a, T b, T c, T d)
return
c
+
(
d
-
c
)
*
(
x
-
a
)
/
(
b
-
a
);
}
NCVStatus
ShowFlow
(
NCVMatrixAlloc
<
Ncv32f
>
&
u
,
NCVMatrixAlloc
<
Ncv32f
>
&
v
,
const
char
*
name
)
static
NCVStatus
ShowFlow
(
NCVMatrixAlloc
<
Ncv32f
>
&
u
,
NCVMatrixAlloc
<
Ncv32f
>
&
v
,
const
char
*
name
)
{
IplImage
*
flowField
;
...
...
@@ -246,7 +246,7 @@ NCVStatus ShowFlow (NCVMatrixAlloc<Ncv32f> &u, NCVMatrixAlloc<Ncv32f> &v, const
return
NCV_SUCCESS
;
}
IplImage
*
CreateImage
(
NCVMatrixAlloc
<
Ncv32f
>
&
h_r
,
NCVMatrixAlloc
<
Ncv32f
>
&
h_g
,
NCVMatrixAlloc
<
Ncv32f
>
&
h_b
)
static
IplImage
*
CreateImage
(
NCVMatrixAlloc
<
Ncv32f
>
&
h_r
,
NCVMatrixAlloc
<
Ncv32f
>
&
h_g
,
NCVMatrixAlloc
<
Ncv32f
>
&
h_b
)
{
CvSize
imageSize
=
cvSize
(
h_r
.
width
(),
h_r
.
height
());
IplImage
*
image
=
cvCreateImage
(
imageSize
,
IPL_DEPTH_8U
,
4
);
...
...
@@ -270,7 +270,7 @@ IplImage *CreateImage (NCVMatrixAlloc<Ncv32f> &h_r, NCVMatrixAlloc<Ncv32f> &h_g,
return
image
;
}
void
PrintHelp
()
static
void
PrintHelp
()
{
std
::
cout
<<
"Usage help:
\n
"
;
std
::
cout
<<
std
::
setiosflags
(
std
::
ios
::
left
);
...
...
@@ -286,7 +286,7 @@ void PrintHelp ()
std
::
cout
<<
"
\t
"
<<
std
::
setw
(
15
)
<<
PARAM_HELP
<<
" - display this help message
\n
"
;
}
int
ProcessCommandLine
(
int
argc
,
char
**
argv
,
static
int
ProcessCommandLine
(
int
argc
,
char
**
argv
,
Ncv32f
&
timeStep
,
char
*&
frame0Name
,
char
*&
frame1Name
,
...
...
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