fixed 0.5.0 build for Windows
git-svn-id: http://find-object.googlecode.com/svn/trunk/find_object@358 620bd6b2-0a58-f614-fd9a-1bd335dccda9
This commit is contained in:
parent
9bc7c15abc
commit
43e855e822
@ -5,9 +5,11 @@ SET(PROJECT_PREFIX find_object)
|
|||||||
|
|
||||||
ADD_DEFINITIONS(-DPROJECT_PREFIX="${PROJECT_PREFIX}")
|
ADD_DEFINITIONS(-DPROJECT_PREFIX="${PROJECT_PREFIX}")
|
||||||
ADD_DEFINITIONS(-DPROJECT_NAME="${PROJECT_NAME}")
|
ADD_DEFINITIONS(-DPROJECT_NAME="${PROJECT_NAME}")
|
||||||
IF(NOT WIN32)
|
IF(WIN32 AND NOT MINGW)
|
||||||
|
ADD_DEFINITIONS("-wd4251")
|
||||||
|
ELSE ()
|
||||||
ADD_DEFINITIONS( "-Wall" )
|
ADD_DEFINITIONS( "-Wall" )
|
||||||
ENDIF(NOT WIN32)
|
ENDIF()
|
||||||
#ADD_DEFINITIONS("-DUNICODE") # to test with UNICODE projects
|
#ADD_DEFINITIONS("-DUNICODE") # to test with UNICODE projects
|
||||||
|
|
||||||
#######################
|
#######################
|
||||||
|
|||||||
@ -46,8 +46,7 @@ void setupQuitSignal()
|
|||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
if (!SetConsoleCtrlHandler(my_handler, TRUE))
|
if (!SetConsoleCtrlHandler(my_handler, TRUE))
|
||||||
{
|
{
|
||||||
printf("\nERROR: Could not set control handler");
|
UERROR("Could not set control (ctrl-c) handler");
|
||||||
return 1;
|
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
struct sigaction sigIntHandler;
|
struct sigaction sigIntHandler;
|
||||||
|
|||||||
@ -101,7 +101,7 @@ int main(int argc, char * argv[])
|
|||||||
////////////////////////////
|
////////////////////////////
|
||||||
|
|
||||||
// Find correspondences by NNDR (Nearest Neighbor Distance Ratio)
|
// Find correspondences by NNDR (Nearest Neighbor Distance Ratio)
|
||||||
float nndrRatio = 0.6;
|
float nndrRatio = 0.6f;
|
||||||
std::vector<cv::Point2f> mpts_1, mpts_2; // Used for homography
|
std::vector<cv::Point2f> mpts_1, mpts_2; // Used for homography
|
||||||
std::vector<int> indexes_1, indexes_2; // Used for homography
|
std::vector<int> indexes_1, indexes_2; // Used for homography
|
||||||
std::vector<uchar> outlier_mask; // Used for homography
|
std::vector<uchar> outlier_mask; // Used for homography
|
||||||
|
|||||||
@ -155,7 +155,7 @@ int main(int argc, char * argv[])
|
|||||||
sceneWidget.setData(sceneKeypoints, cvtCvMat2QImage(sceneImg));
|
sceneWidget.setData(sceneKeypoints, cvtCvMat2QImage(sceneImg));
|
||||||
|
|
||||||
// Find correspondences by NNDR (Nearest Neighbor Distance Ratio)
|
// Find correspondences by NNDR (Nearest Neighbor Distance Ratio)
|
||||||
float nndrRatio = 0.8;
|
float nndrRatio = 0.8f;
|
||||||
std::vector<cv::Point2f> mpts_1, mpts_2; // Used for homography
|
std::vector<cv::Point2f> mpts_1, mpts_2; // Used for homography
|
||||||
std::vector<int> indexes_1, indexes_2; // Used for homography
|
std::vector<int> indexes_1, indexes_2; // Used for homography
|
||||||
std::vector<uchar> outlier_mask; // Used for homography
|
std::vector<uchar> outlier_mask; // Used for homography
|
||||||
|
|||||||
@ -11,15 +11,15 @@
|
|||||||
#include <opencv2/core/core.hpp>
|
#include <opencv2/core/core.hpp>
|
||||||
|
|
||||||
// Convert OpenCV matrix to QImage
|
// Convert OpenCV matrix to QImage
|
||||||
QImage FINDOBJECT_EXP cvtCvMat2QImage(const cv::Mat & image, bool isBgr = true);
|
FINDOBJECT_EXP QImage cvtCvMat2QImage(const cv::Mat & image, bool isBgr = true);
|
||||||
|
|
||||||
// Convert QImage to OpenCV matrix
|
// Convert QImage to OpenCV matrix
|
||||||
cv::Mat FINDOBJECT_EXP cvtQImage2CvMat(const QImage & image);
|
FINDOBJECT_EXP cv::Mat cvtQImage2CvMat(const QImage & image);
|
||||||
|
|
||||||
// Convert IplImage to QImage
|
// Convert IplImage to QImage
|
||||||
QImage FINDOBJECT_EXP cvtIplImage2QImage(const IplImage * image);
|
FINDOBJECT_EXP QImage cvtIplImage2QImage(const IplImage * image);
|
||||||
|
|
||||||
// Convert QImage to IplImage
|
// Convert QImage to IplImage
|
||||||
IplImage * FINDOBJECT_EXP cvtQImage2IplImage(const QImage & image);
|
FINDOBJECT_EXP IplImage * cvtQImage2IplImage(const QImage & image);
|
||||||
|
|
||||||
#endif // QTOPENCV_H
|
#endif // QTOPENCV_H
|
||||||
|
|||||||
@ -32,6 +32,11 @@
|
|||||||
|
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
|
||||||
|
#if _MSC_VER
|
||||||
|
#undef min
|
||||||
|
#undef max
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \file ULogger.h
|
* \file ULogger.h
|
||||||
* \brief ULogger class and convenient macros
|
* \brief ULogger class and convenient macros
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user