From 1304b62f6ea6e41a484b07e4c28252a93cd67b1f Mon Sep 17 00:00:00 2001 From: Julien Lengrand-Lambert Date: Sun, 27 Nov 2011 00:28:32 +0100 Subject: [PATCH] Coorects error in tests. Function shnould be ok now. To be tested, with some input images. Example file to be written. --- tippy/segmentations.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tippy/segmentations.py b/tippy/segmentations.py index 1bdd56a..05936fa 100644 --- a/tippy/segmentations.py +++ b/tippy/segmentations.py @@ -20,7 +20,7 @@ def simple_region_growing(img, seed, threshold=1): """ # img test - if not(img.depth is cv.IPL_DEPTH_8U): + if not(img.depth == cv.IPL_DEPTH_8U): raise TypeError("(%s) 8U image expected!" % (sys._getframe().f_code.co_name)) elif not(img.nChannels is 1): raise TypeError("(%s) 1C image expected!" % (sys._getframe().f_code.co_name)) @@ -83,7 +83,7 @@ def simple_region_growing(img, seed, threshold=1): #updating seed cur_pix = contour[index] - #removing pixel from neigbourhood + #removing pixel from neigborhood del contour[index] del contour_val[index]