public void CreateEngine() { if (FSDK.FSDKE_OK != FSDK.ActivateLibrary("gyYgVWQTSzjiuGB/hH8dKgg0QrrIuhoHdfUCzD9rY+vru3WRZsaezTX6YWj9osdI/cmxY1NSdLkyWuugMPCxUG7/xNLegHLeaUpzVyKpDkaWL8tJIUsIL7xv9bhmgifPbAyTDuxF3VGxXmHkv/L/MStf9kdXV/A1vVvT93QC4vQ=")) { MessageBox.Show("Please run the License Key Wizard (Start - Luxand - FaceSDK - License Key Wizard)", "Error activating FaceSDK", MessageBoxButtons.OK, MessageBoxIcon.Error); Application.Exit(); } FSDK.InitializeLibrary(); FSDKCam.InitializeCapturing(); string[] cameraList; int count; FSDKCam.GetCameraList(out cameraList, out count); if (0 == count) { MessageBox.Show("Please attach a camera", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); Application.Exit(); } cameraName = cameraList[0]; FSDKCam.VideoFormatInfo[] formatList; FSDKCam.GetVideoFormatList(ref cameraName, out formatList, out count); }
private void Form1_Load(object sender, EventArgs e) { if (FSDK.FSDKE_OK != FSDK.ActivateLibrary("Jl3R1DBC1qVQonaiBAq8gK7KzetXbFb4r+OF1DLzInT3KyXHvgHNLyk2Tymk5G6GBv58/Oqn+SQeOWCQfQASTV1Mcd7RQAsrmW02oOa9lhZsMockPLoEnpsH4W1I0+zmxmUwecWKEep9j4BrYhQWuiA3QcNeQO+tfyLOHASk3+M=")) { MessageBox.Show("Please run the License Key Wizard (Start - Luxand - FaceSDK - License Key Wizard)", "Error activating FaceSDK", MessageBoxButtons.OK, MessageBoxIcon.Error); Application.Exit(); } FSDK.InitializeLibrary(); FSDKCam.InitializeCapturing(); string [] cameraList; int count; FSDKCam.GetCameraList(out cameraList, out count); if (0 == count) { MessageBox.Show("Please attach a camera", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); Application.Exit(); } cameraName = cameraList[0]; // choose the first camera FSDKCam.VideoFormatInfo [] formatList; FSDKCam.GetVideoFormatList(ref cameraName, out formatList, out count); int VideoFormat = 0; // choose a video format pictureBox1.Width = formatList[VideoFormat].Width; pictureBox1.Height = formatList[VideoFormat].Height; this.Width = formatList[VideoFormat].Width + 48; this.Height = formatList[VideoFormat].Height + 96; }
private void Form1_Load(object sender, EventArgs e) { FaceList = new List <TFaceRecord>(); imageList1 = new ImageList(); Size size100x100 = new Size(); size100x100.Height = 100; size100x100.Width = 100; imageList1.ImageSize = size100x100; imageList1.ColorDepth = ColorDepth.Depth24Bit; textBox1.Dock = DockStyle.Bottom; listView1.OwnerDraw = false; listView1.View = View.LargeIcon; listView1.Dock = DockStyle.Right; listView1.LargeImageList = imageList1; textBox1.Text += "Initializing Luxand FaceSDK...\r\n"; if (FSDK.FSDKE_OK != FSDK.ActivateLibrary("Jl3R1DBC1qVQonaiBAq8gK7KzetXbFb4r+OF1DLzInT3KyXHvgHNLyk2Tymk5G6GBv58/Oqn+SQeOWCQfQASTV1Mcd7RQAsrmW02oOa9lhZsMockPLoEnpsH4W1I0+zmxmUwecWKEep9j4BrYhQWuiA3QcNeQO+tfyLOHASk3+M=")) { MessageBox.Show("Please run the License Key Wizard (Start - Luxand - FaceSDK - License Key Wizard)", "Error activating FaceSDK", MessageBoxButtons.OK, MessageBoxIcon.Error); Application.Exit(); } if (FSDK.InitializeLibrary() != FSDK.FSDKE_OK) { MessageBox.Show("Error initializing FaceSDK!", "Error"); } textBox1.Text += "Initialized\r\n"; }
private void Form1_Load(object sender, EventArgs e) { FaceList = new List <TFaceRecord>(); imageList1 = new ImageList(); Size size100x100 = new Size(); size100x100.Height = 100; size100x100.Width = 100; imageList1.ImageSize = size100x100; imageList1.ColorDepth = ColorDepth.Depth24Bit; textBox1.Dock = DockStyle.Bottom; listView1.OwnerDraw = false; listView1.View = View.LargeIcon; listView1.Dock = DockStyle.Right; listView1.LargeImageList = imageList1; textBox1.Text += "Initializing Luxand FaceSDK...\r\n"; if (FSDK.FSDKE_OK != FSDK.ActivateLibrary("aCGamccfB6Uj3vlS7eDEryPnDrTbrZQb77ZHouPl3J8Q7o+BG4PcGevchFjppkWrVa038OU6Fghhy/BJfJV1n82InviCSijl8Vbxb11fs+VrcbSEfpESqjKSJQK8OLCqU0qYDy1oRHLRAg/3CHKCBzP/6IHuamy9Y/aY/xd1E7A=")) { MessageBox.Show("Please run the License Key Wizard (Start - Luxand - FaceSDK - License Key Wizard)", "Error activating FaceSDK", MessageBoxButtons.OK, MessageBoxIcon.Error); Application.Exit(); } if (FSDK.InitializeLibrary() != FSDK.FSDKE_OK) { MessageBox.Show("Error initializing FaceSDK!", "Error"); } textBox1.Text += "Initialized\r\n"; }
public void InitializeCamera(PictureBox pictureBox) { faceRecognitionController = new FaceRecognitionController(); currentPictureBox = pictureBox; if (FSDK.FSDKE_OK != FSDK.ActivateLibrary(Constants.LICENCE_KEY)) { MessageBox.Show(Constants.ERROR_ACTIVATING_FACESDK, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); Application.Exit(); } FSDK.InitializeLibrary(); FSDKCam.InitializeCapturing(); string[] cameraList; int cameraCount; FSDKCam.GetCameraList(out cameraList, out cameraCount); if (cameraCount == 0) { MessageBox.Show(Constants.NO_CAMERA_ERROR, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); Application.Exit(); } cameraName = cameraList[0]; FSDKCam.GetVideoFormatList(ref cameraName, out formatList, out cameraCount); int videoFormat = 0; currentPictureBox.Width = formatList[videoFormat].Width; currentPictureBox.Height = formatList[videoFormat].Height; }
private void Form1_Load(object sender, EventArgs e) { if (FSDK.FSDKE_OK != FSDK.ActivateLibrary("NfCVICqstH2sPcAn6lwNMiUb8SWIK7tX2ovYRPGNYdx+v55mC6uxKvRTfnCcP8M02cV4AAitelp8pN/MNp9/5JYmgk55CYH2nIf5QbYOfnRH3xHrQ+x9VbTKoSIvYFh4JVeS/gZ8X0/YNPPfEzqnNEBa27M1mEc56V1E85KYTCY=")) { MessageBox.Show("Please run the License Key Wizard (Start - Luxand - FaceSDK - License Key Wizard)", "Error activating FaceSDK", MessageBoxButtons.OK, MessageBoxIcon.Error); Application.Exit(); } FSDK.InitializeLibrary(); FSDKCam.InitializeCapturing(); string[] cameraList; int count; FSDKCam.GetCameraList(out cameraList, out count); if (0 == count) { MessageBox.Show("Please attach a camera", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); Application.Exit(); } cameraName = cameraList[0]; FSDKCam.VideoFormatInfo[] formatList; FSDKCam.GetVideoFormatList(ref cameraName, out formatList, out count); this.pictureBox1.Hide(); this.webBrowser1.Hide(); this.panel1.Show(); this.button1.Show(); this.panel2.Hide(); button1.Parent = pictureBox2; button1.BackColor = Color.Transparent; button1.BringToFront(); }
private void Form1_Load(object sender, EventArgs e) { if (FSDK.FSDKE_OK != FSDK.ActivateLibrary("aCGamccfB6Uj3vlS7eDEryPnDrTbrZQb77ZHouPl3J8Q7o+BG4PcGevchFjppkWrVa038OU6Fghhy/BJfJV1n82InviCSijl8Vbxb11fs+VrcbSEfpESqjKSJQK8OLCqU0qYDy1oRHLRAg/3CHKCBzP/6IHuamy9Y/aY/xd1E7A=")) { MessageBox.Show("Please run the License Key Wizard (Start - Luxand - FaceSDK - License Key Wizard)", "Error activating FaceSDK", MessageBoxButtons.OK, MessageBoxIcon.Error); Application.Exit(); } FSDK.InitializeLibrary(); FSDKCam.InitializeCapturing(); string [] cameraList; int count; FSDKCam.GetCameraList(out cameraList, out count); if (0 == count) { MessageBox.Show("Please attach a camera", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); Application.Exit(); } cameraName = cameraList[0]; FSDKCam.VideoFormatInfo [] formatList; FSDKCam.GetVideoFormatList(ref cameraName, out formatList, out count); int VideoFormat = 0; // choose a video format pictureBox1.Width = formatList[VideoFormat].Width; pictureBox1.Height = formatList[VideoFormat].Height; this.Width = formatList[VideoFormat].Width + 48; this.Height = formatList[VideoFormat].Height + 96; }
public Camera() : base() { Child = cameraImage; cameraImage.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; var lic = File.ReadAllText("lux.txt"); if (FSDK.FSDKE_OK == FSDK.ActivateLibrary(lic)) { libIsGood = true; FSDK.InitializeLibrary(); FSDKCam.InitializeCapturing(); Directory.CreateDirectory("Captures"); } TakeSnapshot = new CameraCommand(takeSnapshot, () => { return(camIsGood && progState == PROG_STATE.RUNNING); }); RetryCommand = new CameraCommand(Retry, () => { return(camIsGood && progState == PROG_STATE.CAPTURED); }); }
private void Form1_Load(object sender, EventArgs e) { if (FSDK.FSDKE_OK != FSDK.ActivateLibrary("gyYgVWQTSzjiuGB/hH8dKgg0QrrIuhoHdfUCzD9rY+vru3WRZsaezTX6YWj9osdI/cmxY1NSdLkyWuugMPCxUG7/xNLegHLeaUpzVyKpDkaWL8tJIUsIL7xv9bhmgifPbAyTDuxF3VGxXmHkv/L/MStf9kdXV/A1vVvT93QC4vQ=")) { MessageBox.Show("Please run the License Key Wizard (Start - Luxand - FaceSDK - License Key Wizard)", "Error activating FaceSDK", MessageBoxButtons.OK, MessageBoxIcon.Error); Application.Exit(); } FSDK.InitializeLibrary(); FSDKCam.InitializeCapturing(); string[] cameraList; int count; FSDKCam.GetCameraList(out cameraList, out count); if (0 == count) { MessageBox.Show("Please attach a camera", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); Application.Exit(); } cameraName = cameraList[0]; FSDKCam.VideoFormatInfo[] formatList; FSDKCam.GetVideoFormatList(ref cameraName, out formatList, out count); //int VideoFormat = 0; // choose a video format //pictureBox1.Width = formatList[VideoFormat].Width; //pictureBox1.Height = formatList[VideoFormat].Height; //this.Width = formatList[VideoFormat].Width + 48; //this.Height = formatList[VideoFormat].Height + 96; }
public MainWindow() { FSDK.ActivateLibrary("GTNWg1l8Zs+7uJixJ+eBiTF9s1Iofc2pc6UYstMf2/l/MRBagDqX8gzNqXtX64KspTPaszn6+/WwtSHOVDPBQ/WRYTeUTlNJmu9p8tFSCEGDsPodYiISTxA4uoAGtS1iZ3eTbqWkrupH0dCKEdTQzLatWNz7QaCBLaTmdZvn+zU="); FSDK.InitializeLibrary(); InitializeComponent(); Faces = new List <Face>(); InitialSettings(); }
public MainWindow() { FSDK.ActivateLibrary("GwUHaCIMjj0EMCrjclY4umU1p3AIhphyxoTISrKyWZfaDU7bChTUgkK0adDOzouQSoJ2cSGoeoMvv/p1WUJaY4dWrcvpqxJJeOHMDykV2Qh7M95YPJyuGl+S9AMguxlhZbOzn3HvHMST6EGpOSJMqEFCEafIOawugRQ/lkp5d30="); FSDK.InitializeLibrary(); InitializeComponent(); learningFaces = new List <Face>(); testingFaces = new List <Face>(); ActivationFunction = new ActivationSigmoid(); }
private void Login_Load(object sender, EventArgs e) { label4.Text = uname; // MessageBox.Show(uname); TrackerMemoryFile = path + @"\tracker.dat"; // TrackerMemoryFile = "D:\\tracker.dat"; //con.Open(); //cmd = new SqlCommand("select * from facetb where Name='" + uname + "' ", con); //SqlDataReader dr1 = cmd.ExecuteReader(); //if (dr1.Read()) //{ // byte[] photodat = (byte[])dr1["Image"]; // MemoryStream ms = new MemoryStream(photodat); // File.WriteAllBytes(TrackerMemoryFile, photodat); //} //con.Close(); if (FSDK.FSDKE_OK != FSDK.ActivateLibrary("gyYgVWQTSzjiuGB/hH8dKgg0QrrIuhoHdfUCzD9rY+vru3WRZsaezTX6YWj9osdI/cmxY1NSdLkyWuugMPCxUG7/xNLegHLeaUpzVyKpDkaWL8tJIUsIL7xv9bhmgifPbAyTDuxF3VGxXmHkv/L/MStf9kdXV/A1vVvT93QC4vQ=")) { MessageBox.Show("Please run the License Key Wizard (Start - Luxand - FaceSDK - License Key Wizard)", "Error activating FaceSDK", MessageBoxButtons.OK, MessageBoxIcon.Error); Application.Exit(); } FSDK.InitializeLibrary(); FSDKCam.InitializeCapturing(); string[] cameraList; int count; FSDKCam.GetCameraList(out cameraList, out count); if (0 == count) { MessageBox.Show("Please attach a camera", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); Application.Exit(); } cameraName = cameraList[0]; FSDKCam.VideoFormatInfo[] formatList; FSDKCam.GetVideoFormatList(ref cameraName, out formatList, out count); int VideoFormat = 0; int tracker = 0; // creating a Tracker if (FSDK.FSDKE_OK != FSDK.LoadTrackerMemoryFromFile(ref tracker, TrackerMemoryFile)) // try to load saved tracker state { FSDK.CreateTracker(ref tracker); } }
private void Form1_Load(object sender, EventArgs e) { if (FSDK.FSDKE_OK != FSDK.ActivateLibrary("Jl3R1DBC1qVQonaiBAq8gK7KzetXbFb4r+OF1DLzInT3KyXHvgHNLyk2Tymk5G6GBv58/Oqn+SQeOWCQfQASTV1Mcd7RQAsrmW02oOa9lhZsMockPLoEnpsH4W1I0+zmxmUwecWKEep9j4BrYhQWuiA3QcNeQO+tfyLOHASk3+M=")) { MessageBox.Show("Please run the License Key Wizard (Start - Luxand - FaceSDK - License Key Wizard)", "Error activating FaceSDK", MessageBoxButtons.OK, MessageBoxIcon.Error); Application.Exit(); } FSDK.InitializeLibrary(); }
private void Form1_Load(object sender, EventArgs e) { if (FSDK.FSDKE_OK != FSDK.ActivateLibrary("aCGamccfB6Uj3vlS7eDEryPnDrTbrZQb77ZHouPl3J8Q7o+BG4PcGevchFjppkWrVa038OU6Fghhy/BJfJV1n82InviCSijl8Vbxb11fs+VrcbSEfpESqjKSJQK8OLCqU0qYDy1oRHLRAg/3CHKCBzP/6IHuamy9Y/aY/xd1E7A=")) { MessageBox.Show("Please run the License Key Wizard (Start - Luxand - FaceSDK - License Key Wizard)", "Error activating FaceSDK", MessageBoxButtons.OK, MessageBoxIcon.Error); Application.Exit(); } FSDK.InitializeLibrary(); }
private void MainWindow_Loaded(object sender, RoutedEventArgs e) { if (FSDK.FSDKE_OK != FSDK.ActivateLibrary(@"Free Activation key")) { MessageBox.Show("Please run the License Key Wizard (Start - Luxand - FaceSDK - License Key Wizard)", "Error activating FaceSDK", MessageBoxButton.OK); Close(); } FSDK.InitializeLibrary(); }
//初始化摄像头 private void cameralInit() { //激活FaceSDK if (FSDK.FSDKE_OK != FSDK.ActivateLibrary(@"O5vT1Fmf2KYH3v4rxuEFhXL55hZPjcl/6Y412kbp1WBv9yy5S13/GtYZfTHKlXV+1a4c03NOYEeIzTsRWgVDvf6hHuyR/bD45k1kMH6dzlFsPilgR3UAcZRm01e6fbeQaomfqcVnWyMSKuXqQgCF07onN0xTKUKQKEd7cqSpuPs=")) { MessageBox.Show("Please run the License Key Wizard (Start - Luxand - FaceSDK - License Key Wizard)", "Error activating FaceSDK", MessageBoxButtons.OK, MessageBoxIcon.Error); Application.Exit(); } FSDK.InitializeLibrary(); FSDKCam.InitializeCapturing(); string[] cameraList; //声明摄像头数组列表 int count; //摄像头数量 FSDKCam.GetCameraList(out cameraList, out count); //获取各个摄像头分布及其总数 int countCam = 0; foreach (string cam in cameraList) { //if (cam == @"Logitech HD Webcam C270") if (cam == @"USB2.0 PC CAMERA1" || cam == @"USB2.0 PC CAMERA2") { countCam++; } } if (count < 2) { MessageBox.Show("系统需要连接2个摄像头!", "错误!", MessageBoxButtons.OK, MessageBoxIcon.Error); Application.Exit(); } string cameraName1 = cameraList[0];//读取摄像头,下同 string cameraName2 = cameraList[1]; //backgroundWorker1.RunWorkerAsync();//自动工作函数,一打开就自动开启摄像头进行检测 FSDKCam.VideoFormatInfo[] formatList;//摄像头展现出来的视频格式数组 FSDKCam.GetVideoFormatList(ref cameraName1, out formatList, out count); FSDKCam.GetVideoFormatList(ref cameraName2, out formatList, out count); FSDKCam.SetVideoFormat(ref cameraName1, formatList[0]); FSDKCam.SetVideoFormat(ref cameraName2, formatList[0]); int r1 = FSDKCam.OpenVideoCamera(ref cameraName1, ref cameraHandle1); int r2 = FSDKCam.OpenVideoCamera(ref cameraName2, ref cameraHandle2); if (r1 != FSDK.FSDKE_OK || r2 != FSDK.FSDKE_OK) { MessageBox.Show("开启摄像头失败!", "错误!", MessageBoxButtons.OK, MessageBoxIcon.Error); Application.Exit(); } }
private void Form1_Load(object sender, EventArgs e) { int panel_size = 120; if (FSDK.FSDKE_OK != FSDK.ActivateLibrary("ql0enzjOpt6Eg/bKTjTnmV/CHacZsldzhWFqaWe54rvlnqKxP+QIBGPN6tBluefo7pprgH+pNOxaUy4ZrwJWJsSDlJWcv7N7mZn5c5+8ssAuowWDqMjAn5O9IeheV2kP3VXx0xaVLEGIXcm2p/aERbQQQesBNeoGEHidf7ew2F8=")) { MessageBox.Show("Sytem Error", "System Erorr", MessageBoxButtons.OK, MessageBoxIcon.Error); Application.Exit(); } FSDK.InitializeLibrary(); FSDK.SetFaceDetectionParameters(false, true, 384); }
public static bool ActivateRecognition() { if (FSDK.FSDKE_OK != FSDK.ActivateLibrary("DWysHuomlBcczVM2MQfiz/3WraXb7r+fM0th71X5A9z+gsHn2kpGOgWrVh9D/9sQWlPXO00CFmGMvetl9A+VEr9Y5GVBIccyV32uaZutZjKYH5KB2k87NJAAw6NPkzK0DSQ5b5W7EO0yg2+x4HxpWzPogGyIIYcAHIYY11/YGsU=")) { return(false); } FSDK.InitializeLibrary(); FSDK.SetFaceDetectionParameters(true, true, 384); return(true); }
private void InitializeSDK() { if (FSDK.FSDKE_OK != FSDK.ActivateLibrary("VBsVmYmHr/5JxUlk3q0KHjILz7R3Hb5OEhCQ7KdCg/tPbQqJfAaz8ok/9+iTgDp/KjGjkBi23HeCaUq8KKtKeXXN3xbe+bKfQ8q/3mfG6sad3AGUYDj6E+Qi2pzCWFgb4vqWDB3pLzUw+hnOZ7///CBV63IaB1kh7XF6VCaGtNw=")) { MessageBox.Show("Please run the License Key Wizard (Start - Luxand - FaceSDK - License Key Wizard)", "Error activating FaceSDK", MessageBoxButtons.OK, MessageBoxIcon.Error); } if (FSDK.InitializeLibrary() != FSDK.FSDKE_OK) { MessageBox.Show("Error initializing FaceSDK!", "Error"); } }
private void attendance_Load(object sender, EventArgs e) { //timer1.Enabled = true; // label2.Text = "Current Camera Location" + new Home().location; FSDK.ActivateLibrary("7E92A165BF635F1767BF514733B46E3A4640821E9BD40FE7DCB716BBC33F219B9C8C6B346A8A58DF103DA9C29DE5E6F4E0DADFEDED0A026229DBDA7B6CA5F455"); FSDK.InitializeLibrary(); names = new List <string>(); rooms = new List <string>(); matrics = new List <string>(); Allstudents = new List <string[]>(); pres = new List <string>(); faceTemplates = new List <byte[]>(); new System.Threading.Thread(new System.Threading.ThreadStart(load_XML)).Start(); new System.Threading.Thread(new System.Threading.ThreadStart(load_db)).Start(); // getStreams(); }
private void PersonFrm_Load(object sender, EventArgs e) { this.Location = new Point(Screen.PrimaryScreen.WorkingArea.Width - (Width + 200), Screen.PrimaryScreen.WorkingArea.Height - (Height + 200)); comTitle.SelectedIndex = 0; comSex.SelectedIndex = 0; if (FSDK.FSDKE_OK != FSDK.ActivateLibrary("vzm3vx/iIfmU4NsxPHciqHwP/fdsnVT4vo3MpwZvuI0e3oqsOjq1Gp4CeTC4m963GGJdSFwgR40MB3jdXKvT+IB9uuaFhdTS6Y5kbi/LXu4MqGkNDVHRKcP47VaP/djTvJFOsfP9gxH4qneFm/C5m0jHEzdPTc5O8tPmsC7EOoE=")) { MessageBox.Show("Please run the License Key Wizard (Start - Luxand - FaceSDK - License Key Wizard)", "Error activating FaceSDK", MessageBoxButtons.OK, MessageBoxIcon.Error); Application.Exit(); } FSDK.InitializeLibrary(); FSDK.SetFaceDetectionParameters(true, true, 384); }
public void start() { //if (Fitems.init) MessageBox.Show(Fitems.cameraN.ToString()); if (camera.InvokeRequired) { camera.Invoke(new System.Threading.ThreadStart(start), new object[] { }); Application.DoEvents(); return; } // // FSDK.ActivateLibrary(DBvars.FSDK_KEY[DBvars.FSDK_KEY.Length - 1]); FSDK.InitializeLibrary(); string[] cameraList; int count; FSDKCam.GetCameraList(out cameraList, out count); if (0 == count) { MessageBox.Show("Please attach a camera", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); Application.Exit(); } bool camSel = false; camera.Items.Clear(); for (int i = 0; i < count; i++) { //MessageBox.Show(cameraList[i] + " : " + i.ToString()); camera.Items.Add(cameraList[i]); if (cameraList[i].Contains("USB 2.0 Camera")) { // Fitems.cameraN = i; // camSel = true; // camera.SetSelected(i, true); } if (i == 1) { } Application.DoEvents(); } if (!camSel) { camera.SetSelected(Fitems.cameraN, true); } }
public MainFrm() { InitializeComponent(); if (FSDK.FSDKE_OK != FSDK.ActivateLibrary(Global.LuxandKey)) { MessageBox.Show("Invalid License Key Wizard", "Error activating IDS", MessageBoxButtons.OK, MessageBoxIcon.Error); Application.Exit(); } FSDK.InitializeLibrary(); DisplayCameraOnMenu(); Fx.GetPersons(); //Size = new Size(100, 100); }
private void Iniciar() { if (FSDK.FSDKE_OK != FSDK.ActivateLibrary("gyYgVWQTSzjiuGB/hH8dKgg0QrrIuhoHdfUCzD9rY+vru3WRZsaezTX6YWj9osdI/cmxY1NSdLkyWuugMPCxUG7/xNLegHLeaUpzVyKpDkaWL8tJIUsIL7xv9bhmgifPbAyTDuxF3VGxXmHkv/L/MStf9kdXV/A1vVvT93QC4vQ=")) { MessageBox.Show("Please run the License Key Wizard (Start - Luxand - FaceSDK - License Key Wizard)", "Error activating FaceSDK", MessageBoxButtons.OK, MessageBoxIcon.Error); Application.Exit(); } FSDK.InitializeLibrary(); FSDKCam.InitializeCapturing(); #region Camaras //VERIFICAR CAMARAS, OBTENER LOS NOMBRE Y LA CANTIDAD DE CAMARAS. string[] cameraList; int count; FSDKCam.GetCameraList(out cameraList, out count); if (0 == count) { MessageBox.Show("Please attach a camera", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); Application.Exit(); } cameraName = cameraList[0]; #endregion FSDKCam.VideoFormatInfo[] formatList; FSDKCam.GetVideoFormatList(ref cameraName, out formatList, out count); int VideoFormat = 0; // choose a video format pictureBox1.Width = formatList[VideoFormat].Width; pictureBox1.Height = formatList[VideoFormat].Height; //Debug.WriteLine("Width: " + pictureBox1.Width); //Debug.WriteLine("Height: " + pictureBox1.Height); //this.Width = formatList[VideoFormat].Width + 75; //this.Height = formatList[VideoFormat].Height + 150; //Debug.WriteLine("Width: " + pictureBox1.Width); //Debug.WriteLine("Height: " + pictureBox1.Height); }
private void DaoTao_Load(object sender, EventArgs e) { //Load thư viện lên kiểm tra mã acti if (FSDK.FSDKE_OK != FSDK.ActivateLibrary("iYL71M6OblPn4TOl8nYojjcGvZZaKo4seThAr+xuvRxW4gWSyK6glbCyrkFW9rzP1c/rLZbKCYeO15pjCoWGS9YAmb7i0U0RztaWBCPCdEqxy+YO1p0efMsRgocnVb1RM+Z2IRCMbvHoOQbg8fCZgKJ4wl+/1MfGHJKocXboYJU=")) { MessageBox.Show("Please run the License Key Wizard (Start - Luxand - FaceSDK - License Key Wizard)", "Error activating FaceSDK", MessageBoxButtons.OK, MessageBoxIcon.Error); Application.Exit(); } //Khởi tạo thư viện FSDK.InitializeLibrary(); //khởi tạo cammera FSDKCam.InitializeCapturing(); string[] danhSachCamera; int soLuongCMR; FSDKCam.GetCameraList(out danhSachCamera, out soLuongCMR); if (0 == soLuongCMR) { MessageBox.Show("Please attach a camera", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); Application.Exit(); } TenCamera = danhSachCamera[0]; FSDKCam.VideoFormatInfo[] formatList; FSDKCam.GetVideoFormatList(ref TenCamera, out formatList, out soLuongCMR); int VideoFormat = 0; // choose a video format pictureBox1.Width = formatList[VideoFormat].Width; pictureBox1.Height = formatList[VideoFormat].Height; this.Width = formatList[VideoFormat].Width + 48; this.Height = formatList[VideoFormat].Height + 96; this.MaximumSize = new Size(this.Width, this.Height); this.MinimumSize = new Size(this.Width, this.Height); Thread td = new Thread(nhanDien); td.IsBackground = true; td.Priority = ThreadPriority.Highest; td.Start(); }
public FacesManager() { known_faces_list = new List <Face>(); face_recog_results = new FaceRecognitionResult(); //ACTIVATE THE FACE SDK LIBRARY USING A VALID LICENCE KEY int result = FSDK.ActivateLibrary(LICENSE_KEY); //IF LIBRARY IS ACTIVATED if (result == FSDK.FSDKE_OK) { //INITILIAZE THE LIBARARY Debug.WriteLine("Library activated"); Debug.WriteLine("SIMILARITY THESHOLD=" + SIMILARITY_THRESHOLD); FSDK.InitializeLibrary(); } else { throw new ArgumentException("FSDK Library must be activated with valid key for this to work"); } }
public void CreateDB() { if (FSDK.FSDKE_OK != FSDK.ActivateLibrary("VBsVmYmHr/5JxUlk3q0KHjILz7R3Hb5OEhCQ7KdCg/tPbQqJfAaz8ok/9+iTgDp/KjGjkBi23HeCaUq8KKtKeXXN3xbe+bKfQ8q/3mfG6sad3AGUYDj6E+Qi2pzCWFgb4vqWDB3pLzUw+hnOZ7///CBV63IaB1kh7XF6VCaGtNw=")) { MessageBox.Show("Please run the License Key Wizard (Start - Luxand - FaceSDK - License Key Wizard)", "Error activating FaceSDK", MessageBoxButtons.OK, MessageBoxIcon.Error); } if (FSDK.InitializeLibrary() != FSDK.FSDKE_OK) { MessageBox.Show("Error initializing FaceSDK!", "Error"); } SqlCeEngine en = new SqlCeEngine(stringCon); if (!File.Exists("FaceDB.sdf")) { en.CreateDatabase(); CreateTable(); CreateSettingsTable(); } }
private void Form2_Load(object sender, EventArgs e) { FaceList = new List <TFaceRecord>(); imageList1 = new ImageList(); Size size100x100 = new Size(100, 100); imageList1.ImageSize = size100x100; imageList1.ColorDepth = ColorDepth.Depth24Bit; //textBox1.Dock = DockStyle.Bottom; listView1.OwnerDraw = false; listView1.View = View.LargeIcon; // listView1.Dock = DockStyle.Right; listView1.LargeImageList = imageList1; listView1.Visible = false; this.Width = this.Width - listView1.Width; if (FSDK.FSDKE_OK != FSDK.ActivateLibrary("iYL71M6OblPn4TOl8nYojjcGvZZaKo4seThAr+xuvRxW4gWSyK6glbCyrkFW9rzP1c/rLZbKCYeO15pjCoWGS9YAmb7i0U0RztaWBCPCdEqxy+YO1p0efMsRgocnVb1RM+Z2IRCMbvHoOQbg8fCZgKJ4wl+/1MfGHJKocXboYJU=")) { MessageBox.Show("Lỗi dùng chùa !", "Error ", MessageBoxButtons.OK, MessageBoxIcon.Error); Application.Exit(); } if (FSDK.InitializeLibrary() != FSDK.FSDKE_OK) { MessageBox.Show("Chưa cài đặt được!", "Error"); } if (FaceList.Count != 0) { listView1.Visible = true; for (int i = 0; i < FaceList.Count; i++) { imageList1.Images.Add(FaceList[i].faceImage.ToCLRImage()); string fn = FaceList[i].ImageFileName; listView1.Items.Add((imageList1.Images.Count - 1).ToString(), fn.Split('\\')[fn.Split('\\').Length - 1], i); listView1.SelectedIndices.Clear(); listView1.SelectedIndices.Add(listView1.Items.Count - 1); } } }
private void ActivateFrm_Load(object sender, EventArgs e) { if (FSDK.FSDKE_OK != FSDK.ActivateLibrary(Global.LuxandKey)) { MessageBox.Show("Invalid License Key Wizard", "Error activating IDS", MessageBoxButtons.OK, MessageBoxIcon.Error); Application.Exit(); } FSDK.InitializeLibrary(); FSDKCam.InitializeCapturing(); if (0 == Global.CameraList.Count()) { MessageBox.Show("Please attach a camera", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); Application.Exit(); } cameraName = Global.DefaultCamera.CameraName;// cameraList[cameraHandle]; try { FSDKCam.VideoFormatInfo[] formatList; int count = 0; FSDKCam.GetVideoFormatList(ref cameraName, out formatList, out count); int VideoFormat = 0; // choose a video format imageBox.Width = formatList[VideoFormat].Width; imageBox.Height = formatList[VideoFormat].Height; //Width = formatList[VideoFormat].Width; //Height = formatList[VideoFormat].Height; Refresh(); } catch (Exception n) { } }
private void Form1_Load(object sender, EventArgs e) { listView1.ContextMenuStrip = contextMenuStrip1; if (FSDK.FSDKE_OK != FSDK.ActivateLibrary("iYL71M6OblPn4TOl8nYojjcGvZZaKo4seThAr+xuvRxW4gWSyK6glbCyrkFW9rzP1c/rLZbKCYeO15pjCoWGS9YAmb7i0U0RztaWBCPCdEqxy+YO1p0efMsRgocnVb1RM+Z2IRCMbvHoOQbg8fCZgKJ4wl+/1MfGHJKocXboYJU=")) { MessageBox.Show("Lỗi dùng chùa !", "Lỗi ", MessageBoxButtons.OK, MessageBoxIcon.Error); Application.Exit(); } FSDK.InitializeLibrary(); this.Height = this.Height - groupBox3.Height; groupBox3.Visible = false; imageList2 = new ImageList(); Size size100x100 = new Size(100, 100); imageList2.ImageSize = size100x100; imageList2.ColorDepth = ColorDepth.Depth24Bit; listView2.OwnerDraw = false; listView2.View = View.LargeIcon; listView2.LargeImageList = imageList2; }