fixed include for Windows

This commit is contained in:
Alexey Spizhevoy 2013-07-05 09:44:32 +04:00
parent 406f342dc3
commit 2a48f7c035

View File

@ -41,9 +41,15 @@
//M*/ //M*/
#include "precomp.hpp" #include "precomp.hpp"
#include <math.h>
#include "opencv2/calib3d/calib3d_c.h" #include "opencv2/calib3d/calib3d_c.h"
#ifdef _MSC_VER
#include <float.h>
#define isnan(x) _isnan(x)
#else
#include <math.h>
#endif
using namespace cv; using namespace cv;
using namespace cv::detail; using namespace cv::detail;
@ -253,8 +259,7 @@ bool BundleAdjusterBase::estimate(const std::vector<ImageFeatures> &features,
bool ok = true; bool ok = true;
for (int i = 0; i < cam_params_.rows; ++i) for (int i = 0; i < cam_params_.rows; ++i)
{ {
if (isnan(cam_params_.at<double>(i,0)) || if (isnan(cam_params_.at<double>(i,0)))
isinf(cam_params_.at<double>(i,0)))
{ {
ok = false; ok = false;
break; break;