摘要: //纵向拼图 Mat vsource1 = imread("1.bmp"); Mat vsource2 = imread("2.bmp"); Mat vResultSrc; vconcat(vsource1, vsource2 , vResultSrc); //横向拼图 Mat hsource1 = 阅读全文
posted @ 2021-01-14 08:52 doublearmy 阅读(405) 评论(0) 推荐(0) 编辑
摘要: //计算两点之间的距离 double getDistance (Point2f point1, Point2f point2) { double distance = sqrtf(powf((point1.x - point2.x),2) + powf((point1.y - point2.y),2 阅读全文
posted @ 2021-01-14 08:29 doublearmy 阅读(4005) 评论(0) 推荐(0) 编辑
摘要: Mat rotateImg(Mat img, double angle, Point Center) { Mat M = getRotationMatrix2D(Center, angle, 1.0); Mat dst; warpAffine(img, dst, M, Size(img.cols, 阅读全文
posted @ 2021-01-14 08:26 doublearmy 阅读(579) 评论(0) 推荐(0) 编辑
摘要: //进行图像平移 Mat ImageTranslation(Mat srcImage, int xOffset, int yOffset) { Size dst_sz = srcImage.size(); //定义平移矩阵 Mat t_mat = Mat::zeros(2, 3, CV_32FC1) 阅读全文
posted @ 2021-01-14 08:24 doublearmy 阅读(1608) 评论(0) 推荐(1) 编辑
摘要: //计算两个点的角度 double CalculateAngle(Point Mar1Point, Point Mar2Point) { double k = (double)(Mar2Point.y - Mar1Point.y) / (Mar2Point.x - Mar1Point.x); //计 阅读全文
posted @ 2021-01-14 08:23 doublearmy 阅读(1782) 评论(0) 推荐(0) 编辑
摘要: //文件时间比对 bool mtime_compare(QString ser_file, QString local_file) { QFileInfo fileInfo_local(local_file); QFileInfo fileInfo_server(ser_file); if(file 阅读全文
posted @ 2021-01-14 08:20 doublearmy 阅读(1047) 评论(0) 推荐(0) 编辑