Beispiel #1
0
        public bool CopyTo(ref CornerParams cornerParams)
        {
            try
            {
                cornerParams.ho_Image           = ho_Image;
                cornerParams.hv_MetrologyHandle = hv_MetrologyHandle;

                cornerParams.hv_Width  = hv_Width;
                cornerParams.hv_Height = hv_Height;

                cornerParams.hv_Row1_Horizon    = hv_Row1_Horizon;
                cornerParams.hv_Column1_Horizon = hv_Column1_Horizon;
                cornerParams.hv_Row2_Horizon    = hv_Row2_Horizon;
                cornerParams.hv_Column2_Horizon = hv_Column2_Horizon;

                cornerParams.hv_MeasureLength1 = hv_MeasureLength1;
                cornerParams.hv_MeasureLength2 = hv_MeasureLength2;

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

                cornerParams.hv_Number = hv_Number;

                cornerParams.hv_Row1_Horizon    = hv_Row1_Horizon;
                cornerParams.hv_Column1_Horizon = hv_Column1_Horizon;
                cornerParams.hv_Row2_Horizon    = hv_Row2_Horizon;
                cornerParams.hv_Column2_Horizon = hv_Column2_Horizon;

                cornerParams.hv_Row1_Vertical    = hv_Row1_Vertical;
                cornerParams.hv_Column1_Vertical = hv_Column1_Vertical;
                cornerParams.hv_Row2_Vertical    = hv_Row2_Vertical;
                cornerParams.hv_Column2_Vertical = hv_Column2_Vertical;

                cornerParams.hv_Model     = hv_Model;
                cornerParams.hv_RegionMin = hv_RegionMin;
                cornerParams.hv_RegionMax = hv_RegionMax;

                errorFlag = false;
                return(true);
            }
            catch (Exception exc)
            {
                errorFlag = true;
                return(false);
            }
        }
Beispiel #2
0
        public CornerDetect()
        {
            InitializeComponent();
            this.ControlBox = false;

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

            cornerParams = new CornerParams();

            Initialize();
        }