ninputs > 1 ? ARITHM_MAX_CHANNELS : 4);
}
- virtual int getMaxErr(int depth) { return depth < CV_32F ? 1 : 256; }
+ virtual double getMaxErr(int depth) { return depth < CV_32F ? 1 : depth == CV_32F ? 1e-5 : 1e-12; }
virtual void generateScalars(int depth, RNG& rng)
{
const double m = 3.;
{
addWeighted(src[0], alpha, src[1], beta, gamma[0], dst);
}
- int getMaxErr(int depth)
+ double getMaxErr(int depth)
{
- return depth <= CV_32S ? 2 : depth < CV_64F ? (1 << 10) : (1 << 22);
+ return depth <= CV_32S ? 2 : depth < CV_64F ? 1e-5 : 1e-10;
}
};
{
cvtest::multiply(src[0], src[1], dst, alpha);
}
- int getMaxErr(int depth)
+ double getMaxErr(int depth)
{
- return depth < CV_32S ? 2 : depth < CV_32F ? 4 : 16;
+ return depth <= CV_32S ? 2 : depth < CV_64F ? 1e-5 : 1e-12;
}
};
{
cvtest::divide(src[0], src[1], dst, alpha);
}
- int getMaxErr(int depth)
+ double getMaxErr(int depth)
{
- return depth < CV_32S ? 2 : depth < CV_32F ? 4 : 16;
+ return depth <= CV_32S ? 2 : depth < CV_64F ? 1e-5 : 1e-12;
}
};
{
cvtest::divide(Mat(), src[0], dst, alpha);
}
- int getMaxErr(int depth)
+ double getMaxErr(int depth)
{
- return depth < CV_32S ? 2 : depth < CV_32F ? 4 : 16;
+ return depth <= CV_32S ? 2 : depth < CV_64F ? 1e-5 : 1e-12;
}
};
else
cvtest::logicOp(src[0], src[1], dst, opcode);
}
- int getMaxErr(int depth)
+ double getMaxErr(int depth)
{
return 0;
}
else
cvtest::logicOp(src[0], gamma, dst, opcode);
}
- int getMaxErr(int)
+ double getMaxErr(int)
{
return 0;
}
{
cvtest::min(src[0], src[1], dst);
}
- int getMaxErr(int depth)
+ double getMaxErr(int depth)
{
return 0;
}
{
cvtest::max(src[0], src[1], dst);
}
- int getMaxErr(int depth)
+ double getMaxErr(int depth)
{
return 0;
}
{
cvtest::min(src[0], gamma[0], dst);
}
- int getMaxErr(int depth)
+ double getMaxErr(int depth)
{
return 0;
}
{
cvtest::max(src[0], gamma[0], dst);
}
- int getMaxErr(int depth)
+ double getMaxErr(int depth)
{
return 0;
}
return cvtest::randomType(rng, cvtest::TYPE_MASK_ALL_BUT_8S, 1, 1);
}
- int getMaxErr(int)
+ double getMaxErr(int)
{
return 0;
}
{
return cvtest::randomType(rng, cvtest::TYPE_MASK_ALL_BUT_8S, 1, 1);
}
- int getMaxErr(int)
+ double getMaxErr(int)
{
return 0;
}
{
return cvtest::randomType(rng, cvtest::TYPE_MASK_ALL, 1, ARITHM_MAX_CHANNELS);
}
- int getMaxErr(int)
+ double getMaxErr(int)
{
return 0;
}
{
return cvtest::randomType(rng, cvtest::TYPE_MASK_ALL, 1, ARITHM_MAX_CHANNELS);
}
- int getMaxErr(int)
+ double getMaxErr(int)
{
return 0;
}
{
cvtest::inRangeS(src[0], gamma, gamma1, dst);
}
- int getMaxErr(int)
+ double getMaxErr(int)
{
return 0;
}
cvtest::inRange(src[0], lb, rb, dst);
}
- int getMaxErr(int)
+ double getMaxErr(int)
{
return 0;
}
ddepth = cvtest::randomType(rng, cvtest::TYPE_MASK_ALL, 1, 1);
return srctype;
}
- int getMaxErr(int)
+ double getMaxErr(int)
{
- return ddepth <= CV_32S ? 2 : ddepth < CV_64F ? (1 << 14) : (1 << 18);
+ return ddepth <= CV_32S ? 2 : ddepth < CV_64F ? 1e-4 : 1e-12;
}
void generateScalars(int depth, RNG& rng)
{
{
cvtest::add(src[0], alpha, Mat(), 0, Scalar::all(gamma[0]), dst, CV_8UC(src[0].channels()), true);
}
+ double getMaxErr(int)
+ {
+ return 1;
+ }
void generateScalars(int depth, RNG& rng)
{
if( rng.uniform(0, 2) )
{
flipcode = rng.uniform(0, 3) - 1;
}
- int getMaxErr(int)
+ double getMaxErr(int)
{
return 0;
}
{
cvtest::transpose(src[0], dst);
}
- int getMaxErr(int)
+ double getMaxErr(int)
{
return 0;
}
{
cvtest::setIdentity(dst, gamma);
}
- int getMaxErr(int)
+ double getMaxErr(int)
{
return 0;
}
{
cvtest::set(dst, Scalar::all(0));
}
- int getMaxErr(int)
+ double getMaxErr(int)
{
return 0;
}
{
cvtest::exp(src[0], dst);
}
- int getMaxErr(int)
+ double getMaxErr(int depth)
{
- return (1<<10);
+ return depth == CV_32F ? 1e-5 : 1e-12;
}
};
cvtest::exp(src[0], temp);
cvtest::log(temp, dst);
}
- int getMaxErr(int)
+ double getMaxErr(int depth)
{
- return (1<<10);
+ return depth == CV_32F ? 1e-5 : 1e-12;
}
};
{
angleInDegrees = rng.uniform(0, 2) != 0;
}
- int getMaxErr(int)
+ double getMaxErr(int)
{
- return (1<<10);
+ return 1e-3;
}
bool angleInDegrees;
};
dst.create(1, 1, CV_64FC4);
dst.at<Scalar>(0,0) = cvtest::mean(src[0], mask);
}
- int getMaxErr(int)
+ double getMaxErr(int)
{
- return (1<<13);
+ return 1e-6;
}
};
dst.create(1, 1, CV_64FC4);
dst.at<Scalar>(0,0) = cvtest::mean(src[0])*(double)src[0].total();
}
- int getMaxErr(int)
+ double getMaxErr(int)
{
- return (1<<13);
+ return 1e-6;
}
};
dst.create(1, 1, CV_32S);
dst.at<int>(0,0) = saturate_cast<int>(cvtest::mean(temp)[0]/255*temp.total());
}
- int getMaxErr(int)
+ double getMaxErr(int)
{
return 0;
}
dst.at<Scalar>(0,0) = mean;
dst.at<Scalar>(0,1) = sqmean;
}
- int getMaxErr(int)
+ double getMaxErr(int)
{
- return (1<<13);
+ return 1e-6;
}
};
{
normType = 1 << rng.uniform(0, 3);
}
- int getMaxErr(int)
+ double getMaxErr(int)
{
- return (1<<13);
+ return 1e-6;
}
int normType;
};
cvtest::minMaxLoc(src[0], &minval, &maxval, &minidx, &maxidx, mask);
saveOutput(minidx, maxidx, minval, maxval, dst);
}
- int getMaxErr(int)
+ double getMaxErr(int)
{
return 0;
}
INSTANTIATE_TEST_CASE_P(Core_Sum, ElemWiseTest, ::testing::Values(ElemWiseOpPtr(new cvtest::SumOp)));
INSTANTIATE_TEST_CASE_P(Core_Norm, ElemWiseTest, ::testing::Values(ElemWiseOpPtr(new cvtest::NormOp)));
INSTANTIATE_TEST_CASE_P(Core_MinMaxLoc, ElemWiseTest, ::testing::Values(ElemWiseOpPtr(new cvtest::MinMaxLocOp)));
-
INSTANTIATE_TEST_CASE_P(Core_CartToPolarToCart, ElemWiseTest, ::testing::Values(ElemWiseOpPtr(new cvtest::CartToPolarToCartOp)));