From 7f4d4890378a2057680831e9b25b148123fd202f Mon Sep 17 00:00:00 2001 From: Kai-Lun Huang Date: Mon, 26 Aug 2019 14:41:09 +0800 Subject: [PATCH] THRESHOLD contant fix --- example_3/test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/example_3/test.py b/example_3/test.py index 479f346..7268517 100644 --- a/example_3/test.py +++ b/example_3/test.py @@ -19,7 +19,7 @@ def main(): region = np.squeeze(model.predict(feat_scaled[np.newaxis,:])) output = np.zeros(region.shape, dtype=np.uint8) - output[region > 0.5] = 1 + output[region > THRESHOLD] = 1 contours, _ = cv2.findContours(output, cv2.RETR_TREE, cv2.CHAIN_APPROX_SIMPLE) for cnt in contours: