Commit 2a437641 by 张明

界面跟踪的时候可以切换目标且构图点也随着变化;增加传统深度学习算法切换

parent f9b7edec
...@@ -9,6 +9,6 @@ ...@@ -9,6 +9,6 @@
Icon="logo.ico" Icon="logo.ico"
Title="智能云台跟踪系统" WindowStyle="None"> Title="智能云台跟踪系统" WindowStyle="None">
<Grid Background="Black"> <Grid Background="Black">
<module:MainView Margin="20"></module:MainView> <module:MainView Margin="20" Loaded="MainView_Loaded"></module:MainView>
</Grid> </Grid>
</Window> </Window>
...@@ -55,5 +55,10 @@ namespace VIZ.GimbalAI.Client ...@@ -55,5 +55,10 @@ namespace VIZ.GimbalAI.Client
// 执行退出流程 // 执行退出流程
AppSetup.ShutDown(); AppSetup.ShutDown();
} }
private void MainView_Loaded(object sender, RoutedEventArgs e)
{
}
} }
} }
...@@ -11,6 +11,12 @@ namespace VIZ.GimbalAI.Connection ...@@ -11,6 +11,12 @@ namespace VIZ.GimbalAI.Connection
/// </summary> /// </summary>
public static class AlgorithmPackageSignal public static class AlgorithmPackageSignal
{ {
/// <summary>
/// 算法
/// </summary>
public const string algorithm = "algorithm";
/// <summary> /// <summary>
/// 检测 /// 检测
/// </summary> /// </summary>
......
...@@ -33,6 +33,7 @@ namespace VIZ.GimbalAI.Connection ...@@ -33,6 +33,7 @@ namespace VIZ.GimbalAI.Connection
VideoRenderRectangleMessage msg = new VideoRenderRectangleMessage(); VideoRenderRectangleMessage msg = new VideoRenderRectangleMessage();
msg.signal = package.signal; msg.signal = package.signal;
msg.roi = new Dictionary<int, List<float>>(); msg.roi = new Dictionary<int, List<float>>();
msg.detection_results = new Dictionary<int, List<float>>();
ApplicationDomainEx.MessageManager.Send(msg); ApplicationDomainEx.MessageManager.Send(msg);
} }
......
...@@ -33,6 +33,7 @@ namespace VIZ.GimbalAI.Connection ...@@ -33,6 +33,7 @@ namespace VIZ.GimbalAI.Connection
msg.signal = package.signal; msg.signal = package.signal;
msg.roi = new Dictionary<int, List<float>>(); msg.roi = new Dictionary<int, List<float>>();
msg.roi.Add(0, package.roi); msg.roi.Add(0, package.roi);
msg.detection_results = package.detection_results;
ApplicationDomainEx.MessageManager.Send(msg); ApplicationDomainEx.MessageManager.Send(msg);
} }
......
...@@ -61,6 +61,24 @@ namespace VIZ.GimbalAI.Connection ...@@ -61,6 +61,24 @@ namespace VIZ.GimbalAI.Connection
} }
/// <summary> /// <summary>
/// 发送自动跟踪指令 新老算法
/// </summary>
/// <param name="manager">UDP终结点管理器</param>
/// <param name="id">跟踪目标ID</param>
public static void AutoTracking(UdpEndpointManager manager, int id, List<double> cannyxy)
{
AlgorithmAutoTrackingPackage package = new AlgorithmAutoTrackingPackage();
package.signal = AlgorithmPackageSignal.tracking;
package.mode = AlgorithmPackageMode.auto;
package.scene = ApplicationDomainEx.AlgorithmAutoSetting.Scene.Value;
package.classes = ApplicationDomainEx.AlgorithmAutoSetting.Classes.Where(p => p.IsChecked).Select(p => p.Value).ToList();
package.id = id;
package.cannyxy = cannyxy;
manager.SendJson(package);
}
/// <summary>
/// 发送切换模式指令 /// 发送切换模式指令
/// </summary> /// </summary>
/// <param name="manager">UDP终结点管理器</param> /// <param name="manager">UDP终结点管理器</param>
...@@ -88,6 +106,15 @@ namespace VIZ.GimbalAI.Connection ...@@ -88,6 +106,15 @@ namespace VIZ.GimbalAI.Connection
manager.SendJson(package); manager.SendJson(package);
} }
public static void Algorithm(UdpEndpointManager manager, bool isdeep)
{
AlgorithmAlgPackage package = new AlgorithmAlgPackage();
package.AlgorithmName = "AlgorithmName";
package.IsDeepExercies = isdeep;
manager.SendJson(package);
}
/// <summary> /// <summary>
/// 退出 /// 退出
/// </summary> /// </summary>
......
...@@ -17,5 +17,7 @@ namespace VIZ.GimbalAI.Connection ...@@ -17,5 +17,7 @@ namespace VIZ.GimbalAI.Connection
/// value: 检测目标坐标: x, y, width, height /// value: 检测目标坐标: x, y, width, height
/// </summary> /// </summary>
public Dictionary<int, List<float>> roi { get; set; } public Dictionary<int, List<float>> roi { get; set; }
public Dictionary<int, List<float>> detection_results { get; set; }
} }
} }
...@@ -22,5 +22,7 @@ namespace VIZ.GimbalAI.Connection ...@@ -22,5 +22,7 @@ namespace VIZ.GimbalAI.Connection
/// x, y, width, height /// x, y, width, height
/// </summary> /// </summary>
public List<float> roi { get; set; } public List<float> roi { get; set; }
public Dictionary<int, List<float>> detection_results { get; set; }
} }
} }
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace VIZ.GimbalAI.Connection
{
public class AlgorithmAlgPackage
{
public string AlgorithmName { get; set; }
public bool IsDeepExercies { get; set; }
}
}
...@@ -34,5 +34,9 @@ namespace VIZ.GimbalAI.Connection ...@@ -34,5 +34,9 @@ namespace VIZ.GimbalAI.Connection
/// 跟踪目标编号 /// 跟踪目标编号
/// </summary> /// </summary>
public int id { get; set; } public int id { get; set; }
public List<double> cannyxy { get; set; }
//lg
} }
} }
...@@ -22,5 +22,7 @@ namespace VIZ.GimbalAI.Connection ...@@ -22,5 +22,7 @@ namespace VIZ.GimbalAI.Connection
/// x, y, width, height /// x, y, width, height
/// </summary> /// </summary>
public List<float> roi { get; set; } public List<float> roi { get; set; }
public List<float> detection_results { get; set; }
} }
} }
...@@ -99,6 +99,7 @@ ...@@ -99,6 +99,7 @@
<Compile Include="UDP\Algorithm\Signal\Recv\AlgorithmTargetLostRecvPackage.cs" /> <Compile Include="UDP\Algorithm\Signal\Recv\AlgorithmTargetLostRecvPackage.cs" />
<Compile Include="UDP\Algorithm\Signal\Recv\AlgorithmTrackingRecvPackage.cs" /> <Compile Include="UDP\Algorithm\Signal\Recv\AlgorithmTrackingRecvPackage.cs" />
<Compile Include="UDP\Algorithm\Signal\Recv\AlgorithmDetectRecvPackage.cs" /> <Compile Include="UDP\Algorithm\Signal\Recv\AlgorithmDetectRecvPackage.cs" />
<Compile Include="UDP\Algorithm\Signal\Send\AlgorithmAlgPackage.cs" />
<Compile Include="UDP\Algorithm\Signal\Send\AlgorithmCenterAxisPackage.cs" /> <Compile Include="UDP\Algorithm\Signal\Send\AlgorithmCenterAxisPackage.cs" />
<Compile Include="UDP\Algorithm\Signal\Send\AlgorithmAutoDetectPackage.cs" /> <Compile Include="UDP\Algorithm\Signal\Send\AlgorithmAutoDetectPackage.cs" />
<Compile Include="UDP\Algorithm\Signal\Send\AlgorithmAutoTrackingPackage.cs" /> <Compile Include="UDP\Algorithm\Signal\Send\AlgorithmAutoTrackingPackage.cs" />
......
...@@ -23,5 +23,7 @@ namespace VIZ.GimbalAI.Domain.Message ...@@ -23,5 +23,7 @@ namespace VIZ.GimbalAI.Domain.Message
/// value: 检测目标坐标: x, y, width, height /// value: 检测目标坐标: x, y, width, height
/// </summary> /// </summary>
public Dictionary<int, List<float>> roi { get; set; } public Dictionary<int, List<float>> roi { get; set; }
public Dictionary<int, List<float>> detection_results { get; set; }
} }
} }
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Style x:Key="Button_Link_White" TargetType="Button">
<Setter Property="FocusVisualStyle" Value="{x:Null}"></Setter>
<Setter Property="Foreground" Value="White"></Setter>
<Setter Property="FontSize" Value="18"></Setter>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border x:Name="bd" BorderThickness="1" BorderBrush="Transparent" Background="Transparent">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"></ContentPresenter>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="bd" Property="BorderBrush" Value="#ffb8741a"></Setter>
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Foreground" Value="Gray"></Setter>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>
\ No newline at end of file
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Style TargetType="CheckBox" x:Key="CheckBox_OldAlg">
<Setter Property="FocusVisualStyle" Value="{x:Null}"></Setter>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="CheckBox">
<Border x:Name="bd" Background="#ff4cbe66" CornerRadius="10">
<TextBlock x:Name="tb" Text="深度学习算法" VerticalAlignment="Center" HorizontalAlignment="Center"></TextBlock>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsChecked" Value="False">
<Trigger.Setters>
<Setter TargetName="bd" Property="Background" Value="#ffc54b4e"></Setter>
<Setter TargetName="tb" Property="Text" Value="传统算法"></Setter>
</Trigger.Setters>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Opacity" Value="0.7"></Setter>
</Trigger>
</Style.Triggers>
</Style>
</ResourceDictionary>
\ No newline at end of file
...@@ -70,6 +70,10 @@ ...@@ -70,6 +70,10 @@
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType> <SubType>Designer</SubType>
</Page> </Page>
<Page Include="Style\Button\Button_Link_White.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Style\Button\Button_PresetView.xaml"> <Page Include="Style\Button\Button_PresetView.xaml">
<SubType>Designer</SubType> <SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
...@@ -78,6 +82,10 @@ ...@@ -78,6 +82,10 @@
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType> <SubType>Designer</SubType>
</Page> </Page>
<Page Include="Style\CheckBox\CheckBox_OldAlg.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Style\ComboBox\ComboBox_AlgorithmScene.xaml"> <Page Include="Style\ComboBox\ComboBox_AlgorithmScene.xaml">
<SubType>Designer</SubType> <SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
......
...@@ -17,14 +17,17 @@ ...@@ -17,14 +17,17 @@
<ResourceDictionary.MergedDictionaries> <ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/VIZ.GimbalAI.Common.Resource;component/Style/ListBox/ListBox_None.xaml"></ResourceDictionary> <ResourceDictionary Source="/VIZ.GimbalAI.Common.Resource;component/Style/ListBox/ListBox_None.xaml"></ResourceDictionary>
<ResourceDictionary Source="/VIZ.GimbalAI.Module.Resource;component/Style/CheckBox/CheckBox_Start.xaml"></ResourceDictionary> <ResourceDictionary Source="/VIZ.GimbalAI.Module.Resource;component/Style/CheckBox/CheckBox_Start.xaml"></ResourceDictionary>
<ResourceDictionary Source="/VIZ.GimbalAI.Module.Resource;component/Style/CheckBox/CheckBox_OldAlg.xaml"></ResourceDictionary>
<ResourceDictionary Source="/VIZ.GimbalAI.Module.Resource;component/Style/CheckBox/CheckBox_AlgorithmClass.xaml"></ResourceDictionary> <ResourceDictionary Source="/VIZ.GimbalAI.Module.Resource;component/Style/CheckBox/CheckBox_AlgorithmClass.xaml"></ResourceDictionary>
<ResourceDictionary Source="/VIZ.GimbalAI.Module.Resource;component/Style/RadioButton/RadioButton_Mode.xaml"></ResourceDictionary> <ResourceDictionary Source="/VIZ.GimbalAI.Module.Resource;component/Style/RadioButton/RadioButton_Mode.xaml"></ResourceDictionary>
<ResourceDictionary Source="/VIZ.GimbalAI.Module.Resource;component/Style/ComboBox/ComboBox_AlgorithmScene.xaml"></ResourceDictionary> <ResourceDictionary Source="/VIZ.GimbalAI.Module.Resource;component/Style/ComboBox/ComboBox_AlgorithmScene.xaml"></ResourceDictionary>
<ResourceDictionary Source="/VIZ.GimbalAI.Module.Resource;component/Style/Button/Button_Link_White.xaml"></ResourceDictionary>
<ResourceDictionary Source="/VIZ.GimbalAI.Common.Resource;component/Toolkit/NumericUpDown/NumericUpDown.xaml"></ResourceDictionary> <ResourceDictionary Source="/VIZ.GimbalAI.Common.Resource;component/Toolkit/NumericUpDown/NumericUpDown.xaml"></ResourceDictionary>
</ResourceDictionary.MergedDictionaries> </ResourceDictionary.MergedDictionaries>
<converter:Bool2VisibilityConverter x:Key="Bool2VisibilityConverter"></converter:Bool2VisibilityConverter> <converter:Bool2VisibilityConverter x:Key="Bool2VisibilityConverter"></converter:Bool2VisibilityConverter>
<converter:Bool2BoolConverterSimple x:Key="Bool2BoolConverterSimple"></converter:Bool2BoolConverterSimple>
</ResourceDictionary> </ResourceDictionary>
</UserControl.Resources> </UserControl.Resources>
<Grid> <Grid>
...@@ -37,6 +40,7 @@ ...@@ -37,6 +40,7 @@
<RowDefinition Height="73"></RowDefinition> <RowDefinition Height="73"></RowDefinition>
<RowDefinition Height="90"></RowDefinition> <RowDefinition Height="90"></RowDefinition>
<RowDefinition Height="*"></RowDefinition> <RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="73"></RowDefinition>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<!-- 启动 & 停止 --> <!-- 启动 & 停止 -->
...@@ -44,6 +48,10 @@ ...@@ -44,6 +48,10 @@
Style="{StaticResource CheckBox_Start}" Height="60" Style="{StaticResource CheckBox_Start}" Height="60"
IsChecked="{Binding IsStarted,Mode=TwoWay}"></CheckBox> IsChecked="{Binding IsStarted,Mode=TwoWay}"></CheckBox>
<!-- 深度学习算法 & 传统算法 -->
<CheckBox VerticalAlignment="Top" HorizontalAlignment="Stretch"
Style="{StaticResource CheckBox_OldAlg}" Grid.Row="3" Height="50" Foreground="White" FontSize="24"
IsChecked="{Binding IsOldAlg,Mode=TwoWay}"></CheckBox>
<!-- 自动模式 & 手动模式 --> <!-- 自动模式 & 手动模式 -->
<Grid Grid.Row="1" IsEnabled="{Binding Path=IsStarted,Mode=OneWay}"> <Grid Grid.Row="1" IsEnabled="{Binding Path=IsStarted,Mode=OneWay}">
<Grid.RowDefinitions> <Grid.RowDefinitions>
...@@ -132,6 +140,7 @@ ...@@ -132,6 +140,7 @@
<RowDefinition Height="*"></RowDefinition> <RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="*"></RowDefinition> <RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="*"></RowDefinition> <RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="80"></ColumnDefinition> <ColumnDefinition Width="80"></ColumnDefinition>
...@@ -180,6 +189,13 @@ ...@@ -180,6 +189,13 @@
Height="30" Margin="0,0,10,0" Height="30" Margin="0,0,10,0"
Minimum="1" Maximum="10" Increment="10" Minimum="1" Maximum="10" Increment="10"
Value="{Binding Path=CenterAxisSpeed,Mode=TwoWay}"></toolkit:IntegerUpDown> Value="{Binding Path=CenterAxisSpeed,Mode=TwoWay}"></toolkit:IntegerUpDown>
<!--<Button Grid.Row="4" Content="错位" Style="{StaticResource Button_Link_White}" Command="{Binding NoResetCommand}"/>-->
<!--<CheckBox VerticalAlignment="Top" HorizontalAlignment="Stretch"
Style="{StaticResource CheckBox_OldAlg}" Grid.Row="4" Height="30" FontSize="16"
IsChecked="{Binding IsOldAlg,Mode=TwoWay}"></CheckBox>-->
<Button Grid.Row="4" Grid.Column="1" Content="构图轴复位" Style="{StaticResource Button_Link_White}" Command="{Binding ResetCommand}" IsEnabled="{Binding Path=IsStarted,Converter={StaticResource Bool2BoolConverterSimple}}"/>
</Grid> </Grid>
<!-- 安全框 --> <!-- 安全框 -->
......
...@@ -39,6 +39,8 @@ namespace VIZ.GimbalAI.Module ...@@ -39,6 +39,8 @@ namespace VIZ.GimbalAI.Module
private void InitCommand() private void InitCommand()
{ {
this.UpdateAllCheckedCommand = new VCommand<bool?>(this.UpdateAllChecked); this.UpdateAllCheckedCommand = new VCommand<bool?>(this.UpdateAllChecked);
this.ResetCommand = new VCommand(this.Reset);
this.NoResetCommand = new VCommand(this.NoReset);
} }
/// <summary> /// <summary>
...@@ -113,6 +115,66 @@ namespace VIZ.GimbalAI.Module ...@@ -113,6 +115,66 @@ namespace VIZ.GimbalAI.Module
#endregion #endregion
#region IsOldAlg -- 是否老算法
private bool isOldAlg = true;
/// <summary>
/// 是否启动
/// </summary>
public bool IsOldAlg
{
get { return isOldAlg; }
set
{
isOldAlg = value;
this.RaisePropertyChanged(nameof(IsOldAlg));
if (value)
{
this.OldAlg();
}
else
{
this.NewAlg();
}
}
}
private void OldAlg()
{
// UI逻辑调整
IVideoViewService viewService = ApplicationDomainEx.ServiceManager.GetService<IVideoViewService>(ServiceKeys.VideoView);
if (viewService == null)
return;
viewService.IsOldAlg = true;
// -------------------------------------------------------------------------------------------------
// 向算法发送 UDP 消息
UdpEndpointManager manager = ConnectionManager.UdpConnection.GetEndpointManager(UdpEndpointKeys.algorithm);
if (manager == null)
return;
AlgorithmSender.Algorithm(manager, true);
}
private void NewAlg()
{
// UI逻辑调整
IVideoViewService viewService = ApplicationDomainEx.ServiceManager.GetService<IVideoViewService>(ServiceKeys.VideoView);
if (viewService == null)
return;
viewService.IsOldAlg = false;
// -------------------------------------------------------------------------------------------------
// 向算法发送 UDP 消息
UdpEndpointManager manager = ConnectionManager.UdpConnection.GetEndpointManager(UdpEndpointKeys.algorithm);
if (manager == null)
return;
AlgorithmSender.Algorithm(manager, false);
}
#endregion
#region IsManualModeChecked -- 手动模式是否选中 #region IsManualModeChecked -- 手动模式是否选中
private bool isManualModeChecked; private bool isManualModeChecked;
...@@ -352,6 +414,30 @@ namespace VIZ.GimbalAI.Module ...@@ -352,6 +414,30 @@ namespace VIZ.GimbalAI.Module
// === Command === // === Command ===
// ============================================================================================== // ==============================================================================================
public VCommand ResetCommand { get; set; }
private void Reset()
{
// UI逻辑调整
IVideoViewService viewService = ApplicationDomainEx.ServiceManager.GetService<IVideoViewService>(ServiceKeys.VideoView);
if (viewService == null)
return;
viewService.Reset();
}
public VCommand NoResetCommand { get; set; }
private void NoReset()
{
// UI逻辑调整
IVideoViewService viewService = ApplicationDomainEx.ServiceManager.GetService<IVideoViewService>(ServiceKeys.VideoView);
if (viewService == null)
return;
viewService.NoReset();
}
#region UpdateAllCheckedCommand -- 更新全选命令 #region UpdateAllCheckedCommand -- 更新全选命令
/// <summary> /// <summary>
...@@ -574,6 +660,12 @@ namespace VIZ.GimbalAI.Module ...@@ -574,6 +660,12 @@ namespace VIZ.GimbalAI.Module
viewService.IsRenderFrameSelectionEnabled = false; viewService.IsRenderFrameSelectionEnabled = false;
// 停止 -- 渲染框选事件 // 停止 -- 渲染框选事件
viewService.IsRectangleFrameSelectionTrigger = false; viewService.IsRectangleFrameSelectionTrigger = false;
//停止 -- 构图轴复位
viewService.Reset();
//停止 -- 切换默认算法
IsOldAlg = true;
//viewService.IsOldAlg = true;
} }
} }
} }
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
<ResourceDictionary> <ResourceDictionary>
<ResourceDictionary.MergedDictionaries> <ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/VIZ.GimbalAI.Common.Resource;component/Style/Button/Button_WindowTop.xaml"></ResourceDictionary> <ResourceDictionary Source="/VIZ.GimbalAI.Common.Resource;component/Style/Button/Button_WindowTop.xaml"></ResourceDictionary>
<ResourceDictionary Source="/VIZ.GimbalAI.Module.Resource;component/Style/CheckBox/CheckBox_OldAlg.xaml"></ResourceDictionary>
</ResourceDictionary.MergedDictionaries> </ResourceDictionary.MergedDictionaries>
</ResourceDictionary> </ResourceDictionary>
</UserControl.Resources> </UserControl.Resources>
...@@ -51,6 +52,14 @@ ...@@ -51,6 +52,14 @@
</StackPanel> </StackPanel>
</common:DebugBorder> </common:DebugBorder>
</StackPanel> </StackPanel>
<!-- 深度学习算法 & 传统算法 -->
<!--<Border Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Left" Height="50" Width="240" Margin="450,0,0,0">
<CheckBox VerticalAlignment="Top" HorizontalAlignment="Stretch"
Style="{StaticResource CheckBox_OldAlg}" Grid.Row="4" Height="50" Foreground="White" FontSize="24"
IsChecked="{Binding IsOldAlg,Mode=TwoWay}"></CheckBox>
</Border>-->
<Border Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Center"> <Border Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Center">
<common:ShowMessageControl Background="#33FFFFFF" Padding="80,12,80,12" <common:ShowMessageControl Background="#33FFFFFF" Padding="80,12,80,12"
TextElement.Foreground="Red" TextElement.FontSize="20" TextElement.Foreground="Red" TextElement.FontSize="20"
......
...@@ -94,6 +94,50 @@ namespace VIZ.GimbalAI.Module ...@@ -94,6 +94,50 @@ namespace VIZ.GimbalAI.Module
this.keyboardMouseEvents.KeyDown += KeyboardMouseEvents_KeyDown; this.keyboardMouseEvents.KeyDown += KeyboardMouseEvents_KeyDown;
} }
#region IsOldAlg -- 是否老算法
//private bool isOldAlg = true;
///// <summary>
///// 是否启动
///// </summary>
//public bool IsOldAlg
//{
// get { return isOldAlg; }
// set
// {
// isOldAlg = value;
// this.RaisePropertyChanged(nameof(IsOldAlg));
// if (value)
// {
// this.OldAlg();
// }
// else
// {
// this.NewAlg();
// }
// }
//}
//private void OldAlg()
//{
// // UI逻辑调整
// IVideoViewService viewService = ApplicationDomainEx.ServiceManager.GetService<IVideoViewService>(ServiceKeys.VideoView);
// if (viewService == null)
// return;
// viewService.IsOldAlg = true;
//}
//private void NewAlg()
//{
// // UI逻辑调整
// IVideoViewService viewService = ApplicationDomainEx.ServiceManager.GetService<IVideoViewService>(ServiceKeys.VideoView);
// if (viewService == null)
// return;
// viewService.IsOldAlg = false;
//}
#endregion
// ====================================================================================== // ======================================================================================
// === Controller === // === Controller ===
// ====================================================================================== // ======================================================================================
......
...@@ -59,5 +59,14 @@ namespace VIZ.GimbalAI.Module ...@@ -59,5 +59,14 @@ namespace VIZ.GimbalAI.Module
/// </summary> /// </summary>
/// <param name="delayFrame">帧延时</param> /// <param name="delayFrame">帧延时</param>
void ChangeVideoFrameDelay(int delayFrame); void ChangeVideoFrameDelay(int delayFrame);
void Reset();
void NoReset();
/// <summary>
/// 老算法
/// </summary>
bool IsOldAlg { get; set; }
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment