#include <iostream>
#include <opencv2/opencv.hpp>
#include <opencv2/core.hpp>
#include <opencv2/highgui.hpp>
#include <opencv2/imgproc.hpp>
using namespace std;
using namespace cv;
int main()
{
// 读取图片
Mat img1 = imread("digit.png");
if (img1.empty()) {
cerr << "Error: read image failed! \n"; return -1; }
namedWindow("Input1", WINDOW_AUTOSIZE);
imshow("Input1", img1);
Mat img2 = imread("digitSet.png");
if (img2.empty()) {
cerr << "Error: read image failed! \n"; return -1; }
namedWindow("Input2", WINDOW_AUTOSIZE
轮廓匹配-Hu不变矩匹配实例代码
最新推荐文章于 2025-05-26 20:49:24 发布