本文整理汇总了C#中HTuple.Clone方法的典型用法代码示例。如果您正苦于以下问题:C# HTuple.Clone方法的具体用法?C# HTuple.Clone怎么用?C# HTuple.Clone使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HTuple
的用法示例。
在下文中一共展示了HTuple.Clone方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Action
public MeasureResult Action()
{
#region 輸出結果
CircleResult mResult = null;
#endregion
// Local iconic variables
HObject ho_R17_Circle = null;
HObject ho_R17_ROI_Image = null, ho_R17_Region = null, ho_R17_ImageReduced = null;
HObject ho_R17_Edges = null, ho_R17_ContoursSplit = null, ho_R17_SingleSegment = null;
HObject ho_R17_ContEllipse = null;
// Local control variables
HTuple hv_msgOffsetY, hv_msgOffsetX;
HTuple hv_STD_Row;
HTuple hv_STD_Col, hv_Img_Row, hv_Img_Col, hv_Img_Rotate_Angle;
HTuple hv_OffsetRow, hv_OffsetCol, hv_STD_R17_Row, hv_STD_R17_Col;
HTuple hv_STD_R17_V_Row, hv_STD_R17_V_Col, hv_R17_X, hv_R17_Y;
HTuple hv_R17_Pos_Row, hv_R17_Pos_Col, hv_R17_R;
HTuple hv_alpha = new HTuple(), hv_R17_low = new HTuple();
HTuple hv_R17_high = new HTuple(), hv_R17_NumSegments = new HTuple();
HTuple hv_NumCircles = new HTuple(), hv_Num_Circle_Point = new HTuple();
HTuple hv_R17 = new HTuple(), hv_i = new HTuple(), hv_Attrib = new HTuple();
HTuple hv_R17_Row = new HTuple(), hv_R17_Column = new HTuple();
HTuple hv_R17_Radius = new HTuple(), hv_R17_StartPhi = new HTuple();
HTuple hv_R17_EndPhi = new HTuple(), hv_R17_PointOrder = new HTuple();
HTuple hv_R17_MinDist = new HTuple(), hv_R17_MaxDist = new HTuple();
HTuple hv_R17_AvgDist = new HTuple(), hv_R17_SigmaDist = new HTuple();
// Initialize local and output iconic variables
HOperatorSet.GenEmptyObj(out ho_R17_Circle);
HOperatorSet.GenEmptyObj(out ho_R17_ROI_Image);
HOperatorSet.GenEmptyObj(out ho_R17_Region);
HOperatorSet.GenEmptyObj(out ho_R17_ImageReduced);
HOperatorSet.GenEmptyObj(out ho_R17_Edges);
HOperatorSet.GenEmptyObj(out ho_R17_ContoursSplit);
HOperatorSet.GenEmptyObj(out ho_R17_SingleSegment);
HOperatorSet.GenEmptyObj(out ho_R17_ContEllipse);
//Measure: SDMS_R17
//Author: John Hsieh
//Date: 2012
// dev_update_off(...); only in hdevelop
HOperatorSet.SetSystem("border_shape_models", "false");
//****Message Args
hv_msgOffsetY = 100;
hv_msgOffsetX = 100;
//****Model Args
//STD 中心點
hv_STD_Row = 772;
hv_STD_Col = 1003;
//目前圖形 中心點
hv_Img_Row = hv_AllModelRow.Clone();
hv_Img_Col = hv_AllModelColumn.Clone();
//目前圖形 Rotate Angle
hv_Img_Rotate_Angle = hv_AllModelAngle.Clone();
//目前圖形偏移量
hv_OffsetRow = hv_Img_Row - hv_STD_Row;
hv_OffsetCol = hv_Img_Col - hv_STD_Col;
//****Display
if (HDevWindowStack.IsOpen())
{
HOperatorSet.ClearWindow(HDevWindowStack.GetActive());
}
if (HDevWindowStack.IsOpen())
{
HOperatorSet.DispObj(ho_Image, HDevWindowStack.GetActive());
}
//*****R17
//STD R17_ 位置
hv_STD_R17_Row = 802;
hv_STD_R17_Col = 660;
//STD 向量 STD_R17_
hv_STD_R17_V_Row = hv_STD_R17_Row - hv_STD_Row;
hv_STD_R17_V_Col = hv_STD_R17_Col - hv_STD_Col;
//R17_X, R17_Y 分量
hv_R17_X = (hv_STD_R17_V_Col * (hv_Img_Rotate_Angle.TupleCos())) + (hv_STD_R17_V_Row * (hv_Img_Rotate_Angle.TupleSin()
));
hv_R17_Y = (hv_STD_R17_V_Row * (hv_Img_Rotate_Angle.TupleCos())) - (hv_STD_R17_V_Col * (hv_Img_Rotate_Angle.TupleSin()
));
//目前圖形 R17_ 位置
hv_R17_Pos_Row = (hv_STD_Row + hv_R17_Y) + hv_OffsetRow;
hv_R17_Pos_Col = (hv_STD_Col + hv_R17_X) + hv_OffsetCol;
hv_R17_R = 17;
ho_R17_Circle.Dispose();
HOperatorSet.GenCircle(out ho_R17_Circle, hv_R17_Pos_Row, hv_R17_Pos_Col, hv_R17_R);
//.........这里部分代码省略.........
示例2: Action
public MeasureResult Action()
{
#region 輸出結果
CircleResult mResult = null;
#endregion
// Local iconic variables
HObject ho_R3_Circle = null;
HObject ho_R3_ROI_Image = null, ho_R3_Region = null, ho_R3_ImageReduced = null;
HObject ho_R3_Edges = null, ho_R3_ContoursSplit = null, ho_R3_SingleSegment = null;
HObject ho_R3_ContEllipse = null;
// Local control variables
HTuple hv_msgOffsetY, hv_msgOffsetX;
HTuple hv_STD_Row;
HTuple hv_STD_Col, hv_Img_Row, hv_Img_Col, hv_Img_Rotate_Angle;
HTuple hv_OffsetRow, hv_OffsetCol, hv_R3_R;
HTuple hv_STD_R3_Row = new HTuple(), hv_STD_R3_Col = new HTuple();
HTuple hv_STD_R3_V_Row = new HTuple(), hv_STD_R3_V_Col = new HTuple();
HTuple hv_R3_X = new HTuple(), hv_R3_Y = new HTuple(), hv_R3_Pos_Row = new HTuple();
HTuple hv_R3_Pos_Col = new HTuple(), hv_alpha = new HTuple();
HTuple hv_R3_low = new HTuple(), hv_R3_high = new HTuple();
HTuple hv_R3_NumSegments = new HTuple(), hv_NumCircles = new HTuple();
HTuple hv_Num_Circle_Point = new HTuple(), hv_R3 = new HTuple();
HTuple hv_i = new HTuple(), hv_Attrib = new HTuple(), hv_R3_Row = new HTuple();
HTuple hv_R3_Column = new HTuple(), hv_R3_Radius = new HTuple();
HTuple hv_R3_StartPhi = new HTuple(), hv_R3_EndPhi = new HTuple();
HTuple hv_R3_PointOrder = new HTuple(), hv_R3_MinDist = new HTuple();
HTuple hv_R3_MaxDist = new HTuple(), hv_R3_AvgDist = new HTuple();
HTuple hv_R3_SigmaDist = new HTuple();
// Initialize local and output iconic variables
HOperatorSet.GenEmptyObj(out ho_R3_Circle);
HOperatorSet.GenEmptyObj(out ho_R3_ROI_Image);
HOperatorSet.GenEmptyObj(out ho_R3_Region);
HOperatorSet.GenEmptyObj(out ho_R3_ImageReduced);
HOperatorSet.GenEmptyObj(out ho_R3_Edges);
HOperatorSet.GenEmptyObj(out ho_R3_ContoursSplit);
HOperatorSet.GenEmptyObj(out ho_R3_SingleSegment);
HOperatorSet.GenEmptyObj(out ho_R3_ContEllipse);
//Measure: SDMS_R3
//Author: John Hsieh
//Date: 2012
//ho_Image.Dispose();
//HOperatorSet.ReadImage(out ho_Image, "Images/STD.bmp");
//dev_open_window_fit_image(ho_Image, 0, 0, -1, -1, out hv_WindowHandle);
//// dev_update_off(...); only in hdevelop
HOperatorSet.SetSystem("border_shape_models", "false");
//****Message Args
hv_msgOffsetY = 100;
hv_msgOffsetX = 100;
//****Model All
//HOperatorSet.ReadShapeModel("D:/Projects/Halcon/SDMS/SDMS_Measure/Model/MatchingAll.shm",
// out hv_AllModelId);
//ho_AllModelContours.Dispose();
//HOperatorSet.GetShapeModelContours(out ho_AllModelContours, hv_AllModelId, 1);
//HOperatorSet.FindShapeModel(ho_Image, hv_AllModelId, (new HTuple(0)).TupleRad()
// , (new HTuple(360)).TupleRad(), 0.5, 1, 0.5, "least_squares", 6, 0.75, out hv_AllModelRow,
// out hv_AllModelColumn, out hv_AllModelAngle, out hv_AllModelScore);
//****Model Args
//STD 中心點
hv_STD_Row = 772;
hv_STD_Col = 1003;
//目前圖形 中心點
hv_Img_Row = hv_AllModelRow.Clone();
hv_Img_Col = hv_AllModelColumn.Clone();
//目前圖形 Rotate Angle
hv_Img_Rotate_Angle = hv_AllModelAngle.Clone();
//目前圖形偏移量
hv_OffsetRow = hv_Img_Row - hv_STD_Row;
hv_OffsetCol = hv_Img_Col - hv_STD_Col;
//****Display
if (HDevWindowStack.IsOpen())
{
HOperatorSet.ClearWindow(HDevWindowStack.GetActive());
}
if (HDevWindowStack.IsOpen())
{
HOperatorSet.DispObj(ho_Image, HDevWindowStack.GetActive());
}
//*****R3
hv_R3_R = 29;
//STD R3_ 位置
hv_STD_R3_Row = 252;
hv_STD_R3_Col = 1381;
//STD 向量 STD_R3_
hv_STD_R3_V_Row = hv_STD_R3_Row - hv_STD_Row;
//.........这里部分代码省略.........
示例3: Action
/// <summary>
/// 初始化後才能叫用 Action
/// </summary>
public MeasureResult Action()
{
#region 輸出結果, CircleResult or Distance Result
CircleResult mResult = null;
#endregion
// Local iconic variables
HObject ho_R1_Circle = null;
HObject ho_R1_ROI_Image = null, ho_R1_Region = null, ho_R1_ImageReduced = null;
HObject ho_R1_Edges = null, ho_R1_ContoursSplit = null, ho_R1_SingleSegment = null;
//HObject ho_R1_ContEllipse = null;
// Local control variables
HTuple hv_msgOffsetY, hv_msgOffsetX;
//HTuple hv_AllModelId;
HTuple hv_STD_Row;
HTuple hv_STD_Col, hv_Img_Row, hv_Img_Col, hv_Img_Rotate_Angle;
HTuple hv_OffsetRow, hv_OffsetCol, hv_STD_R1_Row, hv_STD_R1_Col;
HTuple hv_STD_R1_V_Row, hv_STD_R1_V_Col, hv_R1_X, hv_R1_Y;
HTuple hv_R1_Pos_Row, hv_R1_Pos_Col, hv_R1_R;
HTuple hv_alpha = new HTuple(), hv_R1_low = new HTuple(), hv_R1_high = new HTuple();
HTuple hv_R1_NumSegments = new HTuple(), hv_NumCircles = new HTuple();
HTuple hv_Num_Circle_Point = new HTuple(), hv_R1 = new HTuple();
HTuple hv_R1_limit = new HTuple(), hv_i = new HTuple(), hv_Attrib = new HTuple();
HTuple hv_R1_Row = new HTuple(), hv_R1_Column = new HTuple();
HTuple hv_R1_Radius = new HTuple(), hv_R1_StartPhi = new HTuple();
HTuple hv_R1_EndPhi = new HTuple(), hv_R1_PointOrder = new HTuple();
HTuple hv_R1_MinDist = new HTuple(), hv_R1_MaxDist = new HTuple();
HTuple hv_R1_AvgDist = new HTuple(), hv_R1_SigmaDist = new HTuple();
HTuple hv_ResultText = new HTuple(), hv_MeasureReasult;
// Initialize local and output iconic variables
//HOperatorSet.GenEmptyObj(out ho_Image);
HOperatorSet.GenEmptyObj(out ho_R1_Circle);
HOperatorSet.GenEmptyObj(out ho_R1_ROI_Image);
HOperatorSet.GenEmptyObj(out ho_R1_Region);
HOperatorSet.GenEmptyObj(out ho_R1_ImageReduced);
HOperatorSet.GenEmptyObj(out ho_R1_Edges);
HOperatorSet.GenEmptyObj(out ho_R1_ContoursSplit);
HOperatorSet.GenEmptyObj(out ho_R1_SingleSegment);
//HOperatorSet.GenEmptyObj(out ho_R1_ContEllipse);
//Measure: SDMS_R1
//Author: John Hsieh
//Date: 2012
//ho_Image.Dispose();
//HOperatorSet.ReadImage(out ho_Image, "D:/Projects/Halcon/SDMS/SDMS_Measure/Images/E-1/E1-1.bmp");
//dev_open_window_fit_image(ho_Image, 0, 0, -1, -1, out hv_WindowHandle);
//dev_update_off ()
// dev_update_window(...); only in hdevelop
HOperatorSet.SetSystem("border_shape_models", "false");
//****Message Args
hv_msgOffsetY = 100;
hv_msgOffsetX = 100;
//****Model All
//HOperatorSet.ReadShapeModel("D:/Projects/Halcon/SDMS/SDMS_Measure/Model/MatchingAll.shm",
// out hv_AllModelId);
//ho_AllModelContours.Dispose();
//HOperatorSet.GetShapeModelContours(out ho_AllModelContours, hv_AllModelId, 1);
//HOperatorSet.FindShapeModel(ho_Image, hv_AllModelId, (new HTuple(0)).TupleRad()
// , (new HTuple(360)).TupleRad(), 0.5, 1, 0.5, "least_squares", 6, 0.75, out hv_AllModelRow,
// out hv_AllModelColumn, out hv_AllModelAngle, out modelScore);
//****Model Args
//STD 中心點
hv_STD_Row = 772;
hv_STD_Col = 1003;
//目前圖形 中心點
hv_Img_Row = hv_AllModelRow.Clone();
hv_Img_Col = hv_AllModelColumn.Clone();
//目前圖形 Rotate Angle
hv_Img_Rotate_Angle = hv_AllModelAngle.Clone();
//目前圖形偏移量
hv_OffsetRow = hv_Img_Row - hv_STD_Row;
hv_OffsetCol = hv_Img_Col - hv_STD_Col;
//****R1
//STD R1_ 位置
hv_STD_R1_Row = 589;
hv_STD_R1_Col = 705;
//STD 向量 STD_R1_
hv_STD_R1_V_Row = hv_STD_R1_Row - hv_STD_Row;
hv_STD_R1_V_Col = hv_STD_R1_Col - hv_STD_Col;
//R1_X, R1_Y 分量
hv_R1_X = (hv_STD_R1_V_Col * (hv_Img_Rotate_Angle.TupleCos())) + (hv_STD_R1_V_Row * (hv_Img_Rotate_Angle.TupleSin()
));
hv_R1_Y = (hv_STD_R1_V_Row * (hv_Img_Rotate_Angle.TupleCos())) - (hv_STD_R1_V_Col * (hv_Img_Rotate_Angle.TupleSin()
//.........这里部分代码省略.........
示例4: Action
public MeasureResult Action()
{
#region 輸出結果
CircleResult mResult = null;
#endregion
// Local iconic variables
HObject ho_R6_Circle = null;
HObject ho_R6_ROI_Image = null, ho_R6_Region = null, ho_R6_RegionBorder = null;
HObject ho_R6_RegionDilation = null, ho_R6_ImageReduced = null;
HObject ho_R6_Edges = null, ho_R6_ContoursSplit = null, ho_R6_SingleSegment = null;
HObject ho_R6_ContEllipse = null;
// Local control variables
HTuple hv_msgOffsetY, hv_msgOffsetX;
HTuple hv_STD_Row;
HTuple hv_STD_Col, hv_Img_Row, hv_Img_Col, hv_Img_Rotate_Angle;
HTuple hv_OffsetRow, hv_OffsetCol, hv_R6;
HTuple hv_STD_R6_Row = new HTuple(), hv_STD_R6_Col = new HTuple();
HTuple hv_STD_R6_V_Row = new HTuple(), hv_STD_R6_V_Col = new HTuple();
HTuple hv_R6_X = new HTuple(), hv_R6_Y = new HTuple(), hv_R6_Pos_Row = new HTuple();
HTuple hv_R6_Pos_Col = new HTuple(), hv_R6_R = new HTuple();
HTuple hv_R6_R_Max = new HTuple(), hv_R6_R_Inc = new HTuple();
HTuple hv_R6_NumSegments = new HTuple(), hv_NumCircles = new HTuple();
HTuple hv_Num_Circle_Point = new HTuple(), hv_i = new HTuple();
HTuple hv_Attrib = new HTuple(), hv_R6_Row = new HTuple();
HTuple hv_R6_Column = new HTuple(), hv_R6_Radius = new HTuple();
HTuple hv_R6_StartPhi = new HTuple(), hv_R6_EndPhi = new HTuple();
HTuple hv_R6_PointOrder = new HTuple(), hv_R6_MinDist = new HTuple();
HTuple hv_R6_MaxDist = new HTuple(), hv_R6_AvgDist = new HTuple();
HTuple hv_R6_SigmaDist = new HTuple();
// Initialize local and output iconic variables
HOperatorSet.GenEmptyObj(out ho_R6_Circle);
HOperatorSet.GenEmptyObj(out ho_R6_ROI_Image);
HOperatorSet.GenEmptyObj(out ho_R6_Region);
HOperatorSet.GenEmptyObj(out ho_R6_RegionBorder);
HOperatorSet.GenEmptyObj(out ho_R6_RegionDilation);
HOperatorSet.GenEmptyObj(out ho_R6_ImageReduced);
HOperatorSet.GenEmptyObj(out ho_R6_Edges);
HOperatorSet.GenEmptyObj(out ho_R6_ContoursSplit);
HOperatorSet.GenEmptyObj(out ho_R6_SingleSegment);
HOperatorSet.GenEmptyObj(out ho_R6_ContEllipse);
//Measure: SDMS_R6
//Author: John Hsieh
//Date: 2012
// dev_update_off(...); only in hdevelop
HOperatorSet.SetSystem("border_shape_models", "false");
//****Message Args
hv_msgOffsetY = 100;
hv_msgOffsetX = 100;
//****Model Args
//STD 中心點
hv_STD_Row = 772;
hv_STD_Col = 1003;
//目前圖形 中心點
hv_Img_Row = hv_AllModelRow.Clone();
hv_Img_Col = hv_AllModelColumn.Clone();
//目前圖形 Rotate Angle
hv_Img_Rotate_Angle = hv_AllModelAngle.Clone();
//目前圖形偏移量
hv_OffsetRow = hv_Img_Row - hv_STD_Row;
hv_OffsetCol = hv_Img_Col - hv_STD_Col;
//****Display
if (HDevWindowStack.IsOpen())
{
HOperatorSet.ClearWindow(HDevWindowStack.GetActive());
}
if (HDevWindowStack.IsOpen())
{
HOperatorSet.DispObj(ho_Image, HDevWindowStack.GetActive());
}
//*****R6
hv_R6 = 999;
//STD R6_ 位置
hv_STD_R6_Row = 1292;
hv_STD_R6_Col = 639;
//STD 向量 STD_R6_
hv_STD_R6_V_Row = hv_STD_R6_Row - hv_STD_Row;
hv_STD_R6_V_Col = hv_STD_R6_Col - hv_STD_Col;
//R6_X, R6_Y 分量
hv_R6_X = (hv_STD_R6_V_Col * (hv_Img_Rotate_Angle.TupleCos())) + (hv_STD_R6_V_Row * (hv_Img_Rotate_Angle.TupleSin()
));
hv_R6_Y = (hv_STD_R6_V_Row * (hv_Img_Rotate_Angle.TupleCos())) - (hv_STD_R6_V_Col * (hv_Img_Rotate_Angle.TupleSin()
));
//目前圖形 R4 位置
hv_R6_Pos_Row = (hv_STD_Row + hv_R6_Y) + hv_OffsetRow;
hv_R6_Pos_Col = (hv_STD_Col + hv_R6_X) + hv_OffsetCol;
//.........这里部分代码省略.........