private void CreateTable() { this.DT = new DataTable(); this.DT.Columns.Add("No"); this.DT.Columns.Add("PersonID"); this.DT.Columns.Add("PersonType"); this.DT.Columns.Add("PersonNumber"); this.DT.Columns.Add("PersonName"); this.DT.Columns.Add("PersonImage", typeof(Image)); this.DT.Columns.Add("PersonAge"); this.DT.Columns.Add("PersonSex"); foreach (Person current in this._persons) { try { DataRow dataRow = this.DT.NewRow(); dataRow["No"] = this.no; dataRow["PersonID"] = current.ID; dataRow["PersonType"] = current.tmp1; dataRow["PersonNumber"] = current.Number; dataRow["PersonName"] = current.Name; dataRow["PersonImage"] = FaceImageFormat.ByteToBitmap(Convert.FromBase64String(current.Image)); dataRow["PersonAge"] = current.Age; dataRow["PersonSex"] = ((current.Sex == 0L) ? UnitField.Female : UnitField.Male); this.DT.Rows.Add(dataRow); this.no++; } catch { } } }
public FaceCompareUserControl2(ResultInfo _recognition, string Channel) { try { this.InitializeComponent(); object obj = FaceCompareUserControl2._obj; lock (obj) { this.recognition = _recognition; this.label3.Text = string.Format("{0}:{1}", UnitField.PersonName, this.recognition.FaceTemplate.PersonName); this.label2.Text = string.Format("{0}: {1}", UnitField.Date, DateTime.Now.ToString("yyyy-MM-dd HH:mm")); this.pictureBox1.Image = FaceImageFormat.ByteToBitmap(Convert.FromBase64String(this.recognition.FaceTemplate.ImageLocation)); } } catch (Exception) { throw; } }
public new void Load(ResultInfo _recognition, string Channel) { Person person = this._personService.GetPerson(int.Parse(_recognition.FaceTemplate.PersonId)); if (person != null) { this.lbl_Name.Text = person.Name; this.lbl_Number.Text = person.Number; this.lbl_age.Text = person.Age.ToString(); this.lbl_channl.Text = Channel; this.lbl_sex.Text = ((person.Sex == 0L) ? "女" : "男"); this.lbl_persontype.Text = person.tmp1; this.pictureBox1.Image = FaceImageFormat.ByteToBitmap(Convert.FromBase64String(_recognition.FaceTemplate.ImageLocation)); this.pictureBox2.Image = FaceImageFormat.ByteToBitmap(_recognition.FaceImage); this.labelComponent1.set_Text(_recognition.Score.ToString("p")); this.arcScaleRangeBarComponent1.set_Value(new float?(_recognition.Score * 100f)); this.lbl_time.Text = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); } }
private void CreateTable() { this.DT = new DataTable(); this.no = (this._pageIndex - 1) * this.PageSize; this.no = ((this.no == 0) ? 1 : this.no); this.DT.Columns.Add("No"); this.DT.Columns.Add("PersonID"); this.DT.Columns.Add("PersonType"); this.DT.Columns.Add("PersonNumber"); this.DT.Columns.Add("PersonName"); this.DT.Columns.Add("FaceDetcetDate"); this.DT.Columns.Add("FaceTempateImage", typeof(Image)); this.DT.Columns.Add("FaceDetcetImage", typeof(Image)); this.DT.Columns.Add("Similarity"); this.DT.Columns.Add("Chanl"); foreach (FaceCompareLog current in this._faceCompareLogs) { DataRow dataRow = this.DT.NewRow(); dataRow["No"] = this.no; dataRow["PersonID"] = current.PersonID; dataRow["PersonType"] = current.tmp2; dataRow["PersonNumber"] = current.PersonNumber; dataRow["PersonName"] = current.PersonName; dataRow["FaceDetcetDate"] = current.FaceDetcetDate; if (current.FaceTempateImage.Length > 0) { dataRow["FaceTempateImage"] = FaceImageFormat.ByteToBitmap(Convert.FromBase64String(current.FaceTempateImage)); } if (current.FaceDetcetImage.Length > 0) { dataRow["FaceDetcetImage"] = FaceImageFormat.ByteToBitmap(Convert.FromBase64String(current.FaceDetcetImage)); } dataRow["Similarity"] = current.Similarity; dataRow["Chanl"] = current.tmp1; this.DT.Rows.Add(dataRow); this.no++; } }
public FaceCompareUserControl(ResultInfo recognition, string Channel) { if (LanguageSet.Resource != null) { FaceCompareUserControl.UpDataMainFormMenuLanguage(LanguageSet.Resource); uint num = < PrivateImplementationDetails >.ComputeStringHash(Channel); if (num <= 119101069u) { if (num <= 85545831u) { if (num != 1657736u) { if (num != 85545831u) { goto IL_14A; } if (!(Channel == "Channel 1")) { goto IL_14A; } } else { if (!(Channel == "Channel 4")) { goto IL_14A; } goto IL_138; } } else { if (num != 102323450u) { if (num != 119101069u) { goto IL_14A; } if (!(Channel == "Channel 3")) { goto IL_14A; } goto IL_12C; } else { if (!(Channel == "Channel 2")) { goto IL_14A; } goto IL_120; } } } else { if (num <= 1513249643u) { if (num != 1496472024u) { if (num != 1513249643u) { goto IL_14A; } if (!(Channel == "通道3")) { goto IL_14A; } goto IL_12C; } else { if (!(Channel == "通道2")) { goto IL_14A; } goto IL_120; } } else { if (num != 1546804881u) { if (num != 1597137738u) { goto IL_14A; } if (!(Channel == "通道4")) { goto IL_14A; } goto IL_138; } else { if (!(Channel == "通道1")) { goto IL_14A; } } } } FaceCompareUserControl.ChannelName = "C.1"; goto IL_14A; IL_120: FaceCompareUserControl.ChannelName = "C.2"; goto IL_14A; IL_12C: FaceCompareUserControl.ChannelName = "C.3"; goto IL_14A; IL_138: FaceCompareUserControl.ChannelName = "C.4"; } else { FaceCompareUserControl.ChannelName = Channel; } IL_14A: try { this.InitializeComponent(); object obj = FaceCompareUserControl._obj; lock (obj) { this._recognition = recognition; FaceCompareUserControl._personType = this._recognition.FaceTemplate.PersonType; this.label1.Text = string.Format("{0}:{1}", FaceCompareUserControl.Similar, this._recognition.Score.ToString("P")); this.label2.Text = string.Format("{0}:{1}", FaceCompareUserControl.PersonName, this._recognition.FaceTemplate.PersonName); this.label3.Text = string.Format("({0} {1})", FaceCompareUserControl.ChannelName, DateTime.Now.ToString("HH:mm")); this.pictureBox1.Image = FaceImageFormat.ByteToBitmap(Convert.FromBase64String(this._recognition.FaceTemplate.ImageLocation)); this.pictureBox2.Image = FaceImageFormat.ByteToBitmap(this._recognition.FaceImage); } } catch (Exception) { throw; } }
public void Start(byte[] image, string channel) { this._image = new Image <Bgr, byte>(FaceImageFormat.ByteToBitmap(image)); this._channel = channel; this._autoResetEvent.Set(); }
public FaceDetectUserContorl(byte[] image, string Channel) { if (LanguageSet.Resource != null) { uint num = < PrivateImplementationDetails >.ComputeStringHash(Channel); if (num <= 119101069u) { if (num <= 85545831u) { if (num != 1657736u) { if (num != 85545831u) { goto IL_140; } if (!(Channel == "Channel 1")) { goto IL_140; } } else { if (!(Channel == "Channel 4")) { goto IL_140; } goto IL_12E; } } else { if (num != 102323450u) { if (num != 119101069u) { goto IL_140; } if (!(Channel == "Channel 3")) { goto IL_140; } goto IL_122; } else { if (!(Channel == "Channel 2")) { goto IL_140; } goto IL_116; } } } else { if (num <= 1513249643u) { if (num != 1496472024u) { if (num != 1513249643u) { goto IL_140; } if (!(Channel == "通道3")) { goto IL_140; } goto IL_122; } else { if (!(Channel == "通道2")) { goto IL_140; } goto IL_116; } } else { if (num != 1546804881u) { if (num != 1597137738u) { goto IL_140; } if (!(Channel == "通道4")) { goto IL_140; } goto IL_12E; } else { if (!(Channel == "通道1")) { goto IL_140; } } } } FaceDetectUserContorl.ChannelName = "C.1"; goto IL_140; IL_116: FaceDetectUserContorl.ChannelName = "C.2"; goto IL_140; IL_122: FaceDetectUserContorl.ChannelName = "C.3"; goto IL_140; IL_12E: FaceDetectUserContorl.ChannelName = "C.4"; } else { FaceDetectUserContorl.ChannelName = Channel; } IL_140: this.InitializeComponent(); this.pictureBox1.Image = FaceImageFormat.ByteToBitmap(image); this.label1.Text = string.Format("({0} {1})", FaceDetectUserContorl.ChannelName, DateTime.Now.ToString("HH:mm:ss")); }