From a3dda2b5ba481234282bf7a115ebda45161efe6d Mon Sep 17 00:00:00 2001 From: Vinayak Sachan Date: Fri, 27 Oct 2023 23:11:21 +0530 Subject: [PATCH] Fix cv2 issue --- crop_boxes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crop_boxes.py b/crop_boxes.py index c3f36a9..7161397 100644 --- a/crop_boxes.py +++ b/crop_boxes.py @@ -69,7 +69,7 @@ def box_extraction(img_for_box_extraction_path, cropped_dir_path): cv2.imwrite("inter_processing/img_final_bin.jpg",img_final_bin) # Find contours for image, which will detect all the boxes - _, contours, hierarchy = cv2.findContours(img_final_bin, cv2.RETR_TREE, cv2.CHAIN_APPROX_SIMPLE) + contours, hierarchy = cv2.findContours(img_final_bin, cv2.RETR_TREE, cv2.CHAIN_APPROX_SIMPLE) # Sort all the contours by top to bottom. (contours, boundingBoxes) = sort_contours(contours, method="top-to-bottom")