mirror of
https://github.com/opencv/opencv.git
synced 2024-11-29 05:29:54 +08:00
fix warning in CUDA samples
This commit is contained in:
parent
4d059e9e5b
commit
d65b3e0617
@ -1034,7 +1034,7 @@ namespace cv { namespace gpu { namespace device
|
|||||||
cudaSafeCall( cudaDeviceSynchronize() );
|
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);
|
findKnnMatch<256>(k, static_cast<PtrStepSzi>(trainIdx), static_cast<PtrStepSzf>(distance), allDist, stream);
|
||||||
}
|
}
|
||||||
|
@ -288,7 +288,7 @@ NCV_EXPORTS void ncvSetDebugOutputHandler(NCVDebugOutputHandler* func);
|
|||||||
do \
|
do \
|
||||||
{ \
|
{ \
|
||||||
cudaError_t res = cudacall; \
|
cudaError_t res = cudacall; \
|
||||||
ncvAssertPrintReturn(cudaSuccess==res, "cudaError_t=" << res, errCode); \
|
ncvAssertPrintReturn(cudaSuccess==res, "cudaError_t=" << (int)res, errCode); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@ const Size2i preferredVideoFrameSize(640, 480);
|
|||||||
const string wndTitle = "NVIDIA Computer Vision :: Haar Classifiers Cascade";
|
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;
|
int fontFace = FONT_HERSHEY_DUPLEX;
|
||||||
double fontScale = 0.8;
|
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 fontColorRed = CV_RGB(255,0,0);
|
||||||
Scalar fontColorNV = CV_RGB(118,185,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,
|
Ncv32u width, Ncv32u height,
|
||||||
NcvBool bFilterRects, NcvBool bLargestFace,
|
NcvBool bFilterRects, NcvBool bLargestFace,
|
||||||
HaarClassifierCascadeDescriptor &haar,
|
HaarClassifierCascadeDescriptor &haar,
|
||||||
@ -281,7 +281,7 @@ int main(int argc, const char** argv)
|
|||||||
//==============================================================================
|
//==============================================================================
|
||||||
|
|
||||||
namedWindow(wndTitle, 1);
|
namedWindow(wndTitle, 1);
|
||||||
Mat gray, frameDisp;
|
Mat frameDisp;
|
||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
|
@ -59,7 +59,7 @@ public:
|
|||||||
class RgbToR
|
class RgbToR
|
||||||
{
|
{
|
||||||
public:
|
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.0f;
|
return static_cast<float>(r)/255.0f;
|
||||||
}
|
}
|
||||||
@ -69,7 +69,7 @@ public:
|
|||||||
class RgbToG
|
class RgbToG
|
||||||
{
|
{
|
||||||
public:
|
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.0f;
|
return static_cast<float>(g)/255.0f;
|
||||||
}
|
}
|
||||||
@ -78,7 +78,7 @@ public:
|
|||||||
class RgbToB
|
class RgbToB
|
||||||
{
|
{
|
||||||
public:
|
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.0f;
|
return static_cast<float>(b)/255.0f;
|
||||||
}
|
}
|
||||||
@ -135,7 +135,7 @@ NCVStatus CopyData(const IplImage *image, const NCVMatrixAlloc<Ncv32f> &dst)
|
|||||||
return NCV_SUCCESS;
|
return NCV_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
NCVStatus LoadImages (const char *frame0Name,
|
static NCVStatus LoadImages (const char *frame0Name,
|
||||||
const char *frame1Name,
|
const char *frame1Name,
|
||||||
int &width,
|
int &width,
|
||||||
int &height,
|
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);
|
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;
|
IplImage *flowField;
|
||||||
|
|
||||||
@ -246,7 +246,7 @@ NCVStatus ShowFlow (NCVMatrixAlloc<Ncv32f> &u, NCVMatrixAlloc<Ncv32f> &v, const
|
|||||||
return NCV_SUCCESS;
|
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 ());
|
CvSize imageSize = cvSize (h_r.width (), h_r.height ());
|
||||||
IplImage *image = cvCreateImage (imageSize, IPL_DEPTH_8U, 4);
|
IplImage *image = cvCreateImage (imageSize, IPL_DEPTH_8U, 4);
|
||||||
@ -270,7 +270,7 @@ IplImage *CreateImage (NCVMatrixAlloc<Ncv32f> &h_r, NCVMatrixAlloc<Ncv32f> &h_g,
|
|||||||
return image;
|
return image;
|
||||||
}
|
}
|
||||||
|
|
||||||
void PrintHelp ()
|
static void PrintHelp ()
|
||||||
{
|
{
|
||||||
std::cout << "Usage help:\n";
|
std::cout << "Usage help:\n";
|
||||||
std::cout << std::setiosflags(std::ios::left);
|
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";
|
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,
|
Ncv32f &timeStep,
|
||||||
char *&frame0Name,
|
char *&frame0Name,
|
||||||
char *&frame1Name,
|
char *&frame1Name,
|
||||||
|
Loading…
Reference in New Issue
Block a user