summaryrefslogtreecommitdiff
path: root/src/process/im_morphology_bin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/process/im_morphology_bin.cpp')
-rw-r--r--src/process/im_morphology_bin.cpp17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/process/im_morphology_bin.cpp b/src/process/im_morphology_bin.cpp
index 9405ff6..4429f7d 100644
--- a/src/process/im_morphology_bin.cpp
+++ b/src/process/im_morphology_bin.cpp
@@ -2,7 +2,7 @@
* \brief Morphology Operations for Binary Images
*
* See Copyright Notice in im_lib.h
- * $Id: im_morphology_bin.cpp,v 1.1 2008/10/17 06:16:33 scuri Exp $
+ * $Id: im_morphology_bin.cpp,v 1.2 2011/04/05 02:35:10 scuri Exp $
*/
@@ -152,8 +152,10 @@ int imProcessBinMorphOpen(const imImage* src_image, imImage* dst_image, int kern
if (!temp)
return 0;
- if (!imProcessBinMorphErode(src_image, temp, kernel_size, iter)) {imImageDestroy(temp); return 0;}
- if (!imProcessBinMorphDilate(temp, dst_image, kernel_size, iter)) {imImageDestroy(temp); return 0;}
+ if (!imProcessBinMorphErode(src_image, temp, kernel_size, iter))
+ {imImageDestroy(temp); return 0;}
+ if (!imProcessBinMorphDilate(temp, dst_image, kernel_size, iter))
+ {imImageDestroy(temp); return 0;}
imImageDestroy(temp);
return 1;
@@ -165,8 +167,10 @@ int imProcessBinMorphClose(const imImage* src_image, imImage* dst_image, int ker
if (!temp)
return 0;
- if (!imProcessBinMorphDilate(src_image, temp, kernel_size, iter)) {imImageDestroy(temp); return 0;}
- if (!imProcessBinMorphErode(temp, dst_image, kernel_size, iter)) {imImageDestroy(temp); return 0;}
+ if (!imProcessBinMorphDilate(src_image, temp, kernel_size, iter))
+ {imImageDestroy(temp); return 0;}
+ if (!imProcessBinMorphErode(temp, dst_image, kernel_size, iter))
+ {imImageDestroy(temp); return 0;}
imImageDestroy(temp);
return 1;
@@ -174,7 +178,8 @@ int imProcessBinMorphClose(const imImage* src_image, imImage* dst_image, int ker
int imProcessBinMorphOutline(const imImage* src_image, imImage* dst_image, int kernel_size, int iter)
{
- if (!imProcessBinMorphErode(src_image, dst_image, kernel_size, iter)) return 0;
+ if (!imProcessBinMorphErode(src_image, dst_image, kernel_size, iter))
+ return 0;
imProcessArithmeticOp(src_image, dst_image, dst_image, IM_BIN_DIFF);
return 1;
}