diff --git a/Wpf_AiSportsMicrospace/Home.xaml b/Wpf_AiSportsMicrospace/Home.xaml index bf34f7d..d2b97a7 100644 --- a/Wpf_AiSportsMicrospace/Home.xaml +++ b/Wpf_AiSportsMicrospace/Home.xaml @@ -2,8 +2,9 @@ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr-namespace:Wpf_AiSportsMicrospace.MyUserControl" + xmlns:gif="http://wpfanimatedgif.codeplex.com" Title="Home" Height="1080" Width="1920" Loaded="Window_Loaded"> - + @@ -27,5 +28,44 @@ Margin="0,250,0,0" Padding="0,100" /> + + + + + + + + + diff --git a/Wpf_AiSportsMicrospace/Home.xaml.cs b/Wpf_AiSportsMicrospace/Home.xaml.cs index e059810..c4ac7b8 100644 --- a/Wpf_AiSportsMicrospace/Home.xaml.cs +++ b/Wpf_AiSportsMicrospace/Home.xaml.cs @@ -24,12 +24,12 @@ using Yztob.AiSports.Postures.Sports; using Yztob.AiSports.Postures.Things; using Yztob.AiSports.Sensors.Abstractions; using Yztob.AiSports.Sensors.Things; - namespace Wpf_AiSportsMicrospace { /// /// Home.xaml 的交互逻辑 /// + /// public partial class Home : Window { private IHumanPredictor _humanPredictor; @@ -37,14 +37,13 @@ namespace Wpf_AiSportsMicrospace private ConcurrentQueue _frameQueue = new(); private CancellationTokenSource _cts = new(); private SportOperate _sportOperate; + public static Uri loadingImage = new Uri("/Resources/Img/Album/1.gif", UriKind.Relative); + public Home() { InitializeComponent(); _humanPredictor = HumanPredictorFactory.Create(HumanPredictorType.SingleHigh); - _objectDetector = ObjectDetectorFactory.CreateSportGoodsDetector(); - _humanGraphicsRenderer = new HumanGraphicsRenderer(); - _humanGraphicsRenderer.DrawLabel = false; //_sports = SportBase.GetSports(); //_detectQueue = new SportDetectionQueue(); @@ -65,22 +64,25 @@ namespace Wpf_AiSportsMicrospace // 默认选中第3张 coverFlow.SelectedIndex = 0; + + + //AnimationBehavior.SetSourceUri(LoadingImage, loadingImage); } private void Window_Loaded(object sender, RoutedEventArgs e) { - _sportOperate = new SportOperate(); - _webcamClient = _sportOperate.CreateRTSP(); + //_sportOperate = new SportOperate(); + //_webcamClient = _sportOperate.CreateRTSP(); - _webcamClient.OnExtractFrame += frame => - { - if (frame != null) - _frameQueue.Enqueue(frame); - }; - _webcamClient.StartExtract(); + //_webcamClient.OnExtractFrame += frame => + //{ + // if (frame != null) + // _frameQueue.Enqueue(frame); + //}; + //_webcamClient.StartExtract(); - StartFrameProcessing(); - coverFlow.ProgressCompleted += CoverFlow_ProgressCompleted; + //StartFrameProcessing(); + //coverFlow.ProgressCompleted += CoverFlow_ProgressCompleted; } private void CoverFlow_ProgressCompleted(CoverFlowItem item) diff --git a/Wpf_AiSportsMicrospace/MyUserControl/CoverFlowControl.xaml b/Wpf_AiSportsMicrospace/MyUserControl/CoverFlowControl.xaml index 0c23299..4f558a1 100644 --- a/Wpf_AiSportsMicrospace/MyUserControl/CoverFlowControl.xaml +++ b/Wpf_AiSportsMicrospace/MyUserControl/CoverFlowControl.xaml @@ -13,7 +13,7 @@ - + diff --git a/Wpf_AiSportsMicrospace/Resources/Img/Album/1.gif b/Wpf_AiSportsMicrospace/Resources/Img/Album/1.gif new file mode 100644 index 0000000..d204eda Binary files /dev/null and b/Wpf_AiSportsMicrospace/Resources/Img/Album/1.gif differ diff --git a/Wpf_AiSportsMicrospace/Resources/Img/Album/2.gif b/Wpf_AiSportsMicrospace/Resources/Img/Album/2.gif new file mode 100644 index 0000000..482a780 Binary files /dev/null and b/Wpf_AiSportsMicrospace/Resources/Img/Album/2.gif differ diff --git a/Wpf_AiSportsMicrospace/Resources/Img/Album/3.gif b/Wpf_AiSportsMicrospace/Resources/Img/Album/3.gif new file mode 100644 index 0000000..fcd87f3 Binary files /dev/null and b/Wpf_AiSportsMicrospace/Resources/Img/Album/3.gif differ diff --git a/Wpf_AiSportsMicrospace/Wpf_AiSportsMicrospace.csproj b/Wpf_AiSportsMicrospace/Wpf_AiSportsMicrospace.csproj index a9b1f33..b21fb99 100644 --- a/Wpf_AiSportsMicrospace/Wpf_AiSportsMicrospace.csproj +++ b/Wpf_AiSportsMicrospace/Wpf_AiSportsMicrospace.csproj @@ -9,13 +9,19 @@ + + + + + + @@ -49,6 +55,7 @@ + @@ -79,12 +86,21 @@ + + Always + Always + + Always + Always + + Always + Always @@ -97,9 +113,18 @@ Always + + Always + Always + + Always + + + Always + Always