예제 #1
0
        private void cameraShootHaar(object sender, System.Windows.RoutedEventArgs e)
        {
            Bitmap bt = FaceDetect.emguHaarDetect(imgshoot);

            if (bt != null)
            {
                img_m22.Source = BitmapToBitmapImage(bt);
            }
            else
            {
                MessageBox.Show("未检测到人脸信息");
            }
        }
예제 #2
0
        private void m4detectface(object sender, System.Windows.RoutedEventArgs e)
        {
            st.Start();
            Bitmap bt = FaceDetect.emguHaarDetect(tb_filepath4.Text.Trim());

            st.Stop();
            if (bt != null)
            {
                img_m41.Source = BitmapToBitmapImage(bt);
            }
            else
            {
                MessageBox.Show("未检测到人脸信息");
            }
            lab_time4.Content = String.Format("{0:F02}毫秒", st.ElapsedMilliseconds - lastElsp);
            lastElsp          = st.ElapsedMilliseconds;
        }