Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
V
VIZ.GimbalAI
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
刘龙飞
VIZ.GimbalAI
Commits
2a437641
Commit
2a437641
authored
Nov 01, 2024
by
张明
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
界面跟踪的时候可以切换目标且构图点也随着变化;增加传统深度学习算法切换
parent
f9b7edec
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
306 additions
and
2 deletions
+306
-2
VIZ.GimbalAI.Client/MainWindow.xaml
+1
-1
VIZ.GimbalAI.Client/MainWindow.xaml.cs
+5
-0
VIZ.GimbalAI.Connection/UDP/Algorithm/Enum/AlgorithmPackageSignal.cs
+6
-0
VIZ.GimbalAI.Connection/UDP/Algorithm/Provider/AlgorithmTargetLostProvider.cs
+1
-0
VIZ.GimbalAI.Connection/UDP/Algorithm/Provider/AlgorithmTrackingProvider.cs
+1
-0
VIZ.GimbalAI.Connection/UDP/Algorithm/Sender/AlgorithmSender.cs
+27
-0
VIZ.GimbalAI.Connection/UDP/Algorithm/Signal/Recv/AlgorithmDetectRecvPackage.cs
+2
-0
VIZ.GimbalAI.Connection/UDP/Algorithm/Signal/Recv/AlgorithmTrackingRecvPackage.cs
+2
-0
VIZ.GimbalAI.Connection/UDP/Algorithm/Signal/Send/AlgorithmAlgPackage.cs
+14
-0
VIZ.GimbalAI.Connection/UDP/Algorithm/Signal/Send/AlgorithmAutoTrackingPackage.cs
+4
-0
VIZ.GimbalAI.Connection/UDP/Algorithm/Signal/Send/AlgorithmManualTrackingPackage.cs
+2
-0
VIZ.GimbalAI.Connection/VIZ.GimbalAI.Connection.csproj
+1
-0
VIZ.GimbalAI.Domain/Message/Algorithm/VideoRenderRectangleMessage.cs
+2
-0
VIZ.GimbalAI.Module.Resource/Style/Button/Button_Link_White.xaml
+28
-0
VIZ.GimbalAI.Module.Resource/Style/CheckBox/CheckBox_OldAlg.xaml
+31
-0
VIZ.GimbalAI.Module.Resource/VIZ.GimbalAI.Module.Resource.csproj
+8
-0
VIZ.GimbalAI.Module/ControlView/View/ControlView.xaml
+17
-1
VIZ.GimbalAI.Module/ControlView/ViewModel/ControlViewModel.cs
+92
-0
VIZ.GimbalAI.Module/MainView/View/MainView.xaml
+9
-0
VIZ.GimbalAI.Module/MainView/ViewModel/MainViewModel.cs
+44
-0
VIZ.GimbalAI.Module/VideoView/Service/IVideoViewService.cs
+9
-0
VIZ.GimbalAI.Module/VideoView/ViewModel/VideoViewModel.cs
+0
-0
VIZ.GimbalAI.Module/VideoView/ViewModel/VideoViewModel_before.cs
+0
-0
No files found.
VIZ.GimbalAI.Client/MainWindow.xaml
View file @
2a437641
...
@@ -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>
VIZ.GimbalAI.Client/MainWindow.xaml.cs
View file @
2a437641
...
@@ -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
)
{
}
}
}
}
}
VIZ.GimbalAI.Connection/UDP/Algorithm/Enum/AlgorithmPackageSignal.cs
View file @
2a437641
...
@@ -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>
...
...
VIZ.GimbalAI.Connection/UDP/Algorithm/Provider/AlgorithmTargetLostProvider.cs
View file @
2a437641
...
@@ -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
);
}
}
...
...
VIZ.GimbalAI.Connection/UDP/Algorithm/Provider/AlgorithmTrackingProvider.cs
View file @
2a437641
...
@@ -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
);
}
}
...
...
VIZ.GimbalAI.Connection/UDP/Algorithm/Sender/AlgorithmSender.cs
View file @
2a437641
...
@@ -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>
...
...
VIZ.GimbalAI.Connection/UDP/Algorithm/Signal/Recv/AlgorithmDetectRecvPackage.cs
View file @
2a437641
...
@@ -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
;
}
}
}
}
}
VIZ.GimbalAI.Connection/UDP/Algorithm/Signal/Recv/AlgorithmTrackingRecvPackage.cs
View file @
2a437641
...
@@ -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
;
}
}
}
}
}
VIZ.GimbalAI.Connection/UDP/Algorithm/Signal/Send/AlgorithmAlgPackage.cs
0 → 100644
View file @
2a437641
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
;
}
}
}
VIZ.GimbalAI.Connection/UDP/Algorithm/Signal/Send/AlgorithmAutoTrackingPackage.cs
View file @
2a437641
...
@@ -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
}
}
}
}
VIZ.GimbalAI.Connection/UDP/Algorithm/Signal/Send/AlgorithmManualTrackingPackage.cs
View file @
2a437641
...
@@ -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
;
}
}
}
}
}
VIZ.GimbalAI.Connection/VIZ.GimbalAI.Connection.csproj
View file @
2a437641
...
@@ -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" />
...
...
VIZ.GimbalAI.Domain/Message/Algorithm/VideoRenderRectangleMessage.cs
View file @
2a437641
...
@@ -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
;
}
}
}
}
}
VIZ.GimbalAI.Module.Resource/Style/Button/Button_Link_White.xaml
0 → 100644
View file @
2a437641
<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
VIZ.GimbalAI.Module.Resource/Style/CheckBox/CheckBox_OldAlg.xaml
0 → 100644
View file @
2a437641
<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
VIZ.GimbalAI.Module.Resource/VIZ.GimbalAI.Module.Resource.csproj
View file @
2a437641
...
@@ -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>
...
...
VIZ.GimbalAI.Module/ControlView/View/ControlView.xaml
View file @
2a437641
...
@@ -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>
<!-- 安全框 -->
<!-- 安全框 -->
...
...
VIZ.GimbalAI.Module/ControlView/ViewModel/ControlViewModel.cs
View file @
2a437641
...
@@ -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;
}
}
}
}
}
}
VIZ.GimbalAI.Module/MainView/View/MainView.xaml
View file @
2a437641
...
@@ -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"
...
...
VIZ.GimbalAI.Module/MainView/ViewModel/MainViewModel.cs
View file @
2a437641
...
@@ -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 ===
// ======================================================================================
// ======================================================================================
...
...
VIZ.GimbalAI.Module/VideoView/Service/IVideoViewService.cs
View file @
2a437641
...
@@ -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
;
}
}
}
}
}
VIZ.GimbalAI.Module/VideoView/ViewModel/VideoViewModel.cs
View file @
2a437641
This diff is collapsed.
Click to expand it.
VIZ.GimbalAI.Module/VideoView/ViewModel/VideoViewModel_before.cs
0 → 100644
View file @
2a437641
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment