From d86250c0f0db4b1d571eb71d32b19907485d655b Mon Sep 17 00:00:00 2001 From: Petros Liakopoulos Date: Wed, 25 Sep 2024 13:18:46 +0200 Subject: [PATCH] minor bug fix infer_roi --- hoverfast/utils_roi.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hoverfast/utils_roi.py b/hoverfast/utils_roi.py index 789a95d..49d3def 100755 --- a/hoverfast/utils_roi.py +++ b/hoverfast/utils_roi.py @@ -197,7 +197,7 @@ def region_feature_roi(region,output_mask,dist, marker, opening,poly_simplify_to for i in range(len(temp)): poly = temp[i] cv2.polylines(img, [poly],-1,color_rgb,width) - cv2.fillPoly(label,[poly],len(features)+i) + cv2.fillPoly(label,[poly],len(features)+i+1) features += [save_poly_dict(poly.astype(float)) for poly in temp] #save to Json with gzip.open(os.path.join(outdir,'json', sname + ".json.gz"), 'wt', encoding="ascii") as zipfile: