求详解opencv中形状匹配matchShapes的代码参数及返回值!

先贴代码

import cv2
import numpy as np

img = cv2.imread('img7.png',0)
img2 = cv2.imread('img9.png',0)

ret, thresh = cv2.threshold(img, 127, 255,0) 
ret, thresh2 = cv2.threshold(img2, 127, 255,0)
im2,contours,hierarchy = cv2.findContours(thresh,2,1)
cnt1 = contours[0]
im2,contours,hierarchy = cv2.findContours(thresh2,2,1)
cnt2 = contours[0]

ret = cv2.matchShapes(cnt1,cnt2,1,0.0)
print( ret )

1.主要是不知道findContours中的3个参数中后两个的含义,
不知道(2,1)与(1,2)是什么意思.
2.findContours的3个返回值的含义

findContours的三个参数如图图片说明matchShapes的三个参数图片说明

https://blog.csdn.net/qq_29796317/article/details/76595280