diff options
author | scuri <scuri> | 2009-09-28 20:18:52 +0000 |
---|---|---|
committer | scuri <scuri> | 2009-09-28 20:18:52 +0000 |
commit | d2c116c0adc98b18124b6c3cbf2b839d5719444f (patch) | |
tree | 7aaf21298526da5fa1516d15782dc4c8ed1b6fc6 /src/lua5 | |
parent | 9f84f624d3a6be89804a55ddea878f4cdaca6e77 (diff) |
Changed: imProcessPrune renamed to imProcessRemoveByArea, and added a new parameter to select inside or outside the interval.
Diffstat (limited to 'src/lua5')
-rw-r--r-- | src/lua5/im_process.lua | 2 | ||||
-rw-r--r-- | src/lua5/imlua_process.c | 11 |
2 files changed, 7 insertions, 6 deletions
diff --git a/src/lua5/im_process.lua b/src/lua5/im_process.lua index fbe9534..eb9cae6 100644 --- a/src/lua5/im_process.lua +++ b/src/lua5/im_process.lua @@ -131,7 +131,7 @@ end OneSourceOneDest("AnalyzeFindRegions", nil, nil, nil, im.USHORT) OneSourceOneDest("ProcessPerimeterLine") -OneSourceOneDest("ProcessPrune") +OneSourceOneDest("ProcessRemoveByArea") OneSourceOneDest("ProcessFillHoles") OneSourceOneDest("ProcessHoughLines", 180, hough_height, im.GRAY, im.INT) OneSourceOneDest("ProcessHoughLinesDraw") diff --git a/src/lua5/imlua_process.c b/src/lua5/imlua_process.c index 1c0dfc8..fa6dc89 100644 --- a/src/lua5/imlua_process.c +++ b/src/lua5/imlua_process.c @@ -2,7 +2,7 @@ * \brief IM Lua 5 Binding * * See Copyright Notice in im_lib.h - * $Id: imlua_process.c,v 1.6 2009/08/12 04:09:17 scuri Exp $ + * $Id: imlua_process.c,v 1.7 2009/09/28 20:19:09 scuri Exp $ */ #include <memory.h> @@ -441,21 +441,22 @@ static int imluaProcessPerimeterLine (lua_State *L) } /*****************************************************************************\ - im.ProcessPrune(src_image, dst_image, connect, start_size, end_size) + im.ProcessRemoveByArea(src_image, dst_image, connect, start_size, end_size, inside) \*****************************************************************************/ -static int imluaProcessPrune (lua_State *L) +static int imluaProcessRemoveByArea (lua_State *L) { imImage* src_image = imlua_checkimage(L, 1); imImage* dst_image = imlua_checkimage(L, 2); int connect = luaL_checkint(L, 3); int start_size = luaL_checkint(L, 4); int end_size = luaL_checkint(L, 5); + int inside = lua_toboolean(L, 6); imlua_checkcolorspace(L, 1, src_image, IM_BINARY); imlua_match(L, src_image, dst_image); luaL_argcheck(L, (connect == 4 || connect == 8), 3, "invalid connect value, must be 4 or 8"); - imProcessPrune(src_image, dst_image, connect, start_size, end_size); + imProcessRemoveByArea(src_image, dst_image, connect, start_size, end_size, inside); return 0; } @@ -2861,7 +2862,7 @@ static const luaL_reg improcess_lib[] = { {"AnalyzeMeasureHoles", imluaAnalyzeMeasureHoles}, {"ProcessPerimeterLine", imluaProcessPerimeterLine}, - {"ProcessPrune", imluaProcessPrune}, + {"ProcessRemoveByArea", imluaProcessRemoveByArea}, {"ProcessFillHoles", imluaProcessFillHoles}, {"ProcessHoughLines", imluaProcessHoughLines}, |