Unified handling of InputOutputArrays in Python wrapper generator
This makes arguments of type InputOutputArray required in python unless they have a default value in C++. As result following python functions changes signatures in non-trivial way: * calcOpticalFlowFarneback * calcOpticalFlowPyrLK * calibrateCamera * findContours * findTransformECC * floodFill * kmeans * PCACompute * stereoCalibrate And the following functions become return their modified inputs as a return value: * accumulate * accumulateProduct * accumulateSquare * accumulateWeighted * circle * completeSymm * cornerSubPix * drawChessboardCorners * drawContours * drawDataMatrixCodes * ellipse * fillConvexPoly * fillPoly * filterSpeckles * grabCut * insertChannel * line * patchNaNs * polylines * randn * randShuffle * randu * rectangle * setIdentity * updateMotionHistory * validateDisparity * watershed
This commit is contained in:
@@ -24,7 +24,7 @@ def find_squares(img):
|
||||
bin = cv2.dilate(bin, None)
|
||||
else:
|
||||
retval, bin = cv2.threshold(gray, thrs, 255, cv2.THRESH_BINARY)
|
||||
contours, hierarchy = cv2.findContours(bin, cv2.RETR_LIST, cv2.CHAIN_APPROX_SIMPLE)
|
||||
bin, contours, hierarchy = cv2.findContours(bin, cv2.RETR_LIST, cv2.CHAIN_APPROX_SIMPLE)
|
||||
for cnt in contours:
|
||||
cnt_len = cv2.arcLength(cnt, True)
|
||||
cnt = cv2.approxPolyDP(cnt, 0.02*cnt_len, True)
|
||||
|
Reference in New Issue
Block a user