changeset 431:e29d66cabc4f

Bug fix in dilate when using non-symmetrical structuring elements
author carandraug
date Mon, 16 Aug 2010 00:40:01 +0000
parents e6fcf4a6e06c
children 1f41e9b97823
files inst/dilate.m
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/inst/dilate.m
+++ b/inst/dilate.m
@@ -65,6 +65,10 @@
   # "Binarize" BW1, just in case image is not [1,0]
   BW1=BW1!=0;
 
+  ## Filtering must be done with the reflection of the structuring element (they
+  ## are not always symmetrical)
+  SE = imrotate(SE, 180);
+
   for i=1:n
     # create result matrix
     BW1=filter2(SE,BW1)>0;