python opencv The judgment point is within the custom contour
spot :point
Range : (x1, y1) And (x2, y2) Formed rectangular outline
x1, y1, x2, y2 = (0, 0, 300, 300)
point = (220, 110)
testContour = np.array([np.array([x1, y1]), np.array([x2, y1]), np.array([x2, y2]), np.array([x1, y2])])
exist = cv2.pointPolygonTest(testContour, point, True)
print("test result: ", exist)