• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# HTuple类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中HTuple的典型用法代码示例。如果您正苦于以下问题:C# HTuple类的具体用法?C# HTuple怎么用?C# HTuple使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



HTuple类属于命名空间,在下文中一共展示了HTuple类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: AffineTransImage

 public static void AffineTransImage(ImageBase srcImage, ImageBase dstImage, HTuple row, HTuple col , HTuple ang)
 {
     HTuple hv_HomMat2D=null;
     HObject tempImage = null;
     HOperatorSet.VectorAngleToRigid(srcImage.GetWidth / 2, srcImage.GetHeight / 2, 0 ,row ,col, ang , out hv_HomMat2D);
     HOperatorSet.AffineTransImage(srcImage.GetImage, out tempImage, hv_HomMat2D,"constant", "'false");
     dstImage.CopyImagetoThis(tempImage);
     tempImage.Dispose();
 }
开发者ID:jameschnbass,项目名称:Git_DataBase,代码行数:9,代码来源:GeometricTransformations.cs


示例2: SetPen

 public static void SetPen(HTuple hwindows, HTuple color, HTuple Draw, HTuple LineWidth)//線條參數
 {
     HOperatorSet.SetColor(hwindows, color);
     HOperatorSet.SetDraw(hwindows, Draw);
     HOperatorSet.SetLineWidth(hwindows, LineWidth);
     
 }
开发者ID:jameschnbass,项目名称:Git_DataBase,代码行数:7,代码来源:setSystem.cs


示例3: FitLineResult

 public FitLineResult(double row1, double col1, double row2, double col2)
 {
     this.Row1 = new HTuple(row1);
     this.Col1 = new HTuple(col1);
     this.Row2 = new HTuple(row2);
     this.Col2 = new HTuple(col2);
 }
开发者ID:Joncash,项目名称:HanboAOMClassLibrary,代码行数:7,代码来源:FitLineResult.cs


示例4: MaskWidth

 /*Emphasize
 MaskWidth (input_control)  extent.x → (integer)
 Width of low pass MaskBase.
     Default value: 7
     Suggested values: 3, 5, 7, 9, 11, 15, 21, 25, 31, 39
     Typical range of values: 3 ≤ MaskWidth ≤ 201
     Minimum increment: 2
     Recommended increment: 2
 MaskHeight (input_control)  extent.y → (integer)
 Height of the low pass MaskBase.
     Default value: 7
     Suggested values: 3, 5, 7, 9, 11, 15, 21, 25, 31, 39
     Typical range of values: 3 ≤ MaskHeight ≤ 201
     Minimum increment: 2
     Recommended increment: 2
 Factor (input_control)  real → (real)
 Intensity of contrast emphasis.
     Default value: 1.0
     Suggested values: 0.3, 0.5, 0.7, 1.0, 1.4, 1.8, 2.0
     Typical range of values: 0.0 ≤ Factor ≤ 20.0 (sqrt)
     Minimum increment: 0.01
     Recommended increment: 0.2
     Restriction: (0 < Factor) && (Factor < 20)
 */
 public  void Emphasize(ImageBase src_Image, ImageBase dst_Image,MaskBase maskEmphasize, HTuple factor)
 {
     HObject dst;
     HOperatorSet.Emphasize(src_Image.GetImage, out dst, maskEmphasize.W, maskEmphasize.H, factor);
     dst_Image.CopyImagetoThis(dst);
     dst.Dispose();
 }
开发者ID:jameschnbass,项目名称:Git_DataBase,代码行数:31,代码来源:Enhancenment.cs


示例5: DrawROIline

        public void DrawROIline(HTuple hwindows)//方形
        {
            emptyallparameter();
            HOperatorSet.GenEmptyObj(out ROI);
            SetLine(hwindows, "yellow", "margin", 2);

            HOperatorSet.DrawLine(hwindows, out line_Row1, out line_Column1,                //畫線
                out line_Row2, out line_Column2);

            Row = (line_Row1 + line_Row2) / 2;                                              //線段轉換成矩形(Row、colum)
            Column = (line_Column1 + line_Column2) / 2;

            HOperatorSet.AngleLx(line_Row1, line_Column1, line_Row2, line_Column2,          //線段與垂直線的夾角為何  此角度也是矩形參數理的角度
                out Phi);

            HOperatorSet.DistancePp(line_Row1, line_Column1, line_Row2, line_Column2,       //兩點之間的距離運算
                out line_Distance);

            Length1Rectangle = line_Distance / 2;                                           //線段轉換成矩形(length1)

            HOperatorSet.GenRectangle2(out ROI, Row, Column,                                //產生一個矩形ROI區域(ho_Rectangle)
                Phi, Length1Rectangle, 0);

            HOperatorSet.DispObj(ROI, hwindows);
        }
开发者ID:jameschnbass,项目名称:Git_DataBase,代码行数:25,代码来源:RegionBase_暫停使用.cs


示例6: set_list

        public static void set_list (HTuple hv_RowEdge, HTuple hv_ColumnEdge, HTuple hv_Amplitude, HTuple hv_Distance, System.Windows.Forms.ListView listView) {

            listView.BeginUpdate();   //数据更新,UI暂时挂起,直到EndUpdate绘制控件,可以有效避免闪烁并大大提高加载速度  
            listView.Items.Clear();
            for (int i = 0; i < hv_RowEdge.Length; i++) {

                string i_string = Convert.ToString(i);

                HTuple hv_RowEdge_string;
                HTuple hv_ColumnEdge_string;
                HTuple hv_Amplitude_string;
                HTuple hv_Distance_string;

                HOperatorSet.TupleString(hv_RowEdge, ".7f", out hv_RowEdge_string);
                HOperatorSet.TupleString(hv_ColumnEdge, ".7f", out hv_ColumnEdge_string);
                HOperatorSet.TupleString(hv_Amplitude, ".7f", out hv_Amplitude_string);
                HOperatorSet.TupleString(hv_Distance, ".7f", out hv_Distance_string);

                listView.Items.Add(i_string, i_string, 0);
                listView.Items[i_string].SubItems.Add(hv_RowEdge_string[i]);
                listView.Items[i_string].SubItems.Add(hv_ColumnEdge_string[i]);
                listView.Items[i_string].SubItems.Add(hv_Amplitude_string[i]);

                if(i != hv_RowEdge.Length-1)
                    listView.Items[i_string].SubItems.Add(hv_Distance_string[i]);

            }
            listView.EndUpdate();  //结束数据处理,UI界面一次性绘制。  
        }
开发者ID:jameschnbass,项目名称:Git_DataBase,代码行数:29,代码来源:setlist.cs


示例7: Sigma

 /*CoherenceEnhancingDiff
 Sigma (input_control)  real → (real)
 Smoothing for derivative operator.
     Default value: 0.5
     Suggested values: 0.0, 0.1, 0.5, 1.0
     Restriction: Sigma >= 0
 Rho (input_control)  real → (real)
 Smoothing for diffusion coefficients.
     Default value: 3.0
     Suggested values: 0.0, 1.0, 3.0, 5.0, 10.0, 30.0
     Restriction: Rho >= 0
 Theta (input_control)  real → (real)
 Time step.
     Default value: 0.5
     Suggested values: 0.1, 0.2, 0.3, 0.4, 0.5
     Restriction: (0 < Theta) <= 0.5
 Iterations (input_control)  integer → (integer)
 Number of iterations.
     Default value: 10
     Suggested values: 1, 5, 10, 20, 50, 100, 500
     Restriction: Iterations >= 1
 */
 public  void CoherenceEnhancingDiff(ImageBase src_Image, ImageBase dst_Image, HTuple sigma, HTuple rho, HTuple theta, HTuple iterations)
 {
     HObject dst;
     HOperatorSet.CoherenceEnhancingDiff(src_Image.GetImage, out dst, sigma, rho, theta, iterations);
     dst_Image.CopyImagetoThis(dst);
     dst.Dispose();
 }
开发者ID:jameschnbass,项目名称:Git_DataBase,代码行数:29,代码来源:Enhancenment.cs


示例8: CreateDisplayViewModel

 /// <summary>
 /// 線段的顯示 viewModel
 /// </summary>
 /// <returns></returns>
 public override ResultDisplayViewModel CreateDisplayViewModel()
 {
     HXLDCont edge = new HXLDCont();
     HTuple rows, cols;
     double centerRow = 0.0, centerCol = 0.0;
     double f_ArrowX = 0.0, f_ArrowY = 0.0, s_ArrowX = 0.0, s_ArrowY = 0.0;
     if (Row1.TupleLength() > 0 && Row2.TupleLength() > 0)
     {
         rows = new HTuple(new double[] { Row1, Row2 });
         cols = new HTuple(new double[] { Col1, Col2 });
         centerRow = (Row1.D + Row2.D) / 2.0;
         centerCol = (Col1.D + Col2.D) / 2.0;
         f_ArrowX = Col1;
         f_ArrowY = Row1;
         s_ArrowX = Col2;
         s_ArrowY = Row2;
         edge.GenContourPolygonXld(rows, cols);
     }
     return new ResultDisplayViewModel()
     {
         PositionX = centerCol,
         PositionY = centerRow,
         ImageXLD = edge,
         FirstArrowX = f_ArrowX,
         FirstArrowY = f_ArrowY,
         SecArrowX = s_ArrowX,
         SecArrowY = s_ArrowY,
     };
 }
开发者ID:Joncash,项目名称:HanboAOMClassLibrary,代码行数:33,代码来源:LineResult.cs


示例9: Initialize

 public void Initialize(HImage image, HTuple modelRow, HTuple modelColumn, HTuple modelAngle)
 {
     ho_Image = image;
     hv_AllModelRow = new HTuple(modelRow);
     hv_AllModelColumn = new HTuple(modelColumn);
     hv_AllModelAngle = new HTuple(modelAngle);
 }
开发者ID:Joncash,项目名称:HanboAOMClassLibrary,代码行数:7,代码来源:SDMS_A4.cs


示例10: ZoomImageFactor

 public static void ZoomImageFactor(ImageBase srcImage, ImageBase dstImage, HTuple scaleWidth, HTuple scaleHeight)
 {
     HObject tempImage = null;
     HOperatorSet.ZoomImageFactor(srcImage.GetImage, out tempImage, scaleWidth, scaleHeight, "constant");
     dstImage.CopyImagetoThis(tempImage);
     tempImage.Dispose();
 }
开发者ID:jameschnbass,项目名称:Git_DataBase,代码行数:7,代码来源:GeometricTransformations.cs


示例11: MeasurementFitLine

 public MeasurementFitLine(ROI roi, MeasureAssistant mAssist)
     : base(roi, mAssist)
 {
     mResult = new FitLineResult();
     _cameraOut = new HTuple();
     UpdateMeasure();
 }
开发者ID:Joncash,项目名称:HanboAOMClassLibrary,代码行数:7,代码来源:MeasurementFitLine.cs


示例12: EdgeResult

 /// <summary>
 /// Creates an edge result instance using the passed values.
 /// </summary>
 public EdgeResult(double Nrow, double Ncol,
     double Nampl, double Ndist)
 {
     rowEdge = new HTuple(Nrow);
     colEdge = new HTuple(Ncol);
     amplitude = new HTuple(Nampl);
     distance = new HTuple(Ndist);
 }
开发者ID:Joncash,项目名称:HanboAOMClassLibrary,代码行数:11,代码来源:MeasurementResult.cs


示例13: LineResult

 public LineResult(double row1, double col1, double row2, double col2, double distance)
 {
     this.Row1 = new HTuple(row1);
     this.Col1 = new HTuple(col1);
     this.Row2 = new HTuple(row2);
     this.Col2 = new HTuple(col2);
     this.Distance = new HTuple(distance);
 }
开发者ID:Joncash,项目名称:HanboAOMClassLibrary,代码行数:8,代码来源:LineResult.cs


示例14: Add_Object_disp

 public void Add_Object_disp(HObject obj, HTuple color, HTuple Draw, HTuple LineWidth)
 {
     setObjectdisplay OD = new setObjectdisplay();
     OD.color = color;
     OD.Draw = Draw;
     OD.LineWidth = LineWidth;
     Object_disp.Add(obj);
     setObject_display.Add(OD);
 }
开发者ID:jameschnbass,项目名称:Git_DataBase,代码行数:9,代码来源:ToolWindow.cs


示例15: CircleResult

 public CircleResult(double row, double col, double radius, double startPhi, double EndPhi, string pointOrder)
 {
     this.Row = new HTuple(row);
     this.Col = new HTuple(col);
     this.Radius = new HTuple(radius);
     this.StartPhi = new HTuple(startPhi);
     this.EndPhi = new HTuple(EndPhi);
     this.PointOrder = new HTuple(pointOrder);
 }
开发者ID:Joncash,项目名称:HanboAOMClassLibrary,代码行数:9,代码来源:CircleResult.cs


示例16: Metrology_line

        // Main procedure 
        public void Metrology_line(HTuple Windows,ImageBase IMG)
        {
            // Local iconic variables 

            HObject ho_Image, ho_MeasureConts, ho_Cross;
            HObject ho_line;
            // Local control variables 

            HTuple hv_WindowHandle = new HTuple(), hv_Width = null;
            HTuple hv_Height = null, hv_MetrologyHandle = null, hv_Row1 = null;
            HTuple hv_Column1 = null, hv_Row2 = null, hv_Column2 = null;
            HTuple hv_Index1 = null, hv_Par = null, hv_Rtmp = null;
            HTuple hv_Ctmp = null;
            // Initialize local and output iconic variables 
            HOperatorSet.GenEmptyObj(out ho_Image);
            HOperatorSet.GenEmptyObj(out ho_MeasureConts);
            HOperatorSet.GenEmptyObj(out ho_Cross);
            HOperatorSet.GenEmptyObj(out ho_line);

            ho_Image.Dispose();
            ho_Image = IMG.GetImage.Clone();
            //dev_close_window(...);
            //dev_open_window(...);
            HOperatorSet.DispObj(ho_Image, Windows);
            HOperatorSet.GetImageSize(ho_Image, out hv_Width, out hv_Height);
            HOperatorSet.CreateMetrologyModel(out hv_MetrologyHandle);
            HOperatorSet.SetMetrologyModelImageSize(hv_MetrologyHandle, hv_Width, hv_Height);
            HOperatorSet.DrawLine(Windows, out hv_Row1, out hv_Column1, out hv_Row2,
                out hv_Column2);
            HOperatorSet.AddMetrologyObjectLineMeasure(hv_MetrologyHandle, hv_Row1, hv_Column1,
                hv_Row2, hv_Column2, 20, 5, 1, 10, "measure_transition", "all", out hv_Index1);
            HOperatorSet.ApplyMetrologyModel(ho_Image, hv_MetrologyHandle);
            HOperatorSet.GetMetrologyObjectResult(hv_MetrologyHandle, "all", "all", "result_type",
                "all_param", out hv_Par);
            ho_MeasureConts.Dispose();
            HOperatorSet.GetMetrologyObjectMeasures(out ho_MeasureConts, hv_MetrologyHandle,
                "all", "all", out hv_Rtmp, out hv_Ctmp);
            ho_Cross.Dispose();
            HOperatorSet.GenCrossContourXld(out ho_Cross, hv_Rtmp, hv_Ctmp, 6, (new HTuple(45)).TupleRad()
                );

            HOperatorSet.DispObj(ho_Image, Windows);

            HOperatorSet.SetColor(Windows, "blue");
            HOperatorSet.DispObj(ho_Cross, Windows);

            HOperatorSet.SetColor(Windows, "red");
            ho_line.Dispose();
            HOperatorSet.GenRegionLine(out ho_line, hv_Par.TupleSelect(0), hv_Par.TupleSelect(
                1), hv_Par.TupleSelect(2), hv_Par.TupleSelect(3));
            HOperatorSet.DispObj(ho_line, Windows);

            ho_Image.Dispose();
            ho_MeasureConts.Dispose();
            ho_Cross.Dispose();
            ho_line.Dispose();
        }
开发者ID:jameschnbass,项目名称:Git_DataBase,代码行数:58,代码来源:Metrology.cs


示例17: disp_Measure_rectangle2

        public void disp_Measure_rectangle2(HTuple Window) {

                ho_Cross.Dispose();
            HOperatorSet.SetColor(Window, "blue");                                       //設定顏色及型態
            HOperatorSet.SetDraw(Window, "margin");
            HOperatorSet.GenCrossContourXld(out ho_Cross, hv_RowEdge, hv_ColumnEdge,                    //產生錨點標記十字
                Measure_retangle2 * 2, Measure_Phi);
            
            HOperatorSet.DispObj(ho_Cross, Window);
        }
开发者ID:jameschnbass,项目名称:Git_DataBase,代码行数:10,代码来源:Measure.cs


示例18: eval_caltab_contrast_homogeneity

    /// <summary>
    /// Evaluates the gray value contrast between the marks and the calibration 
    /// plate and the homogeneity of the used illumination.
    /// </summary>
    public void eval_caltab_contrast_homogeneity(HObject ho_Image, 
                                                HObject ho_Marks,
                                                out HTuple hv_Contrast, 
                                                out HTuple hv_ContrastScore, 
                                                out HTuple hv_HomogeneityScore)
    {
        // Local iconic variables

          HObject ho_Region, ho_RegionDilation;

          // Local control variables

          HTuple hv_Number, hv_Min, hv_Max, hv_Range;
          HTuple hv_MinContrast, hv_MaxContrast, hv_DeviationMax;

          // Initialize local and output iconic variables
          HOperatorSet.GenEmptyObj(out ho_Region);
          HOperatorSet.GenEmptyObj(out ho_RegionDilation);

          hv_ContrastScore = 0.0;
          hv_Contrast = 0.0;
          hv_HomogeneityScore = 0.0;
          HOperatorSet.CountObj(ho_Marks, out hv_Number);
          if ((int)(new HTuple(hv_Number.TupleLess(4))) != 0)
          {
          ho_Region.Dispose();
          ho_RegionDilation.Dispose();

          return;
          }
          ho_Region.Dispose();
          HOperatorSet.GenRegionContourXld(ho_Marks, out ho_Region, "margin");
          ho_RegionDilation.Dispose();
          HOperatorSet.DilationCircle(ho_Region, out ho_RegionDilation, 5.5);
          HOperatorSet.MinMaxGray(ho_RegionDilation, ho_Image, 3, out hv_Min, out hv_Max,
          out hv_Range);
          //Calculate contrast score
          hv_Contrast = hv_Range.TupleMean();
          hv_MinContrast = 70;
          hv_MaxContrast = 160;
          if ((int)(new HTuple(hv_Contrast.TupleGreater(hv_MinContrast))) != 0)
          {
          hv_ContrastScore = (hv_Contrast - hv_MinContrast) / (hv_MaxContrast - hv_MinContrast);
          hv_ContrastScore = ((hv_ContrastScore.TupleConcat(1.0))).TupleMin();
          }
          //Now for the homogeneity score
          HOperatorSet.TupleDeviation(hv_Max, out hv_DeviationMax);
          hv_HomogeneityScore = 1.1 - (hv_DeviationMax / 40.0);
          hv_HomogeneityScore = ((((((hv_HomogeneityScore.TupleConcat(1.0))).TupleMin()
          )).TupleConcat(0.0))).TupleMax();
          ho_Region.Dispose();
          ho_RegionDilation.Dispose();

          return;
    }
开发者ID:rtigithub,项目名称:HALCON-12-codelets,代码行数:59,代码来源:QualityProcedures.cs


示例19: GetMpositionSubPix

        public void GetMpositionSubPix(HTuple Window)
        {
            try
            {
                HOperatorSet.GetMpositionSubPix(Window, out row, out col, out Button);
            }
            catch (Exception)
            {

            }
        }
开发者ID:jameschnbass,项目名称:Git_DataBase,代码行数:11,代码来源:PointBase.cs


示例20: ShowImage

        public void ShowImage(HTuple Window)//將圖片顯示在指定的halcon視窗上  輸入變數:HTuple Window(視窗)
        {
            if (Image != null)
            {
                HOperatorSet.ClearWindow(Window);
                HOperatorSet.DispObj(Image, Window);
            }
            else
                MessageBox.Show("Error Image 是空的!");

        }
开发者ID:jameschnbass,项目名称:Git_DataBase,代码行数:11,代码来源:ImageBase.cs



注:本文中的HTuple类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# HUD类代码示例发布时间:2022-05-24
下一篇:
C# HTTPRequestHandle类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap