Exemple #1
0
 /// <summary>
 /// 其他标签
 /// </summary>
 /// <param name="AnglehObject"></param>
 public static void CheckOtherLable(HObject InImage, out HObject OtherhObject, out HObject OtherhObject1, out HTuple 左边灰度值, out HTuple 右边灰度值)
 {
     HalconCommonFunc.AffineModel(PublicData.CheckModel.checkOtherModel.OtherRegion, out OtherhObject);
     HalconCommonFunc.AffineModel(PublicData.CheckModel.checkOtherModel.OtherRegion1, out OtherhObject1);
     HalconCommonFunc.四周bleblob(InImage, OtherhObject, out 左边灰度值);
     HalconCommonFunc.四周bleblob(InImage, OtherhObject1, out 右边灰度值);
 }
Exemple #2
0
 /// <summary>
 /// 检查大标签
 /// </summary>
 /// <param name="AnglehObject"></param>
 /// <param name="AnglehObject1"></param>
 /// <param name="BigLable"></param>
 public static void CheckBigLable(HObject InImage, out HObject AnglehObject, out HObject AnglehObject1, out HObject IntervalLable,
                                  out HTuple AnglehObjectNumber, out HTuple AnglehObjectNumber1, out HTuple IntervalLableNumber)
 {
     HalconCommonFunc.AffineModel(PublicData.CheckModel.checkBigLableModel.BigLableAngleRegion1, out AnglehObject);
     HalconCommonFunc.AffineModel(PublicData.CheckModel.checkBigLableModel.BigLableAngleRegion2, out AnglehObject1);
     HalconCommonFunc.AffineModel(PublicData.CheckModel.checkBigLableModel.BigLableRegion, out IntervalLable);
     HalconCommonFunc.BigLableblob(InImage, AnglehObject, out AnglehObjectNumber, out HObject Select);
     HalconCommonFunc.BigLableblob(InImage, AnglehObject1, out AnglehObjectNumber1, out HObject Select1);
     HalconCommonFunc.BigLablIntervalLable(InImage, IntervalLable, out IntervalLableNumber, out HObject Select2);
 }
Exemple #3
0
 public static void FindShapedModel(HTuple InWindowHandl, HObject InImage, HTuple ModelID, out HObject TranContours, out HTuple Score)
 {
     HOperatorSet.GenEmptyObj(out TranContours);
     TranContours.Dispose();
     HOperatorSet.GetShapeModelContours(out HObject ho_ModelContours, ModelID, 1);
     HOperatorSet.FindShapeModel(InImage, ModelID, (new HTuple(-90)).TupleRad()
                                 , (new HTuple(180)).TupleRad(), 0.5, 1, 0.5, "least_squares", (new HTuple(4)).TupleConcat(
                                     1), 0.9, out Row, out Column, out Angle, out Score);
     HalconCommonFunc.AffineModelXld(ho_ModelContours,
                                     Row, Column, Angle, Score, out TranContours);
 }
Exemple #4
0
 public void CreateVisualModelAllStep(HTuple InWindowHandle)
 {
     //HalconCommonFunc.DisplayImage(Image, InWindowHandle,pictureBox);
     HalconCommonFunc.DisplayRegionOrXld(ModelRegion, "gray", InWindowHandle, 1);
     HOperatorSet.ReduceDomain(Image, ModelRegion, out HObject imageReduced);
     DetermineShapeModelAtuoParams(imageReduced);
     CreateVisualModel(Image, ModelRegion, out HObject hModelXld, out shapeModelID);
     HalconCommonFunc.DisplayRegionOrXld(hModelXld, "red", InWindowHandle, 1);
     imageReduced.Dispose();
     hModelXld.Dispose();
 }
Exemple #5
0
 /// <summary>
 /// 检查小标签
 /// </summary>
 /// <param name="NothingRegion"></param>
 /// <param name="CircleRegion"></param>
 /// <param name="DistanceRegion1"></param>
 /// <param name="DistanceRegion2"></param>
 public static void CheckSmallLable(HObject InImage, out HObject CircleRegion, out HObject DistanceRegion1, out HObject DistanceRegion2
                                    , out HTuple CircleNumber, out double 标签尺寸1, out double 标签尺寸2, out HObject Edges1, out HObject Edges2)
 {
     //HalconCommonFunc.AffineModel(PublicData.CheckModel.chickMineLableModel.LableNothingRegion, out NothingRegion);
     HalconCommonFunc.AffineModel(PublicData.CheckModel.chickMineLableModel.LableCircleRegion, out CircleRegion);
     HalconCommonFunc.AffineModel(PublicData.CheckModel.chickMineLableModel.LableDistanceRegion1, out DistanceRegion1);
     HalconCommonFunc.AffineModel(PublicData.CheckModel.chickMineLableModel.LableDistanceRegion2, out DistanceRegion2);
     //HalconCommonFunc.SmallLableNothing(InImage, NothingRegion, out NothingRegionNumber, out HObject Select);
     HalconCommonFunc.SmallLableCircle(InImage, CircleRegion, out CircleNumber);
     HalconCommonFunc.SmallLabledistance(InImage, DistanceRegion1, out HTuple Distance1, out Edges1);
     HalconCommonFunc.SmallLabledistance(InImage, DistanceRegion2, out HTuple Distance2, out Edges2);
     标签尺寸1 = Distance1.D / 17.88;
     标签尺寸2 = Distance2.D / 17.88;
 }