diff options
author | scuri <scuri> | 2010-01-22 19:44:05 +0000 |
---|---|---|
committer | scuri <scuri> | 2010-01-22 19:44:05 +0000 |
commit | 8530450bdbc42d17fa32f34e5fef0f980c71439b (patch) | |
tree | e34f3e6057642e6ea93feb1c439df1425496b1cf /src/process/im_analyze.cpp | |
parent | 9e0b6cc2b063749832f1bf49109989917e0a0226 (diff) |
# Fixed: imProcessRemoveByArea inside/outside logic.
Diffstat (limited to 'src/process/im_analyze.cpp')
-rw-r--r-- | src/process/im_analyze.cpp | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/src/process/im_analyze.cpp b/src/process/im_analyze.cpp index 551f043..5a775a0 100644 --- a/src/process/im_analyze.cpp +++ b/src/process/im_analyze.cpp @@ -2,7 +2,7 @@ * \brief Image Analysis * * See Copyright Notice in im_lib.h - * $Id: im_analyze.cpp,v 1.4 2010/01/21 18:24:23 scuri Exp $ + * $Id: im_analyze.cpp,v 1.5 2010/01/22 19:47:56 scuri Exp $ */ @@ -1203,8 +1203,19 @@ void imProcessRemoveByArea(const imImage* image, imImage* NewImage, int connect, if (end_size == 0) end_size = image->width*image->height; - int outside=0; - if (!inside) outside = 1; + int outside; + if (inside) + { + /* remove from inside */ + inside = 0; + outside = 1; + } + else + { + /* remove from outside */ + inside = 1; + outside = 0; + } int* area_data = (int*)malloc(region_count*sizeof(int)); imAnalyzeMeasureArea(region_image, area_data, region_count); |