예제 #1
0
        //相似度计算

        private void m1SimCaculate(object sender, System.Windows.RoutedEventArgs e)
        {
            if (img_m11.Source != null)
            {
                st.Start();
                tempbt = FaceDetect.SkinSimDetect(tb_filepath.Text.Trim());
                st.Stop();
                img_m12.Source    = BitmapToBitmapImage(tempbt);
                lab_time1.Content = String.Format("{0:F02}毫秒", st.ElapsedMilliseconds);
                lastElsp          = st.ElapsedMilliseconds;
            }
            else
            {
                MessageBox.Show("请先打开一张图片");
            }
        }
예제 #2
0
 /// <summary>
 /// 拍照并检测
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void cameraShoot(object sender, System.Windows.RoutedEventArgs e)
 {
     img_m22.Source = BitmapToBitmapImage(FaceLocate.faceLocate(FaceLocate.ImageBinary(FaceDetect.SkinSimDetect(imgshoot)), imgshoot));
 }