cnts,_ = cv2.findContours(cv.rectangle(img3.copy(), (0,200) , (5000, 1150), (255,0,0), 2) ,cv2.RETR_TREE, cv2.CHAIN_APPROX_SIMPLE) cv2.drawContours(rgb_img, cnts, -1, (0,255,0), 2) conts = imutils.grab_contours(cnts) c = max(conts, key=cv2.contourArea) I'm trying to find the contours of two irregular edges in between the image. Else the rectangular actual edge of the image is being detected as contour max area. So i thought of using a rectangular area where I want it to exactly detect the edges. Continue reading...