Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
V
VIZ.H2V
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.H2V
Commits
bda464cd
Commit
bda464cd
authored
Aug 22, 2022
by
liulongfei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
边线检测 设置
parent
9874ab1a
Hide whitespace changes
Inline
Side-by-side
Showing
25 changed files
with
213 additions
and
121 deletions
+213
-121
VIZ.H2V.Common/Widgets/FootballFieldPanel/FootballFieldPanelModel.cs
+0
-14
VIZ.H2V.Module.Resource/Style/CheckBox/CheckBox_NdiView.xaml
+28
-3
VIZ.H2V.Module/NDISettingView/View/Algorithm/AlgorithmCablewayPanelView.xaml
+2
-5
VIZ.H2V.Module/NDISettingView/View/Algorithm/AlgorithmNearPanelView.xaml
+0
-4
VIZ.H2V.Module/NDISettingView/View/Algorithm/AlgorithmSinglePanelView.xaml
+0
-4
VIZ.H2V.Module/NDISettingView/View/Algorithm/AlgorithmSixteenPanelView.xaml
+0
-5
VIZ.H2V.Module/NDISettingView/View/Algorithm/AlgorithmTacticsPanelView.xaml
+0
-5
VIZ.H2V.Module/NDISettingView/ViewModel/Algorithm/AlgorithmCablewayPanelViewModel.cs
+0
-5
VIZ.H2V.Module/NDISettingView/ViewModel/Algorithm/AlgorithmNearPanelViewModel.cs
+0
-5
VIZ.H2V.Module/NDISettingView/ViewModel/Algorithm/AlgorithmPanelViewModelBase.cs
+0
-14
VIZ.H2V.Module/NDISettingView/ViewModel/Algorithm/AlgorithmSinglePanelViewModel.cs
+0
-5
VIZ.H2V.Module/NDISettingView/ViewModel/Algorithm/AlgorithmSixteenPanelViewModel.cs
+0
-5
VIZ.H2V.Module/NDISettingView/ViewModel/Algorithm/AlgorithmTacticsPanelViewModel.cs
+0
-5
VIZ.H2V.Module/NDIView/Controller/Algorithm/AlgorithmControllerBase.cs
+6
-0
VIZ.H2V.Module/NDIView/Controller/Algorithm/IAlgorithmController.cs
+6
-0
VIZ.H2V.Module/NDIView/Controller/Algorithm/Strategy/AlgorithmController_Cableway.cs
+20
-7
VIZ.H2V.Module/NDIView/Controller/Algorithm/Strategy/AlgorithmController_Near.cs
+20
-7
VIZ.H2V.Module/NDIView/Controller/Algorithm/Strategy/AlgorithmController_Single.cs
+13
-0
VIZ.H2V.Module/NDIView/Controller/Algorithm/Strategy/AlgorithmController_Sixteen.cs
+20
-7
VIZ.H2V.Module/NDIView/Controller/Algorithm/Strategy/AlgorithmController_Tactics.cs
+20
-7
VIZ.H2V.Module/NDIView/View/NDIView.xaml
+21
-4
VIZ.H2V.Module/NDIView/VieweModel/NDIViewModel.Command.cs
+37
-8
VIZ.H2V.Module/NDIView/VieweModel/NDIViewModel.Message.cs
+1
-1
VIZ.H2V.Module/NDIView/VieweModel/NDIViewModel.cs
+14
-1
VIZ.H2V.Storage/LiteDB/Algorithm/AlgorithmBase.cs
+5
-0
No files found.
VIZ.H2V.Common/Widgets/FootballFieldPanel/FootballFieldPanelModel.cs
View file @
bda464cd
...
@@ -69,20 +69,6 @@ namespace VIZ.H2V.Common
...
@@ -69,20 +69,6 @@ namespace VIZ.H2V.Common
#
endregion
#
endregion
#
region
IsShowBorder
--
是否显示边框
private
bool
isShowBorder
;
/// <summary>
/// 是否显示边框
/// </summary>
public
bool
IsShowBorder
{
get
{
return
isShowBorder
;
}
set
{
isShowBorder
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
IsShowBorder
));
}
}
#
endregion
/// <summary>
/// <summary>
/// 是否有选中的项
/// 是否有选中的项
/// </summary>
/// </summary>
...
...
VIZ.H2V.Module.Resource/Style/CheckBox/CheckBox_NdiView.xaml
View file @
bda464cd
...
@@ -46,7 +46,34 @@
...
@@ -46,7 +46,34 @@
</Setter>
</Setter>
</Style>
</Style>
<Style x:Key="CheckBox_Eye" TargetType="CheckBox">
<Style x:Key="CheckBox_Eye_Red" TargetType="CheckBox">
<Setter Property="FocusVisualStyle" Value="{x:Null}"></Setter>
<Setter Property="Width" Value="30"></Setter>
<Setter Property="Height" Value="30"></Setter>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="CheckBox">
<Border x:Name="border" Background="Transparent">
<Ellipse Width="12" Height="12" x:Name="ellipse" Fill="#44ff0000"
HorizontalAlignment="Center" VerticalAlignment="Center"></Ellipse>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsChecked" Value="True">
<Setter TargetName="ellipse" Property="Fill" Value="#aaff0000"></Setter>
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter TargetName="ellipse" Property="Opacity" Value="0.7"></Setter>
</Trigger>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="border" Property="Background" Value="#11ffffff"></Setter>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="CheckBox_Eye_Yellow" TargetType="CheckBox">
<Setter Property="FocusVisualStyle" Value="{x:Null}"></Setter>
<Setter Property="FocusVisualStyle" Value="{x:Null}"></Setter>
<Setter Property="Width" Value="30"></Setter>
<Setter Property="Width" Value="30"></Setter>
<Setter Property="Height" Value="30"></Setter>
<Setter Property="Height" Value="30"></Setter>
...
@@ -72,5 +99,4 @@
...
@@ -72,5 +99,4 @@
</Setter.Value>
</Setter.Value>
</Setter>
</Setter>
</Style>
</Style>
</ResourceDictionary>
</ResourceDictionary>
\ No newline at end of file
VIZ.H2V.Module/NDISettingView/View/Algorithm/AlgorithmCablewayPanelView.xaml
View file @
bda464cd
...
@@ -171,11 +171,7 @@
...
@@ -171,11 +171,7 @@
</ComboBox.ItemTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
</ComboBox>
</Grid>
</Grid>
<!-- 是否启用边线检测 -->
<TextBlock Text="启用边线检测" Foreground="White" FontSize="18" Grid.Row="8" VerticalAlignment="Center"></TextBlock>
<CheckBox HorizontalAlignment="Right" VerticalAlignment="Center" Style="{StaticResource CheckBox_Setting}"
IsChecked="{Binding Path=IsBorderEnabled,Mode=TwoWay}" Grid.Row="8"></CheckBox>
</Grid>
</Grid>
</Border>
</Border>
</UserControl>
</UserControl>
\ No newline at end of file
VIZ.H2V.Module/NDISettingView/View/Algorithm/AlgorithmNearPanelView.xaml
View file @
bda464cd
...
@@ -172,10 +172,6 @@
...
@@ -172,10 +172,6 @@
</ComboBox>
</ComboBox>
</Grid>
</Grid>
<!-- 是否启用边线检测 -->
<TextBlock Text="启用边线检测" Foreground="White" FontSize="18" Grid.Row="8" VerticalAlignment="Center"></TextBlock>
<CheckBox HorizontalAlignment="Right" VerticalAlignment="Center" Style="{StaticResource CheckBox_Setting}"
IsChecked="{Binding Path=IsBorderEnabled,Mode=TwoWay}" Grid.Row="8"></CheckBox>
</Grid>
</Grid>
</Border>
</Border>
</UserControl>
</UserControl>
VIZ.H2V.Module/NDISettingView/View/Algorithm/AlgorithmSinglePanelView.xaml
View file @
bda464cd
...
@@ -134,10 +134,6 @@
...
@@ -134,10 +134,6 @@
</ComboBox>
</ComboBox>
</Grid>
</Grid>
<!-- 是否启用边线检测 -->
<TextBlock Text="启用边线检测" Foreground="White" FontSize="18" Grid.Row="6" VerticalAlignment="Center"></TextBlock>
<CheckBox HorizontalAlignment="Right" VerticalAlignment="Center" Style="{StaticResource CheckBox_Setting}"
IsChecked="{Binding Path=IsBorderEnabled,Mode=TwoWay}" Grid.Row="6"></CheckBox>
</Grid>
</Grid>
</Border>
</Border>
</UserControl>
</UserControl>
VIZ.H2V.Module/NDISettingView/View/Algorithm/AlgorithmSixteenPanelView.xaml
View file @
bda464cd
...
@@ -172,10 +172,6 @@
...
@@ -172,10 +172,6 @@
</ComboBox>
</ComboBox>
</Grid>
</Grid>
<!-- 是否启用边线检测 -->
<TextBlock Text="启用边线检测" Foreground="White" FontSize="18" Grid.Row="8" VerticalAlignment="Center"></TextBlock>
<CheckBox HorizontalAlignment="Right" VerticalAlignment="Center" Style="{StaticResource CheckBox_Setting}"
IsChecked="{Binding Path=IsBorderEnabled,Mode=TwoWay}" Grid.Row="8"></CheckBox>
</Grid>
</Grid>
</Border>
</Border>
</UserControl>
</UserControl>
\ No newline at end of file
VIZ.H2V.Module/NDISettingView/View/Algorithm/AlgorithmTacticsPanelView.xaml
View file @
bda464cd
...
@@ -172,10 +172,6 @@
...
@@ -172,10 +172,6 @@
</ComboBox>
</ComboBox>
</Grid>
</Grid>
<!-- 是否启用边线检测 -->
<TextBlock Text="启用边线检测" Foreground="White" FontSize="18" Grid.Row="8" VerticalAlignment="Center"></TextBlock>
<CheckBox HorizontalAlignment="Right" VerticalAlignment="Center" Style="{StaticResource CheckBox_Setting}"
IsChecked="{Binding Path=IsBorderEnabled,Mode=TwoWay}" Grid.Row="8"></CheckBox>
</Grid>
</Grid>
</Border>
</Border>
</UserControl>
</UserControl>
\ No newline at end of file
VIZ.H2V.Module/NDISettingView/ViewModel/Algorithm/AlgorithmCablewayPanelViewModel.cs
View file @
bda464cd
...
@@ -142,7 +142,6 @@ namespace VIZ.H2V.Module
...
@@ -142,7 +142,6 @@ namespace VIZ.H2V.Module
// 场景信息
// 场景信息
this
.
SelectedBorderScence
=
this
.
BorderScences
?.
FirstOrDefault
(
p
=>
p
.
Key
==
this
.
Config
.
BorderScene
)
??
this
.
BorderScences
?.
FirstOrDefault
();
this
.
SelectedBorderScence
=
this
.
BorderScences
?.
FirstOrDefault
(
p
=>
p
.
Key
==
this
.
Config
.
BorderScene
)
??
this
.
BorderScences
?.
FirstOrDefault
();
this
.
IsBorderEnabled
=
config
.
IsBorderEnabled
;
}
}
/// <summary>
/// <summary>
...
@@ -184,9 +183,6 @@ namespace VIZ.H2V.Module
...
@@ -184,9 +183,6 @@ namespace VIZ.H2V.Module
if
(
this
.
SelectedBorderScence
.
Key
!=
this
.
Config
.
BorderScene
)
if
(
this
.
SelectedBorderScence
.
Key
!=
this
.
Config
.
BorderScene
)
return
true
;
return
true
;
if
(
this
.
IsBorderEnabled
!=
this
.
Config
.
IsBorderEnabled
)
return
true
;
return
false
;
return
false
;
}
}
...
@@ -224,7 +220,6 @@ namespace VIZ.H2V.Module
...
@@ -224,7 +220,6 @@ namespace VIZ.H2V.Module
this
.
Config
.
SmoothCoeff
=
this
.
SmoothCoeff
;
this
.
Config
.
SmoothCoeff
=
this
.
SmoothCoeff
;
this
.
Config
.
KeepPrevFrame
=
this
.
KeepPrevFrame
;
this
.
Config
.
KeepPrevFrame
=
this
.
KeepPrevFrame
;
this
.
Config
.
BorderScene
=
this
.
SelectedBorderScence
.
Key
;
this
.
Config
.
BorderScene
=
this
.
SelectedBorderScence
.
Key
;
this
.
Config
.
IsBorderEnabled
=
this
.
IsBorderEnabled
;
this
.
ViewConfig
.
GPU
=
this
.
SelectedGpuInfo
?.
Physics
??
0
;
this
.
ViewConfig
.
GPU
=
this
.
SelectedGpuInfo
?.
Physics
??
0
;
ApplicationDomainEx
.
LiteDbContext
.
AlgorithmCableway
.
Upsert
(
this
.
Config
);
ApplicationDomainEx
.
LiteDbContext
.
AlgorithmCableway
.
Upsert
(
this
.
Config
);
...
...
VIZ.H2V.Module/NDISettingView/ViewModel/Algorithm/AlgorithmNearPanelViewModel.cs
View file @
bda464cd
...
@@ -144,7 +144,6 @@ namespace VIZ.H2V.Module
...
@@ -144,7 +144,6 @@ namespace VIZ.H2V.Module
// 场景信息
// 场景信息
this
.
SelectedBorderScence
=
this
.
BorderScences
?.
FirstOrDefault
(
p
=>
p
.
Key
==
this
.
Config
.
BorderScene
)
??
this
.
BorderScences
?.
FirstOrDefault
();
this
.
SelectedBorderScence
=
this
.
BorderScences
?.
FirstOrDefault
(
p
=>
p
.
Key
==
this
.
Config
.
BorderScene
)
??
this
.
BorderScences
?.
FirstOrDefault
();
this
.
IsBorderEnabled
=
config
.
IsBorderEnabled
;
}
}
/// <summary>
/// <summary>
...
@@ -186,9 +185,6 @@ namespace VIZ.H2V.Module
...
@@ -186,9 +185,6 @@ namespace VIZ.H2V.Module
if
(
this
.
SelectedBorderScence
.
Key
!=
this
.
Config
.
BorderScene
)
if
(
this
.
SelectedBorderScence
.
Key
!=
this
.
Config
.
BorderScene
)
return
true
;
return
true
;
if
(
this
.
IsBorderEnabled
!=
this
.
Config
.
IsBorderEnabled
)
return
true
;
return
false
;
return
false
;
}
}
...
@@ -226,7 +222,6 @@ namespace VIZ.H2V.Module
...
@@ -226,7 +222,6 @@ namespace VIZ.H2V.Module
this
.
Config
.
SmoothCoeff
=
this
.
SmoothCoeff
;
this
.
Config
.
SmoothCoeff
=
this
.
SmoothCoeff
;
this
.
Config
.
KeepPrevFrame
=
this
.
KeepPrevFrame
;
this
.
Config
.
KeepPrevFrame
=
this
.
KeepPrevFrame
;
this
.
Config
.
BorderScene
=
this
.
SelectedBorderScence
.
Key
;
this
.
Config
.
BorderScene
=
this
.
SelectedBorderScence
.
Key
;
this
.
Config
.
IsBorderEnabled
=
this
.
IsBorderEnabled
;
ApplicationDomainEx
.
LiteDbContext
.
AlgorithmNear
.
Upsert
(
this
.
Config
);
ApplicationDomainEx
.
LiteDbContext
.
AlgorithmNear
.
Upsert
(
this
.
Config
);
...
...
VIZ.H2V.Module/NDISettingView/ViewModel/Algorithm/AlgorithmPanelViewModelBase.cs
View file @
bda464cd
...
@@ -118,20 +118,6 @@ namespace VIZ.H2V.Module
...
@@ -118,20 +118,6 @@ namespace VIZ.H2V.Module
#
endregion
#
endregion
#
region
IsBorderEnabled
--
是否启用边线检测
private
bool
isBorderEnabled
;
/// <summary>
/// 是否启用边线检测
/// </summary>
public
bool
IsBorderEnabled
{
get
{
return
isBorderEnabled
;
}
set
{
isBorderEnabled
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
IsBorderEnabled
));
}
}
#
endregion
#
region
KeepPrevFrame
--
维持上一帧位置
#
region
KeepPrevFrame
--
维持上一帧位置
private
int
keepPrevFrame
;
private
int
keepPrevFrame
;
...
...
VIZ.H2V.Module/NDISettingView/ViewModel/Algorithm/AlgorithmSinglePanelViewModel.cs
View file @
bda464cd
...
@@ -43,7 +43,6 @@ namespace VIZ.H2V.Module
...
@@ -43,7 +43,6 @@ namespace VIZ.H2V.Module
// 场景信息
// 场景信息
this
.
SelectedBorderScence
=
this
.
BorderScences
?.
FirstOrDefault
(
p
=>
p
.
Key
==
this
.
Config
.
BorderScene
)
??
this
.
BorderScences
?.
FirstOrDefault
();
this
.
SelectedBorderScence
=
this
.
BorderScences
?.
FirstOrDefault
(
p
=>
p
.
Key
==
this
.
Config
.
BorderScene
)
??
this
.
BorderScences
?.
FirstOrDefault
();
this
.
IsBorderEnabled
=
config
.
IsBorderEnabled
;
}
}
/// <summary>
/// <summary>
...
@@ -67,9 +66,6 @@ namespace VIZ.H2V.Module
...
@@ -67,9 +66,6 @@ namespace VIZ.H2V.Module
if
(
this
.
SelectedBorderScence
.
Key
!=
this
.
Config
.
BorderScene
)
if
(
this
.
SelectedBorderScence
.
Key
!=
this
.
Config
.
BorderScene
)
return
true
;
return
true
;
if
(
this
.
IsBorderEnabled
!=
this
.
Config
.
IsBorderEnabled
)
return
true
;
return
false
;
return
false
;
}
}
...
@@ -94,7 +90,6 @@ namespace VIZ.H2V.Module
...
@@ -94,7 +90,6 @@ namespace VIZ.H2V.Module
this
.
Config
.
SmoothCoeff
=
this
.
SmoothCoeff
;
this
.
Config
.
SmoothCoeff
=
this
.
SmoothCoeff
;
this
.
Config
.
KeepPrevFrame
=
this
.
KeepPrevFrame
;
this
.
Config
.
KeepPrevFrame
=
this
.
KeepPrevFrame
;
this
.
Config
.
BorderScene
=
this
.
SelectedBorderScence
.
Key
;
this
.
Config
.
BorderScene
=
this
.
SelectedBorderScence
.
Key
;
this
.
Config
.
IsBorderEnabled
=
this
.
IsBorderEnabled
;
this
.
ViewConfig
.
GPU
=
this
.
SelectedGpuInfo
?.
Physics
??
0
;
this
.
ViewConfig
.
GPU
=
this
.
SelectedGpuInfo
?.
Physics
??
0
;
ApplicationDomainEx
.
LiteDbContext
.
AlgorithmSingle
.
Upsert
(
this
.
Config
);
ApplicationDomainEx
.
LiteDbContext
.
AlgorithmSingle
.
Upsert
(
this
.
Config
);
...
...
VIZ.H2V.Module/NDISettingView/ViewModel/Algorithm/AlgorithmSixteenPanelViewModel.cs
View file @
bda464cd
...
@@ -142,7 +142,6 @@ namespace VIZ.H2V.Module
...
@@ -142,7 +142,6 @@ namespace VIZ.H2V.Module
// 场景信息
// 场景信息
this
.
SelectedBorderScence
=
this
.
BorderScences
?.
FirstOrDefault
(
p
=>
p
.
Key
==
this
.
Config
.
BorderScene
)
??
this
.
BorderScences
?.
FirstOrDefault
();
this
.
SelectedBorderScence
=
this
.
BorderScences
?.
FirstOrDefault
(
p
=>
p
.
Key
==
this
.
Config
.
BorderScene
)
??
this
.
BorderScences
?.
FirstOrDefault
();
this
.
IsBorderEnabled
=
config
.
IsBorderEnabled
;
}
}
/// <summary>
/// <summary>
...
@@ -184,9 +183,6 @@ namespace VIZ.H2V.Module
...
@@ -184,9 +183,6 @@ namespace VIZ.H2V.Module
if
(
this
.
SelectedBorderScence
.
Key
!=
this
.
Config
.
BorderScene
)
if
(
this
.
SelectedBorderScence
.
Key
!=
this
.
Config
.
BorderScene
)
return
true
;
return
true
;
if
(
this
.
IsBorderEnabled
!=
this
.
Config
.
IsBorderEnabled
)
return
true
;
return
false
;
return
false
;
}
}
...
@@ -224,7 +220,6 @@ namespace VIZ.H2V.Module
...
@@ -224,7 +220,6 @@ namespace VIZ.H2V.Module
this
.
Config
.
SmoothCoeff
=
this
.
SmoothCoeff
;
this
.
Config
.
SmoothCoeff
=
this
.
SmoothCoeff
;
this
.
Config
.
KeepPrevFrame
=
this
.
KeepPrevFrame
;
this
.
Config
.
KeepPrevFrame
=
this
.
KeepPrevFrame
;
this
.
Config
.
BorderScene
=
this
.
SelectedBorderScence
.
Key
;
this
.
Config
.
BorderScene
=
this
.
SelectedBorderScence
.
Key
;
this
.
Config
.
IsBorderEnabled
=
this
.
IsBorderEnabled
;
this
.
ViewConfig
.
GPU
=
this
.
SelectedGpuInfo
?.
Physics
??
0
;
this
.
ViewConfig
.
GPU
=
this
.
SelectedGpuInfo
?.
Physics
??
0
;
ApplicationDomainEx
.
LiteDbContext
.
AlgorithmSixteen
.
Upsert
(
this
.
Config
);
ApplicationDomainEx
.
LiteDbContext
.
AlgorithmSixteen
.
Upsert
(
this
.
Config
);
...
...
VIZ.H2V.Module/NDISettingView/ViewModel/Algorithm/AlgorithmTacticsPanelViewModel.cs
View file @
bda464cd
...
@@ -142,7 +142,6 @@ namespace VIZ.H2V.Module
...
@@ -142,7 +142,6 @@ namespace VIZ.H2V.Module
// 场景信息
// 场景信息
this
.
SelectedBorderScence
=
this
.
BorderScences
?.
FirstOrDefault
(
p
=>
p
.
Key
==
this
.
Config
.
BorderScene
)
??
this
.
BorderScences
?.
FirstOrDefault
();
this
.
SelectedBorderScence
=
this
.
BorderScences
?.
FirstOrDefault
(
p
=>
p
.
Key
==
this
.
Config
.
BorderScene
)
??
this
.
BorderScences
?.
FirstOrDefault
();
this
.
IsBorderEnabled
=
config
.
IsBorderEnabled
;
}
}
/// <summary>
/// <summary>
...
@@ -184,9 +183,6 @@ namespace VIZ.H2V.Module
...
@@ -184,9 +183,6 @@ namespace VIZ.H2V.Module
if
(
this
.
SelectedBorderScence
.
Key
!=
this
.
Config
.
BorderScene
)
if
(
this
.
SelectedBorderScence
.
Key
!=
this
.
Config
.
BorderScene
)
return
true
;
return
true
;
if
(
this
.
IsBorderEnabled
!=
this
.
Config
.
IsBorderEnabled
)
return
true
;
return
false
;
return
false
;
}
}
...
@@ -224,7 +220,6 @@ namespace VIZ.H2V.Module
...
@@ -224,7 +220,6 @@ namespace VIZ.H2V.Module
this
.
Config
.
SmoothCoeff
=
this
.
SmoothCoeff
;
this
.
Config
.
SmoothCoeff
=
this
.
SmoothCoeff
;
this
.
Config
.
KeepPrevFrame
=
this
.
KeepPrevFrame
;
this
.
Config
.
KeepPrevFrame
=
this
.
KeepPrevFrame
;
this
.
Config
.
BorderScene
=
this
.
SelectedBorderScence
.
Key
;
this
.
Config
.
BorderScene
=
this
.
SelectedBorderScence
.
Key
;
this
.
Config
.
IsBorderEnabled
=
this
.
IsBorderEnabled
;
this
.
ViewConfig
.
GPU
=
this
.
SelectedGpuInfo
?.
Physics
??
0
;
this
.
ViewConfig
.
GPU
=
this
.
SelectedGpuInfo
?.
Physics
??
0
;
ApplicationDomainEx
.
LiteDbContext
.
AlgorithmTactics
.
Upsert
(
this
.
Config
);
ApplicationDomainEx
.
LiteDbContext
.
AlgorithmTactics
.
Upsert
(
this
.
Config
);
...
...
VIZ.H2V.Module/NDIView/Controller/Algorithm/AlgorithmControllerBase.cs
View file @
bda464cd
...
@@ -204,6 +204,12 @@ namespace VIZ.H2V.Module
...
@@ -204,6 +204,12 @@ namespace VIZ.H2V.Module
public
abstract
AlgorithmBase
GetConfig
();
public
abstract
AlgorithmBase
GetConfig
();
/// <summary>
/// <summary>
/// 保存配置
/// </summary>
/// <param name="config">配置</param>
public
abstract
void
SaveConfig
(
AlgorithmBase
config
);
/// <summary>
/// 执行重启算法
/// 执行重启算法
/// </summary>
/// </summary>
/// <returns>是否成功重启</returns>
/// <returns>是否成功重启</returns>
...
...
VIZ.H2V.Module/NDIView/Controller/Algorithm/IAlgorithmController.cs
View file @
bda464cd
...
@@ -98,5 +98,11 @@ namespace VIZ.H2V.Module
...
@@ -98,5 +98,11 @@ namespace VIZ.H2V.Module
/// </summary>
/// </summary>
/// <returns>配置信息</returns>
/// <returns>配置信息</returns>
AlgorithmBase
GetConfig
();
AlgorithmBase
GetConfig
();
/// <summary>
/// 保存配置
/// </summary>
/// <param name="config">配置</param>
void
SaveConfig
(
AlgorithmBase
config
);
}
}
}
}
VIZ.H2V.Module/NDIView/Controller/Algorithm/Strategy/AlgorithmController_Cableway.cs
View file @
bda464cd
...
@@ -48,13 +48,7 @@ namespace VIZ.H2V.Module
...
@@ -48,13 +48,7 @@ namespace VIZ.H2V.Module
/// <param name="context">切换模式上下文</param>
/// <param name="context">切换模式上下文</param>
public
override
void
ChangeAutoMode
(
ChangeStrategyContext
context
)
public
override
void
ChangeAutoMode
(
ChangeStrategyContext
context
)
{
{
UdpEndpointManager
manager
=
ConnectionManager
.
UdpConnection
.
GetEndpointManager
(
this
.
Support
.
ViewKey
);
this
.
SetParams
();
AlgorithmSenderOption
option
=
new
AlgorithmSenderOption
();
option
.
id
=
this
.
Support
.
ID
;
option
.
enable_sendto_crop
=
this
.
Support
.
ViewConfig
.
IsSendToCrop
;
AlgorithmSender
.
AutoMode
(
manager
,
this
.
BuildPackage
(
AlgorithmAutoModeCmd
.
set_params
),
option
);
}
}
/// <summary>
/// <summary>
...
@@ -95,7 +89,13 @@ namespace VIZ.H2V.Module
...
@@ -95,7 +89,13 @@ namespace VIZ.H2V.Module
/// </summary>
/// </summary>
public
override
void
SetParams
()
public
override
void
SetParams
()
{
{
UdpEndpointManager
manager
=
ConnectionManager
.
UdpConnection
.
GetEndpointManager
(
this
.
Support
.
ViewKey
);
AlgorithmSenderOption
option
=
new
AlgorithmSenderOption
();
option
.
id
=
this
.
Support
.
ID
;
option
.
enable_sendto_crop
=
this
.
Support
.
ViewConfig
.
IsSendToCrop
;
AlgorithmSender
.
AutoMode
(
manager
,
this
.
BuildPackage
(
AlgorithmAutoModeCmd
.
set_params
),
option
);
}
}
/// <summary>
/// <summary>
...
@@ -117,6 +117,19 @@ namespace VIZ.H2V.Module
...
@@ -117,6 +117,19 @@ namespace VIZ.H2V.Module
}
}
/// <summary>
/// <summary>
/// 保存配置
/// </summary>
/// <param name="config">配置</param>
public
override
void
SaveConfig
(
AlgorithmBase
config
)
{
AlgorithmCableway
entity
=
config
as
AlgorithmCableway
;
if
(
entity
==
null
)
return
;
ApplicationDomainEx
.
LiteDbContext
.
AlgorithmCableway
.
Update
(
entity
);
}
/// <summary>
/// 构建数据包
/// 构建数据包
/// </summary>
/// </summary>
/// <param name="cmd">命令<see cref="AlgorithmAutoModeCmd"/></param>
/// <param name="cmd">命令<see cref="AlgorithmAutoModeCmd"/></param>
...
...
VIZ.H2V.Module/NDIView/Controller/Algorithm/Strategy/AlgorithmController_Near.cs
View file @
bda464cd
...
@@ -49,13 +49,7 @@ namespace VIZ.H2V.Module
...
@@ -49,13 +49,7 @@ namespace VIZ.H2V.Module
/// <param name="context">切换模式上下文</param>
/// <param name="context">切换模式上下文</param>
public
override
void
ChangeAutoMode
(
ChangeStrategyContext
context
)
public
override
void
ChangeAutoMode
(
ChangeStrategyContext
context
)
{
{
UdpEndpointManager
manager
=
ConnectionManager
.
UdpConnection
.
GetEndpointManager
(
this
.
Support
.
ViewKey
);
this
.
SetParams
();
AlgorithmSenderOption
option
=
new
AlgorithmSenderOption
();
option
.
id
=
this
.
Support
.
ID
;
option
.
enable_sendto_crop
=
this
.
Support
.
ViewConfig
.
IsSendToCrop
;
AlgorithmSender
.
AutoMode
(
manager
,
this
.
BuildPackage
(
AlgorithmAutoModeCmd
.
set_params
,
null
),
option
);
}
}
/// <summary>
/// <summary>
...
@@ -96,7 +90,13 @@ namespace VIZ.H2V.Module
...
@@ -96,7 +90,13 @@ namespace VIZ.H2V.Module
/// </summary>
/// </summary>
public
override
void
SetParams
()
public
override
void
SetParams
()
{
{
UdpEndpointManager
manager
=
ConnectionManager
.
UdpConnection
.
GetEndpointManager
(
this
.
Support
.
ViewKey
);
AlgorithmSenderOption
option
=
new
AlgorithmSenderOption
();
option
.
id
=
this
.
Support
.
ID
;
option
.
enable_sendto_crop
=
this
.
Support
.
ViewConfig
.
IsSendToCrop
;
AlgorithmSender
.
AutoMode
(
manager
,
this
.
BuildPackage
(
AlgorithmAutoModeCmd
.
set_params
,
null
),
option
);
}
}
/// <summary>
/// <summary>
...
@@ -128,6 +128,19 @@ namespace VIZ.H2V.Module
...
@@ -128,6 +128,19 @@ namespace VIZ.H2V.Module
}
}
/// <summary>
/// <summary>
/// 保存配置
/// </summary>
/// <param name="config">配置</param>
public
override
void
SaveConfig
(
AlgorithmBase
config
)
{
AlgorithmNear
entity
=
config
as
AlgorithmNear
;
if
(
entity
==
null
)
return
;
ApplicationDomainEx
.
LiteDbContext
.
AlgorithmNear
.
Update
(
entity
);
}
/// <summary>
/// 构建数据包
/// 构建数据包
/// </summary>
/// </summary>
/// <param name="cmd">命令<see cref="AlgorithmAutoModeCmd"/></param>
/// <param name="cmd">命令<see cref="AlgorithmAutoModeCmd"/></param>
...
...
VIZ.H2V.Module/NDIView/Controller/Algorithm/Strategy/AlgorithmController_Single.cs
View file @
bda464cd
...
@@ -139,6 +139,19 @@ namespace VIZ.H2V.Module
...
@@ -139,6 +139,19 @@ namespace VIZ.H2V.Module
}
}
/// <summary>
/// <summary>
/// 保存配置
/// </summary>
/// <param name="config">配置</param>
public
override
void
SaveConfig
(
AlgorithmBase
config
)
{
AlgorithmSingle
entity
=
config
as
AlgorithmSingle
;
if
(
entity
==
null
)
return
;
ApplicationDomainEx
.
LiteDbContext
.
AlgorithmSingle
.
Update
(
entity
);
}
/// <summary>
/// 构建数据包
/// 构建数据包
/// </summary>
/// </summary>
/// <param name="cmd">命令<see cref="AlgorithmAutoModeCmd"/></param>
/// <param name="cmd">命令<see cref="AlgorithmAutoModeCmd"/></param>
...
...
VIZ.H2V.Module/NDIView/Controller/Algorithm/Strategy/AlgorithmController_Sixteen.cs
View file @
bda464cd
...
@@ -49,13 +49,7 @@ namespace VIZ.H2V.Module
...
@@ -49,13 +49,7 @@ namespace VIZ.H2V.Module
/// <param name="context">切换模式上下文</param>
/// <param name="context">切换模式上下文</param>
public
override
void
ChangeAutoMode
(
ChangeStrategyContext
context
)
public
override
void
ChangeAutoMode
(
ChangeStrategyContext
context
)
{
{
UdpEndpointManager
manager
=
ConnectionManager
.
UdpConnection
.
GetEndpointManager
(
this
.
Support
.
ViewKey
);
this
.
SetParams
();
AlgorithmSenderOption
option
=
new
AlgorithmSenderOption
();
option
.
id
=
this
.
Support
.
ID
;
option
.
enable_sendto_crop
=
this
.
Support
.
ViewConfig
.
IsSendToCrop
;
AlgorithmSender
.
AutoMode
(
manager
,
this
.
BuildPackage
(
AlgorithmAutoModeCmd
.
set_params
,
null
),
option
);
}
}
/// <summary>
/// <summary>
...
@@ -96,7 +90,13 @@ namespace VIZ.H2V.Module
...
@@ -96,7 +90,13 @@ namespace VIZ.H2V.Module
/// </summary>
/// </summary>
public
override
void
SetParams
()
public
override
void
SetParams
()
{
{
UdpEndpointManager
manager
=
ConnectionManager
.
UdpConnection
.
GetEndpointManager
(
this
.
Support
.
ViewKey
);
AlgorithmSenderOption
option
=
new
AlgorithmSenderOption
();
option
.
id
=
this
.
Support
.
ID
;
option
.
enable_sendto_crop
=
this
.
Support
.
ViewConfig
.
IsSendToCrop
;
AlgorithmSender
.
AutoMode
(
manager
,
this
.
BuildPackage
(
AlgorithmAutoModeCmd
.
set_params
,
null
),
option
);
}
}
/// <summary>
/// <summary>
...
@@ -128,6 +128,19 @@ namespace VIZ.H2V.Module
...
@@ -128,6 +128,19 @@ namespace VIZ.H2V.Module
}
}
/// <summary>
/// <summary>
/// 保存配置
/// </summary>
/// <param name="config">配置</param>
public
override
void
SaveConfig
(
AlgorithmBase
config
)
{
AlgorithmSixteen
entity
=
config
as
AlgorithmSixteen
;
if
(
entity
==
null
)
return
;
ApplicationDomainEx
.
LiteDbContext
.
AlgorithmSixteen
.
Update
(
entity
);
}
/// <summary>
/// 构建数据包
/// 构建数据包
/// </summary>
/// </summary>
/// <param name="cmd">命令<see cref="AlgorithmAutoModeCmd"/></param>
/// <param name="cmd">命令<see cref="AlgorithmAutoModeCmd"/></param>
...
...
VIZ.H2V.Module/NDIView/Controller/Algorithm/Strategy/AlgorithmController_Tactics.cs
View file @
bda464cd
...
@@ -49,13 +49,7 @@ namespace VIZ.H2V.Module
...
@@ -49,13 +49,7 @@ namespace VIZ.H2V.Module
/// <param name="context">切换模式上下文</param>
/// <param name="context">切换模式上下文</param>
public
override
void
ChangeAutoMode
(
ChangeStrategyContext
context
)
public
override
void
ChangeAutoMode
(
ChangeStrategyContext
context
)
{
{
UdpEndpointManager
manager
=
ConnectionManager
.
UdpConnection
.
GetEndpointManager
(
this
.
Support
.
ViewKey
);
this
.
SetParams
();
AlgorithmSenderOption
option
=
new
AlgorithmSenderOption
();
option
.
id
=
this
.
Support
.
ID
;
option
.
enable_sendto_crop
=
this
.
Support
.
ViewConfig
.
IsSendToCrop
;
AlgorithmSender
.
AutoMode
(
manager
,
this
.
BuildPackage
(
AlgorithmAutoModeCmd
.
set_params
,
null
),
option
);
}
}
/// <summary>
/// <summary>
...
@@ -96,7 +90,13 @@ namespace VIZ.H2V.Module
...
@@ -96,7 +90,13 @@ namespace VIZ.H2V.Module
/// </summary>
/// </summary>
public
override
void
SetParams
()
public
override
void
SetParams
()
{
{
UdpEndpointManager
manager
=
ConnectionManager
.
UdpConnection
.
GetEndpointManager
(
this
.
Support
.
ViewKey
);
AlgorithmSenderOption
option
=
new
AlgorithmSenderOption
();
option
.
id
=
this
.
Support
.
ID
;
option
.
enable_sendto_crop
=
this
.
Support
.
ViewConfig
.
IsSendToCrop
;
AlgorithmSender
.
AutoMode
(
manager
,
this
.
BuildPackage
(
AlgorithmAutoModeCmd
.
set_params
,
null
),
option
);
}
}
/// <summary>
/// <summary>
...
@@ -128,6 +128,19 @@ namespace VIZ.H2V.Module
...
@@ -128,6 +128,19 @@ namespace VIZ.H2V.Module
}
}
/// <summary>
/// <summary>
/// 保存配置
/// </summary>
/// <param name="config">配置</param>
public
override
void
SaveConfig
(
AlgorithmBase
config
)
{
AlgorithmTactics
entity
=
config
as
AlgorithmTactics
;
if
(
entity
==
null
)
return
;
ApplicationDomainEx
.
LiteDbContext
.
AlgorithmTactics
.
Update
(
entity
);
}
/// <summary>
/// 构建数据包
/// 构建数据包
/// </summary>
/// </summary>
/// <param name="cmd">命令<see cref="AlgorithmAutoModeCmd"/></param>
/// <param name="cmd">命令<see cref="AlgorithmAutoModeCmd"/></param>
...
...
VIZ.H2V.Module/NDIView/View/NDIView.xaml
View file @
bda464cd
...
@@ -173,13 +173,30 @@
...
@@ -173,13 +173,30 @@
</Border>
</Border>
<!-- 显示组 -->
<!-- 显示组 -->
<StackPanel Grid.Row="0" Grid.Column="1" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="0,0,0,5">
<StackPanel Grid.Row="0" Grid.Column="1" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="0,0,0,5" Orientation="Horizontal">
<CheckBox Style="{StaticResource CheckBox_Eye}" Width="30" Height="30"
<CheckBox Style="{StaticResource CheckBox_Eye_Red}" Width="30" Height="30"
ToolTip="是否启用边线检测"
IsEnabled="{Binding Path=ViewStatus,Converter={StaticResource NDIViewStatus2IsEnabledConverter}}"
IsEnabled="{Binding Path=ViewStatus,Converter={StaticResource NDIViewStatus2IsEnabledConverter}}"
IsChecked="{Binding Path=
FootballFieldPanelModel.IsShowBorder
,Mode=TwoWay}">
IsChecked="{Binding Path=
AlgorithmConfig.IsBorderEnabled
,Mode=TwoWay}">
<behaviors:Interaction.Triggers>
<behaviors:Interaction.Triggers>
<behaviors:EventTrigger EventName="Checked">
<behaviors:InvokeCommandAction Command="{Binding IsBorderEnabledChangedCommand}" />
</behaviors:EventTrigger>
<behaviors:EventTrigger EventName="Unchecked">
<behaviors:InvokeCommandAction Command="{Binding IsBorderEnabledChangedCommand}" />
</behaviors:EventTrigger>
</behaviors:Interaction.Triggers>
</CheckBox>
<CheckBox Style="{StaticResource CheckBox_Eye_Yellow}" Width="30" Height="30"
ToolTip="是否显示边线检测区域"
IsEnabled="{Binding Path=ViewStatus,Converter={StaticResource NDIViewStatus2IsEnabledConverter}}"
IsChecked="{Binding Path=AlgorithmConfig.IsShowBorder,Mode=TwoWay}">
<behaviors:Interaction.Triggers>
<behaviors:EventTrigger EventName="Checked">
<behaviors:InvokeCommandAction Command="{Binding IsBorderShowChangedCommand}" />
</behaviors:EventTrigger>
<behaviors:EventTrigger EventName="Unchecked">
<behaviors:EventTrigger EventName="Unchecked">
<behaviors:InvokeCommandAction Command="{Binding
ClearSideCheckPolygon
Command}" />
<behaviors:InvokeCommandAction Command="{Binding
IsBorderShowChanged
Command}" />
</behaviors:EventTrigger>
</behaviors:EventTrigger>
</behaviors:Interaction.Triggers>
</behaviors:Interaction.Triggers>
</CheckBox>
</CheckBox>
...
...
VIZ.H2V.Module/NDIView/VieweModel/NDIViewModel.Command.cs
View file @
bda464cd
...
@@ -289,22 +289,51 @@ namespace VIZ.H2V.Module
...
@@ -289,22 +289,51 @@ namespace VIZ.H2V.Module
#
endregion
#
endregion
#
region
ClearSideCheckPolygonCommand
--
清理边线检测多边形
命令
#
region
IsBorderShowChangedCommand
--
边线检测区域是否显示改变
命令
/// <summary>
/// <summary>
///
清理边线检测多边形
命令
///
边线检测区域是否显示改变
命令
/// </summary>
/// </summary>
public
VCommand
ClearSideCheckPolygon
Command
{
get
;
set
;
}
public
VCommand
IsBorderShowChanged
Command
{
get
;
set
;
}
/// <summary>
/// <summary>
///
清理边线检测多边形
///
边线检测区域是否显示改变
/// </summary>
/// </summary>
private
void
ClearSideCheckPolygon
()
private
void
IsBorderShowChanged
()
{
{
ClearVideoControlContext
clear_context
=
new
ClearVideoControlContext
(
false
);
// 清理显示框
clear_context
.
IsClearSideCheckPolygon
=
true
;
if
(!
this
.
AlgorithmConfig
.
IsShowBorder
)
{
ClearVideoControlContext
clear_context
=
new
ClearVideoControlContext
(
false
);
clear_context
.
IsClearSideCheckPolygon
=
true
;
this
.
ClearVideoControl
(
clear_context
);
this
.
ClearVideoControl
(
clear_context
);
}
this
.
AlgorithmControllerDic
[
this
.
StrategyType
].
SaveConfig
(
this
.
AlgorithmConfig
);
}
#
endregion
#
region
IsBorderEnabledChangedCommand
--
边线检测算法可用改变命令
/// <summary>
/// 边线检测算法可用改变命令
/// </summary>
public
VCommand
IsBorderEnabledChangedCommand
{
get
;
set
;
}
/// <summary>
/// 边线检测算法可用改变
/// </summary>
private
void
IsBorderEnabledChanged
()
{
this
.
AlgorithmControllerDic
[
this
.
StrategyType
].
SaveConfig
(
this
.
AlgorithmConfig
);
// 算法未准备完毕不需要向算法发送指令
if
(!
this
.
IsViewStatusReady
())
return
;
this
.
AlgorithmControllerDic
[
this
.
StrategyType
].
SetParams
();
}
}
#
endregion
#
endregion
...
...
VIZ.H2V.Module/NDIView/VieweModel/NDIViewModel.Message.cs
View file @
bda464cd
...
@@ -248,7 +248,7 @@ namespace VIZ.H2V.Module
...
@@ -248,7 +248,7 @@ namespace VIZ.H2V.Module
/// <param name="view">视图</param>
/// <param name="view">视图</param>
private
void
OnAlgorithmMessage__crop_roi__borderline
(
AlgorithmMessage__crop_roi
msg
,
VideoRenderInfo
renderInfo
,
NDIView
view
)
private
void
OnAlgorithmMessage__crop_roi__borderline
(
AlgorithmMessage__crop_roi
msg
,
VideoRenderInfo
renderInfo
,
NDIView
view
)
{
{
if
(
msg
.
borderline
==
null
||
!
this
.
FootballFieldPanelModel
.
IsShowBorder
)
if
(
msg
.
borderline
==
null
||
!
this
.
AlgorithmConfig
.
IsShowBorder
)
{
{
view
.
video
.
ClearSideCheckPolygon
();
view
.
video
.
ClearSideCheckPolygon
();
...
...
VIZ.H2V.Module/NDIView/VieweModel/NDIViewModel.cs
View file @
bda464cd
...
@@ -58,7 +58,8 @@ namespace VIZ.H2V.Module
...
@@ -58,7 +58,8 @@ namespace VIZ.H2V.Module
this
.
SettingCommand
=
new
VCommand
<
string
>(
this
.
Setting
);
this
.
SettingCommand
=
new
VCommand
<
string
>(
this
.
Setting
);
this
.
DetectCommand
=
new
VCommand
(
this
.
Detect
);
this
.
DetectCommand
=
new
VCommand
(
this
.
Detect
);
this
.
RestartCommand
=
new
VCommand
(
this
.
Restart
);
this
.
RestartCommand
=
new
VCommand
(
this
.
Restart
);
this
.
ClearSideCheckPolygonCommand
=
new
VCommand
(
this
.
ClearSideCheckPolygon
);
this
.
IsBorderShowChangedCommand
=
new
VCommand
(
this
.
IsBorderShowChanged
);
this
.
IsBorderEnabledChangedCommand
=
new
VCommand
(
this
.
IsBorderEnabledChanged
);
}
}
/// <summary>
/// <summary>
...
@@ -337,5 +338,17 @@ namespace VIZ.H2V.Module
...
@@ -337,5 +338,17 @@ namespace VIZ.H2V.Module
ApplicationDomainEx
.
CsvContext
.
LogOperations
.
Enqueue
(
log
);
ApplicationDomainEx
.
CsvContext
.
LogOperations
.
Enqueue
(
log
);
}
}
}
}
/// <summary>
/// 视图状态是否准备完毕
/// </summary>
/// <returns>算法是否准备完毕</returns>
private
bool
IsViewStatusReady
()
{
return
!(
this
.
ViewStatus
==
NDIViewStatus
.
WaitSetup
||
this
.
ViewStatus
==
NDIViewStatus
.
WaitStop
||
this
.
ViewStatus
==
NDIViewStatus
.
Stop
||
this
.
ViewStatus
==
NDIViewStatus
.
WaitCheckOK
);
}
}
}
}
}
VIZ.H2V.Storage/LiteDB/Algorithm/AlgorithmBase.cs
View file @
bda464cd
...
@@ -43,5 +43,10 @@ namespace VIZ.H2V.Storage
...
@@ -43,5 +43,10 @@ namespace VIZ.H2V.Storage
/// 是否启用边线检测
/// 是否启用边线检测
/// </summary>
/// </summary>
public
bool
IsBorderEnabled
{
get
;
set
;
}
=
true
;
public
bool
IsBorderEnabled
{
get
;
set
;
}
=
true
;
/// <summary>
/// 是否显示边线检测
/// </summary>
public
bool
IsShowBorder
{
get
;
set
;
}
=
true
;
}
}
}
}
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