build: fix MSVS2010

pull/9800/head
Alexander Alekhin 7 years ago
parent 8ac2c5d620
commit e615fafe2d
  1. 4
      modules/dnn/src/layers/lp_normalize_layer.cpp
  2. 8
      modules/imgproc/src/shapedescr.cpp

@ -53,8 +53,8 @@ public:
norm = cv::norm(*inputs[0], NORM_L2);
else
{
pow(abs(*inputs[0]), pnorm, internals[0]);
norm = pow(sum(internals[0])[0], 1.0f / pnorm);
cv::pow(abs(*inputs[0]), pnorm, internals[0]);
norm = pow((float)sum(internals[0])[0], 1.0f / pnorm);
}
multiply(*inputs[0], 1.0f / (norm + epsilon), outputs[0]);
}

@ -593,8 +593,8 @@ cv::RotatedRect cv::fitEllipseAMS( InputArray _points )
x0 = p1/l3 + c.x;
y0 = p2/l3 + c.y;
a = sqrt(2)*sqrt((u1 - 4.0*u2)/((l1 - l2)*l3));
b = sqrt(2)*sqrt(-1.0*((u1 - 4.0*u2)/((l1 + l2)*l3)));
a = std::sqrt(2.)*sqrt((u1 - 4.0*u2)/((l1 - l2)*l3));
b = std::sqrt(2.)*sqrt(-1.0*((u1 - 4.0*u2)/((l1 + l2)*l3)));
if (pVec(1) == 0) {
if (pVec(0) < pVec(2) ) {
theta = 0;
@ -746,8 +746,8 @@ cv::RotatedRect cv::fitEllipseDirect( InputArray _points )
x0 = p1/l3 + c.x;
y0 = p2/l3 + c.y;
a = sqrt(2)*sqrt((u1 - 4.0*u2)/((l1 - l2)*l3));
b = sqrt(2)*sqrt(-1.0*((u1 - 4.0*u2)/((l1 + l2)*l3)));
a = sqrt(2.)*sqrt((u1 - 4.0*u2)/((l1 - l2)*l3));
b = sqrt(2.)*sqrt(-1.0*((u1 - 4.0*u2)/((l1 + l2)*l3)));
if (pVec(1) == 0) {
if (pVec(0) < pVec(2) ) {
theta = 0;

Loading…
Cancel
Save