Пример #1
0
        public MatcherInitResult Initialize()
        {
            MatcherInitResult result = new MatcherInitResult();

            m_SecurityLevel    = SGFPMSecurityLevel.NORMAL;
            sourceMatch        = null;
            m_ImageWidth       = 260;
            m_ImageHeight      = 300;
            m_Dpi              = 500;
            fingerprintManager = new SGFingerPrintManager();

            //SGFPMDeviceName device_name = SGFPMDeviceName.DEV_UNKNOWN;
            int error = fingerprintManager.InitEx(m_ImageWidth, m_ImageHeight, m_Dpi);

            if (error == (Int32)SGFPMError.ERROR_NONE)
            {
                result.Message = "Initialization Success";
                result.Success = true;
            }
            else
            {
                result.Message = "Init() Error " + error;
                return(result);
            }

            if (m_useAnsiTemplate)
            {
                // Set template format to ANSI 378
                error = fingerprintManager.SetTemplateFormat(SGFPMTemplateFormat.ANSI378);
            }
            else
            {
                // Set template format to ISO 19794-2
                error = fingerprintManager.SetTemplateFormat(SGFPMTemplateFormat.ISO19794);
            }

            Int32 max_template_size = 0;

            error = fingerprintManager.GetMaxTemplateSize(ref max_template_size);

            //m_RegMin1 = new Byte[max_template_size];
            //m_RegMin2 = new Byte[max_template_size];
            //m_VrfMin = new Byte[max_template_size];

            _isInitialized = true;
            return(result);
        }
Пример #2
0
        // -----------------------------------------------------------------------------------
        // Main functions for fingerprint recognition management
        // -----------------------------------------------------------------------------------

        // Initializes GrFinger ActiveX and all necessary utilities.
        public MatcherInitResult Initialize()//GrFingerXLib.GrFingerXCtrl grfingerx)
        {
            var result = new MatcherInitResult();

            GriauleCore = new FingerprintCore();
            //Initialize library
            if (!initialized)
            {
                GriauleCore.Initialize();

                if (MatchManager.Mode != MatcherModes.ServerFullCache)
                {
                    // Maybe required for extracting template
                    GriauleCore.CaptureInitialize();
                }

                initialized = true;
            }
            //return (int)axGrFingerXCtrl.CapInitialize();

            result.Success = true;
            return(result);
        }