Exemplo n.º 1
0
        public override HalconDotNet.HRegion GetRegion()
        {
            HalconDotNet.HRegion rgInternal = new HalconDotNet.HRegion();
            rgInternal.GenCircle(_locateRow, _locateCol, _radiusInternal);

            HalconDotNet.HRegion rgExternal = new HalconDotNet.HRegion();
            rgExternal.GenCircle(_locateRow, _locateCol, _radiusExternal);

            HalconDotNet.HRegion rg = new HalconDotNet.HRegion();
            rg.Dispose();

            //计算圆环区域:半径大的圆与半径小的圆之间的差集
            rg = (_radiusExternal > _radiusInternal) ? rgExternal.Difference(rgInternal) : rgInternal.Difference(rgExternal);

            return(rg);
        }
Exemplo n.º 2
0
 public override HalconDotNet.HRegion GetRegion()
 {
     HalconDotNet.HRegion rg = new HalconDotNet.HRegion();
     rg.GenCircle(_locateRow, _locateCol, _radius);
     return(rg);
 }