diff options
Diffstat (limited to 'src/process/im_morphology_gray.cpp')
-rw-r--r-- | src/process/im_morphology_gray.cpp | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/src/process/im_morphology_gray.cpp b/src/process/im_morphology_gray.cpp index c3c9d45..d064932 100644 --- a/src/process/im_morphology_gray.cpp +++ b/src/process/im_morphology_gray.cpp @@ -2,7 +2,7 @@ * \brief Morphology Operations for Gray Images * * See Copyright Notice in im_lib.h - * $Id: im_morphology_gray.cpp,v 1.1 2008/10/17 06:16:33 scuri Exp $ + * $Id: im_morphology_gray.cpp,v 1.2 2011/04/05 02:35:10 scuri Exp $ */ @@ -180,8 +180,10 @@ int imProcessGrayMorphOpen(const imImage* src_image, imImage* dst_image, int ker if (!temp) return 0; - if (!imProcessGrayMorphErode(src_image, temp, kernel_size)) {imImageDestroy(temp); return 0;} - if (!imProcessGrayMorphDilate(temp, dst_image, kernel_size)) {imImageDestroy(temp); return 0;} + if (!imProcessGrayMorphErode(src_image, temp, kernel_size)) + {imImageDestroy(temp); return 0;} + if (!imProcessGrayMorphDilate(temp, dst_image, kernel_size)) + {imImageDestroy(temp); return 0;} imImageDestroy(temp); return 1; @@ -193,8 +195,10 @@ int imProcessGrayMorphClose(const imImage* src_image, imImage* dst_image, int ke if (!temp) return 0; - if (!imProcessGrayMorphDilate(src_image, temp, kernel_size)) {imImageDestroy(temp); return 0;} - if (!imProcessGrayMorphErode(temp, dst_image, kernel_size)) {imImageDestroy(temp); return 0;} + if (!imProcessGrayMorphDilate(src_image, temp, kernel_size)) + {imImageDestroy(temp); return 0;} + if (!imProcessGrayMorphErode(temp, dst_image, kernel_size)) + {imImageDestroy(temp); return 0;} imImageDestroy(temp); return 1; @@ -202,14 +206,16 @@ int imProcessGrayMorphClose(const imImage* src_image, imImage* dst_image, int ke int imProcessGrayMorphTopHat(const imImage* src_image, imImage* dst_image, int kernel_size) { - if (!imProcessGrayMorphOpen(src_image, dst_image, kernel_size)) return 0; + if (!imProcessGrayMorphOpen(src_image, dst_image, kernel_size)) + return 0; imProcessArithmeticOp(src_image, dst_image, dst_image, IM_BIN_DIFF); return 1; } int imProcessGrayMorphWell(const imImage* src_image, imImage* dst_image, int kernel_size) { - if (!imProcessGrayMorphClose(src_image, dst_image, kernel_size)) return 0; + if (!imProcessGrayMorphClose(src_image, dst_image, kernel_size)) + return 0; imProcessArithmeticOp(src_image, dst_image, dst_image, IM_BIN_DIFF); return 1; } @@ -220,8 +226,10 @@ int imProcessGrayMorphGradient(const imImage* src_image, imImage* dst_image, int if (!temp) return 0; - if (!imProcessGrayMorphDilate(src_image, temp, kernel_size)) {imImageDestroy(temp); return 0;} - if (!imProcessGrayMorphErode(src_image, dst_image, kernel_size)) {imImageDestroy(temp); return 0;} + if (!imProcessGrayMorphDilate(src_image, temp, kernel_size)) + {imImageDestroy(temp); return 0;} + if (!imProcessGrayMorphErode(src_image, dst_image, kernel_size)) + {imImageDestroy(temp); return 0;} imProcessArithmeticOp(temp, dst_image, dst_image, IM_BIN_DIFF); |