mirror of
https://github.com/opencv/opencv.git
synced 2025-06-07 17:44:04 +08:00
fixed warning on windows
This commit is contained in:
parent
555c505b70
commit
7a53910495
@ -34,7 +34,6 @@
|
|||||||
//
|
//
|
||||||
//M*/
|
//M*/
|
||||||
|
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
@ -42,6 +41,10 @@
|
|||||||
#include "opencv2/contrib/contrib.hpp"
|
#include "opencv2/contrib/contrib.hpp"
|
||||||
#include "opencv2/highgui/highgui.hpp"
|
#include "opencv2/highgui/highgui.hpp"
|
||||||
|
|
||||||
|
#ifndef _CRT_SECURE_NO_WARNINGS
|
||||||
|
# define _CRT_SECURE_NO_WARNINGS
|
||||||
|
#endif
|
||||||
|
|
||||||
static void help(char **argv)
|
static void help(char **argv)
|
||||||
{
|
{
|
||||||
std::cout << "\nThis program demonstrates the contributed flesh detector CvAdaptiveSkinDetector which can be found in contrib.cpp\n"
|
std::cout << "\nThis program demonstrates the contributed flesh detector CvAdaptiveSkinDetector which can be found in contrib.cpp\n"
|
||||||
|
@ -8,11 +8,13 @@
|
|||||||
|
|
||||||
/* Select appropriate case insensitive string comparison function: */
|
/* Select appropriate case insensitive string comparison function: */
|
||||||
#if defined WIN32 || defined _MSC_VER
|
#if defined WIN32 || defined _MSC_VER
|
||||||
#define MY_STRNICMP strnicmp
|
# define MY_STRNICMP _strnicmp
|
||||||
#define MY_STRICMP stricmp
|
# define MY_STRICMP _stricmp
|
||||||
|
# define MY_STRDUP _strdup
|
||||||
#else
|
#else
|
||||||
#define MY_STRNICMP strncasecmp
|
# define MY_STRNICMP strncasecmp
|
||||||
#define MY_STRICMP strcasecmp
|
# define MY_STRICMP strcasecmp
|
||||||
|
# define MY_STRDUP strdup
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* List of foreground (FG) DETECTION modules: */
|
/* List of foreground (FG) DETECTION modules: */
|
||||||
@ -239,7 +241,7 @@ static int RunBlobTrackingAuto( CvCapture* pCap, CvBlobTrackerAuto* pTracker,cha
|
|||||||
|
|
||||||
if(pS)
|
if(pS)
|
||||||
{
|
{
|
||||||
char* pStr = strdup(pS);
|
char* pStr = MY_STRDUP(pS);
|
||||||
char* pStrFree = pStr;
|
char* pStrFree = pStr;
|
||||||
|
|
||||||
while (pStr && strlen(pStr) > 0)
|
while (pStr && strlen(pStr) > 0)
|
||||||
|
@ -16,6 +16,10 @@
|
|||||||
|
|
||||||
#include "opencv2/opencv.hpp"
|
#include "opencv2/opencv.hpp"
|
||||||
|
|
||||||
|
#ifndef _CRT_SECURE_NO_WARNINGS
|
||||||
|
# define _CRT_SECURE_NO_WARNINGS
|
||||||
|
#endif
|
||||||
|
|
||||||
static void help(std::string errorMessage)
|
static void help(std::string errorMessage)
|
||||||
{
|
{
|
||||||
std::cout<<"Program init error : "<<errorMessage<<std::endl;
|
std::cout<<"Program init error : "<<errorMessage<<std::endl;
|
||||||
|
@ -11,10 +11,6 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//#include <cv.h>
|
|
||||||
//#include <ml.h>
|
|
||||||
//#include <cvaux.h>
|
|
||||||
//#include <highgui.h>
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
@ -22,6 +18,10 @@
|
|||||||
#include "opencv2/highgui/highgui.hpp"
|
#include "opencv2/highgui/highgui.hpp"
|
||||||
#include "opencv2/contrib/hybridtracker.hpp"
|
#include "opencv2/contrib/hybridtracker.hpp"
|
||||||
|
|
||||||
|
#ifndef _CRT_SECURE_NO_WARNINGS
|
||||||
|
# define _CRT_SECURE_NO_WARNINGS
|
||||||
|
#endif
|
||||||
|
|
||||||
using namespace cv;
|
using namespace cv;
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
|
@ -8,6 +8,10 @@
|
|||||||
#include <opencv2/calib3d/calib3d.hpp>
|
#include <opencv2/calib3d/calib3d.hpp>
|
||||||
#include <opencv2/highgui/highgui.hpp>
|
#include <opencv2/highgui/highgui.hpp>
|
||||||
|
|
||||||
|
#ifndef _CRT_SECURE_NO_WARNINGS
|
||||||
|
# define _CRT_SECURE_NO_WARNINGS
|
||||||
|
#endif
|
||||||
|
|
||||||
using namespace cv;
|
using namespace cv;
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user