Exemplo n.º 1
0
        public LineDetect()
        {
            InitializeComponent();

            this.ControlBox = false;

            hv_StartX      = 0;
            hv_StartY      = 0;
            hv_ZoomFactor  = 1;
            hv_ImageWindow = hWindowControl1.HalconID;
            HOperatorSet.HomMat2dIdentity(out hv_XldHomMat2D);

            lineParams = new LineParams();

            Initialize();
        }
Exemplo n.º 2
0
        public bool CopyTo(ref LineParams lineParams)
        {
            try
            {
                lineParams.ho_Image           = ho_Image;
                lineParams.hv_MetrologyHandle = hv_MetrologyHandle;

                lineParams.hv_Width  = hv_Width;
                lineParams.hv_Height = hv_Height;

                lineParams.hv_Row1    = hv_Row1;
                lineParams.hv_Column1 = hv_Column1;
                lineParams.hv_Row2    = hv_Row2;
                lineParams.hv_Column2 = hv_Column2;

                lineParams.hv_MeasureLength1 = hv_MeasureLength1;
                lineParams.hv_MeasureLength2 = hv_MeasureLength2;

                lineParams.hv_MeasureSigma     = hv_MeasureSigma;
                lineParams.hv_MeasureThreshold = hv_MeasureThreshold;
                lineParams.hv_GenParamName     = hv_GenParamName;
                lineParams.hv_GenParamValue    = hv_GenParamValue;
                lineParams.hv_Index            = hv_Index;

                lineParams.hv_Model     = hv_Model;
                lineParams.hv_RegionMin = hv_RegionMin;
                lineParams.hv_RegionMax = hv_RegionMax;

                errorFlag = false;
                return(true);
            }
            catch (Exception exc)
            {
                errorFlag = true;
                return(false);
            }
        }