class CV_EXPORTS SimilarRects
{
public:
SimilarRects(double _eps) : eps(_eps) {}
inline bool operator()(const Rect& r1, const Rect& r2) const
{
double delta = eps*( std::min(r1.width, r2.width) + std::min(r1.height, r2.height))*0.5;
return std::abs(r1.x - r2.x) <= delta &&
std::abs(r1.y - r2.y) <= delta &&
std::abs(r1.x + r1.width - r2.x - r2.width) <= delta &&
std::abs(r1.y + r1.height - r2.y - r2.height) <= delta;
}
double eps;
};
- 对eps*( std::min(r1.width, r2.width) + std::min(r1.height, r2.height))*0.5;进行报错 error2059 2589 分别是::语法错误
- 修改后double delta = eps*( (std::min)(r1.width, r2.width) + (std::min)(r1.height, r2.height))*0.5; 又会报 LNK2001 无法解析的外部符号 "public: __cdecl cv::VideoCapture::VideoCapture(int)" (??0VideoCapture@cv@@QEAA@H@Z)这种错误 求大神们解答