boundary boundary Boundary Boundary boundary (算子名称)
名称
boundary boundary Boundary Boundary boundary — Reduce a region to its boundary.
参数签名
描述
boundary boundary Boundary Boundary Boundary boundary computes the boundary of each input region in
区域 区域 区域 区域 区域 区域 and returns them in RegionBorder RegionBorder RegionBorder RegionBorder regionBorder region_border .
The parameter BoundaryType BoundaryType BoundaryType BoundaryType boundaryType boundary_type determines the type of boundary
computation.
The contour computation is done using morphological operations.
The resulting output regions consist only of the minimal border of the input
regions. Their positions depend on the value of BoundaryType BoundaryType BoundaryType BoundaryType boundaryType boundary_type ,
accepting the following values:
'inner' "inner" "inner" "inner" "inner" "inner" : The contour lies within the original region.
'inner_filled' "inner_filled" "inner_filled" "inner_filled" "inner_filled" "inner_filled" : The contour lies within the original
region, holes in the interior of the input region are suppressed.
Due to algorithm optimization this contours may slightly differ
from corresponding ones obtained with 'inner' "inner" "inner" "inner" "inner" "inner" .
'outer' "outer" "outer" "outer" "outer" "outer" : The contour is one pixel outside of the original
region.
运行信息
多线程类型:可重入(与非独占操作符并行运行)。
多线程作用域:全局(可以从任何线程调用)。
在元组级别自动并行化。
参数表
区域 区域 区域 区域 区域 区域 (input_object) region(-array) → object HRegion HObject HRegion Hobject
Regions for which the boundary is to be computed.
RegionBorder RegionBorder RegionBorder RegionBorder regionBorder region_border (output_object) region(-array) → object HRegion HObject HRegion Hobject *
Resulting boundaries.
BoundaryType BoundaryType BoundaryType BoundaryType boundaryType boundary_type (input_control) string → HTuple str HTuple Htuple (string) (string ) (HString ) (char* )
Boundary type.
Default:
'inner'
"inner"
"inner"
"inner"
"inner"
"inner"
List of values:
'inner' "inner" "inner" "inner" "inner" "inner" , 'inner_filled' "inner_filled" "inner_filled" "inner_filled" "inner_filled" "inner_filled" , 'outer' "outer" "outer" "outer" "outer" "outer"
Example (C++ (HALCON 5.0-10.0))
#include "HalconCpp.h"
using namespace Halcon;
main()
{
HWindow w;
HRegion circ1 = HRegion::GenCircle (20, 10, 10.5);
circ1.Display (w);
w.Click ();
HRegion marg1 = circ1.Boundary ("inner");
w.SetColor ("red");
marg1.Display (w);
w.Click ();
return(0);
}
例程 (C)
/* Intersections of two circles: */
gen_circle(&Circle1,200.0,100.0,100.5);
gen_circle(&Circle2,200.0,150.0,100.5);
boundary(Circle1,&Margin1,"inner");
boundary(Circle2,&Margin2,"inner");
intersection(Margin1,Margin2,&Intersections);
connection(Intersections,&Single);
T_area_center(Single,NULL,&Rows,&Columns);
/* simulation of Mode 'inner' */
void inner(Hobject Region, Hobject *Border)
{
Hobject Smaller;
erosion_circle(Region,&Smaller,1.5);
difference(Region,Smaller,Border);
}
Example (C++ (HALCON 5.0-10.0))
#include "HalconCpp.h"
using namespace Halcon;
main()
{
HWindow w;
HRegion circ1 = HRegion::GenCircle (20, 10, 10.5);
circ1.Display (w);
w.Click ();
HRegion marg1 = circ1.Boundary ("inner");
w.SetColor ("red");
marg1.Display (w);
w.Click ();
return(0);
}
Example (C++ (HALCON 5.0-10.0))
#include "HalconCpp.h"
using namespace Halcon;
main()
{
HWindow w;
HRegion circ1 = HRegion::GenCircle (20, 10, 10.5);
circ1.Display (w);
w.Click ();
HRegion marg1 = circ1.Boundary ("inner");
w.SetColor ("red");
marg1.Display (w);
w.Click ();
return(0);
}
Example (C++ (HALCON 5.0-10.0))
#include "HalconCpp.h"
using namespace Halcon;
main()
{
HWindow w;
HRegion circ1 = HRegion::GenCircle (20, 10, 10.5);
circ1.Display (w);
w.Click ();
HRegion marg1 = circ1.Boundary ("inner");
w.SetColor ("red");
marg1.Display (w);
w.Click ();
return(0);
}
Complexity
Let A be the area of the input region. Then the runtime
complexity for one region is
结果
boundary boundary Boundary Boundary Boundary boundary returns 2 (
H_MSG_TRUE )
if all parameters are correct. The
behavior in case of empty or no input region can be set via:
no region:
set_system('no_object_result',<RegionResult>) set_system("no_object_result",<RegionResult>) SetSystem("no_object_result",<RegionResult>) SetSystem("no_object_result",<RegionResult>) SetSystem("no_object_result",<RegionResult>) set_system("no_object_result",<RegionResult>)
empty region:
set_system('empty_region_result',<RegionResult>) set_system("empty_region_result",<RegionResult>) SetSystem("empty_region_result",<RegionResult>) SetSystem("empty_region_result",<RegionResult>) SetSystem("empty_region_result",<RegionResult>) set_system("empty_region_result",<RegionResult>)
Otherwise, an exception is raised.
可能的前置算子
threshold threshold Threshold Threshold Threshold threshold ,
regiongrowing regiongrowing Regiongrowing Regiongrowing Regiongrowing regiongrowing ,
connection connection Connection Connection Connection connection ,
union1 union1 Union1 Union1 Union1 union1 ,
watersheds watersheds Watersheds Watersheds Watersheds watersheds ,
class_ndim_norm class_ndim_norm ClassNdimNorm ClassNdimNorm ClassNdimNorm class_ndim_norm
可能的后置算子
reduce_domain reduce_domain ReduceDomain ReduceDomain ReduceDomain reduce_domain ,
select_shape select_shape SelectShape SelectShape SelectShape select_shape ,
area_center area_center AreaCenter AreaCenter AreaCenter area_center ,
connection connection Connection Connection Connection connection
可替代算子
dilation_circle dilation_circle DilationCircle DilationCircle DilationCircle dilation_circle ,
erosion_circle erosion_circle ErosionCircle ErosionCircle ErosionCircle erosion_circle ,
difference difference Difference Difference Difference difference
参考其它
fill_up fill_up FillUp FillUp FillUp fill_up
模块
Foundation