Skip to content

Commit

Permalink
Fixed a type in 'skeletonize'
Browse files Browse the repository at this point in the history
  • Loading branch information
Ville Tirronen committed May 8, 2013
1 parent b5e60dd commit 4baa436
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CV/Morphology.chs
Expand Up @@ -153,7 +153,7 @@ skeletonize :: Image GrayScale D8 -> Image GrayScale D8
skeletonize i = fst . snd . head . dropWhile (\x -> fst x > 0) . iterate (skeletonize'.snd)
$ (1,(CV.Image.empty (getSize i),i))
skeletonize' :: (Image GrayScale D8, Image GrayScale D8) -> (Int, (Image GrayScale D8, Image GrayScale D8))
skeletonize' (skel,img) = (countNonZero tmp, (tmp, erode se 1 img))
skeletonize' (skel,img) = (IM.countNonZero img, (tmp, erode se 1 img))
where
tmp = unsafeOperateOn img $ openOp se #> IM.notOp #> IM.andOp img Nothing #> IM.orOp skel Nothing
se = structuringElement (3,3) (1,1) CrossShape
Expand Down

0 comments on commit 4baa436

Please sign in to comment.