Ejemplo n.º 1
0
        private bool Inspection(CogImage8Grey _SrcImage, CogRectangle _InspArea, bool _IsRotate = false)
        {
            bool _Result = true;

            try
            {
                if (true == _IsRotate)
                {
                    CogRectangleAffine _Area = new CogRectangleAffine();
                    _Area.SetCenterLengthsRotationSkew(_InspArea.CenterX, _InspArea.CenterY, _InspArea.Width, _InspArea.Height, -3.14, 0);
                    IDResults = IDProc.Execute(_SrcImage, _Area);
                }
                else
                {
                    IDResults = IDProc.Execute(_SrcImage, _InspArea);
                }
            }
            catch (Exception ex)
            {
                CLogManager.AddSystemLog(CLogManager.LOG_TYPE.ERR, "InspectionID - Inspection Exception : " + ex.ToString(), CLogManager.LOG_LEVEL.LOW);
                _Result = false;
            }

            return(_Result);
        }
Ejemplo n.º 2
0
 public InspectionID()
 {
     IDProc    = new CogID();
     IDResult  = new CogIDResult();
     IDResults = new CogIDResults();
 }