Last active
September 27, 2019 14:46
-
-
Save santhalakshminarayana/8a4b3831bdd5ade1ac4e9e35b4b86f73 to your computer and use it in GitHub Desktop.
Medium:Imagetopdf draw closest rectangle
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Draw closest four sided shape around maximum contour which is our | |
#area of interest in image | |
approx_cont=[] | |
for ind in range(len(images_read)): | |
epsilon=0.02*cv2.arcLength(image_conts[ind][max_area_conts[ind]],True) | |
approx=cv2.approxPolyDP(image_conts[ind][max_area_conts[ind]],epsilon,True) | |
approx_cont.append(np.squeeze(approx)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment