mirror of
https://github.com/opencv/opencv.git
synced 2025-01-18 06:03:15 +08:00
fixing build of 2.4 branch with VC12 (aka 2013)
(master branch was fixed before, no need to merge this to master!) - disable openexr (numerous undefined std::min & std::max) - workaround for two compilator bugs
This commit is contained in:
parent
3ff1620086
commit
bd9d3dd561
@ -140,7 +140,7 @@ OCV_OPTION(WITH_IMAGEIO "ImageIO support for OS X" OFF
|
|||||||
OCV_OPTION(WITH_IPP "Include Intel IPP support" OFF IF (MSVC OR X86 OR X86_64) )
|
OCV_OPTION(WITH_IPP "Include Intel IPP support" OFF IF (MSVC OR X86 OR X86_64) )
|
||||||
OCV_OPTION(WITH_JASPER "Include JPEG2K support" ON IF (NOT IOS) )
|
OCV_OPTION(WITH_JASPER "Include JPEG2K support" ON IF (NOT IOS) )
|
||||||
OCV_OPTION(WITH_JPEG "Include JPEG support" ON)
|
OCV_OPTION(WITH_JPEG "Include JPEG support" ON)
|
||||||
OCV_OPTION(WITH_OPENEXR "Include ILM support via OpenEXR" ON IF (NOT IOS) )
|
OCV_OPTION(WITH_OPENEXR "Include ILM support via OpenEXR" ON IF (NOT IOS AND NOT MSVC12) )
|
||||||
OCV_OPTION(WITH_OPENGL "Include OpenGL support" OFF IF (NOT ANDROID AND NOT APPLE) )
|
OCV_OPTION(WITH_OPENGL "Include OpenGL support" OFF IF (NOT ANDROID AND NOT APPLE) )
|
||||||
OCV_OPTION(WITH_OPENNI "Include OpenNI support" OFF IF (NOT ANDROID AND NOT IOS) )
|
OCV_OPTION(WITH_OPENNI "Include OpenNI support" OFF IF (NOT ANDROID AND NOT IOS) )
|
||||||
OCV_OPTION(WITH_PNG "Include PNG support" ON)
|
OCV_OPTION(WITH_PNG "Include PNG support" ON)
|
||||||
|
@ -181,7 +181,7 @@ CV_INIT_ALGORITHM(DenseFeatureDetector, "Feature2D.Dense",
|
|||||||
obj.info()->addParam(obj, "varyImgBoundWithScale", obj.varyImgBoundWithScale));
|
obj.info()->addParam(obj, "varyImgBoundWithScale", obj.varyImgBoundWithScale));
|
||||||
|
|
||||||
CV_INIT_ALGORITHM(GridAdaptedFeatureDetector, "Feature2D.Grid",
|
CV_INIT_ALGORITHM(GridAdaptedFeatureDetector, "Feature2D.Grid",
|
||||||
obj.info()->addParam(obj, "detector", obj.detector);
|
obj.info()->addParam(obj, "detector", (Ptr<Algorithm>&)obj.detector);
|
||||||
obj.info()->addParam(obj, "maxTotalKeypoints", obj.maxTotalKeypoints);
|
obj.info()->addParam(obj, "maxTotalKeypoints", obj.maxTotalKeypoints);
|
||||||
obj.info()->addParam(obj, "gridRows", obj.gridRows);
|
obj.info()->addParam(obj, "gridRows", obj.gridRows);
|
||||||
obj.info()->addParam(obj, "gridCols", obj.gridCols));
|
obj.info()->addParam(obj, "gridCols", obj.gridCols));
|
||||||
|
@ -138,13 +138,16 @@ static void computeOrbDescriptor(const KeyPoint& kpt,
|
|||||||
const uchar* center = &img.at<uchar>(cvRound(kpt.pt.y), cvRound(kpt.pt.x));
|
const uchar* center = &img.at<uchar>(cvRound(kpt.pt.y), cvRound(kpt.pt.x));
|
||||||
int step = (int)img.step;
|
int step = (int)img.step;
|
||||||
|
|
||||||
#if 1
|
|
||||||
#define GET_VALUE(idx) \
|
|
||||||
center[cvRound(pattern[idx].x*b + pattern[idx].y*a)*step + \
|
|
||||||
cvRound(pattern[idx].x*a - pattern[idx].y*b)]
|
|
||||||
#else
|
|
||||||
float x, y;
|
float x, y;
|
||||||
int ix, iy;
|
int ix, iy;
|
||||||
|
#if 1
|
||||||
|
#define GET_VALUE(idx) \
|
||||||
|
(x = pattern[idx].x*a - pattern[idx].y*b, \
|
||||||
|
y = pattern[idx].x*b + pattern[idx].y*a, \
|
||||||
|
ix = cvRound(x), \
|
||||||
|
iy = cvRound(y), \
|
||||||
|
*(center + iy*step + ix) )
|
||||||
|
#else
|
||||||
#define GET_VALUE(idx) \
|
#define GET_VALUE(idx) \
|
||||||
(x = pattern[idx].x*a - pattern[idx].y*b, \
|
(x = pattern[idx].x*a - pattern[idx].y*b, \
|
||||||
y = pattern[idx].x*b + pattern[idx].y*a, \
|
y = pattern[idx].x*b + pattern[idx].y*a, \
|
||||||
|
Loading…
Reference in New Issue
Block a user