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
aaed881f
Commit
aaed881f
authored
Nov 10, 2022
by
liulongfei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复指示灯逻辑
parent
f911ad15
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
72 additions
and
6 deletions
+72
-6
VIZ.H2V.Module.Resource/Converter/AlgorithmTargetBoxExistsConverter.cs
+36
-0
VIZ.H2V.Module.Resource/VIZ.H2V.Module.Resource.csproj
+1
-0
VIZ.H2V.Module/NDISettingView/View/Algorithm/AlgorithmNearPanelView.xaml
+1
-1
VIZ.H2V.Module/NDISettingView/View/Algorithm/AlgorithmSinglePanelView.xaml
+2
-2
VIZ.H2V.Module/NDIView/Service/INDIViewService.cs
+5
-0
VIZ.H2V.Module/NDIView/View/NDIView.xaml
+10
-2
VIZ.H2V.Module/NDIView/VieweModel/NDIViewModel.Command.cs
+1
-0
VIZ.H2V.Module/NDIView/VieweModel/NDIViewModel.Property.cs
+6
-1
VIZ.H2V.Module/NDIView/VieweModel/NDIViewModel.cs
+9
-0
VIZ.H2V.Module/Setup/Provider/AppSetup_Algorithm.cs
+1
-0
No files found.
VIZ.H2V.Module.Resource/Converter/AlgorithmTargetBoxExistsConverter.cs
0 → 100644
View file @
aaed881f
using
System
;
using
System.Collections.Generic
;
using
System.Globalization
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
using
System.Windows.Data
;
using
VIZ.H2V.Domain
;
namespace
VIZ.H2V.Module.Resource
{
/// <summary>
/// 算法是否拥有目标框转化器
/// values[0] : IsAlgorithmTargetBoxExists
/// values[1] : ViewStatus
/// </summary>
public
class
AlgorithmTargetBoxExistsConverter
:
IMultiValueConverter
{
public
object
Convert
(
object
[]
values
,
Type
targetType
,
object
parameter
,
CultureInfo
culture
)
{
if
(
values
==
null
||
values
.
Length
!=
2
)
return
false
;
bool
isAlgorithmTargetBoxExists
=
(
bool
)
values
[
0
];
NDIViewStatus
viewStatus
=
(
NDIViewStatus
)
values
[
1
];
// 在裁切状态,且拥有目标框时才显示绿灯,否则为红灯
return
viewStatus
==
NDIViewStatus
.
CropRoi
&&
isAlgorithmTargetBoxExists
;
}
public
object
[]
ConvertBack
(
object
value
,
Type
[]
targetTypes
,
object
parameter
,
CultureInfo
culture
)
{
throw
new
NotImplementedException
();
}
}
}
VIZ.H2V.Module.Resource/VIZ.H2V.Module.Resource.csproj
View file @
aaed881f
...
@@ -150,6 +150,7 @@
...
@@ -150,6 +150,7 @@
<Compile Include="Converter\AlgorithmStrategyTagStringConverter.cs" />
<Compile Include="Converter\AlgorithmStrategyTagStringConverter.cs" />
<Compile Include="Converter\AlgorithmStrategyType2FootballFieldHeightConverter.cs" />
<Compile Include="Converter\AlgorithmStrategyType2FootballFieldHeightConverter.cs" />
<Compile Include="Converter\AlgorithmStrategyType2FootballFieldOrientationConverter.cs" />
<Compile Include="Converter\AlgorithmStrategyType2FootballFieldOrientationConverter.cs" />
<Compile Include="Converter\AlgorithmTargetBoxExistsConverter.cs" />
<Compile Include="Converter\ServiceFps2VisibilityConverter.cs" />
<Compile Include="Converter\ServiceFps2VisibilityConverter.cs" />
<Compile Include="Converter\ServiceFps2SolidBrushConverter.cs" />
<Compile Include="Converter\ServiceFps2SolidBrushConverter.cs" />
<Compile Include="Converter\TallyColor2RadialGradientBrushConverter.cs" />
<Compile Include="Converter\TallyColor2RadialGradientBrushConverter.cs" />
...
...
VIZ.H2V.Module/NDISettingView/View/Algorithm/AlgorithmNearPanelView.xaml
View file @
aaed881f
...
@@ -117,7 +117,7 @@
...
@@ -117,7 +117,7 @@
<toolkit:DoubleUpDown Grid.Column="1" Minimum="0" Maximum="1000000" Increment="1" Height="40"
<toolkit:DoubleUpDown Grid.Column="1" Minimum="0" Maximum="1000000" Increment="1" Height="40"
Value="{Binding Path=KeepPrevFrame,Mode=TwoWay}"></toolkit:DoubleUpDown>
Value="{Binding Path=KeepPrevFrame,Mode=TwoWay}"></toolkit:DoubleUpDown>
<TextBlock Text="内" Foreground="White" FontSize="18" VerticalAlignment="Center" Grid.Column="2"
<TextBlock Text="内" Foreground="White" FontSize="18" VerticalAlignment="Center" Grid.Column="2"
Margin="10,0,0,0
"></TextBlock>
HorizontalAlignment="Right
"></TextBlock>
</Grid>
</Grid>
<!-- GPU -->
<!-- GPU -->
<Grid Grid.Row="6">
<Grid Grid.Row="6">
...
...
VIZ.H2V.Module/NDISettingView/View/Algorithm/AlgorithmSinglePanelView.xaml
View file @
aaed881f
...
@@ -80,7 +80,7 @@
...
@@ -80,7 +80,7 @@
<toolkit:DoubleUpDown Grid.Column="1" Minimum="0" Maximum="1000000" Increment="1" Height="40"
<toolkit:DoubleUpDown Grid.Column="1" Minimum="0" Maximum="1000000" Increment="1" Height="40"
Value="{Binding Path=KeepPrevFrame,Mode=TwoWay}"></toolkit:DoubleUpDown>
Value="{Binding Path=KeepPrevFrame,Mode=TwoWay}"></toolkit:DoubleUpDown>
<TextBlock Text="内" Foreground="White" FontSize="18" VerticalAlignment="Center" Grid.Column="2"
<TextBlock Text="内" Foreground="White" FontSize="18" VerticalAlignment="Center" Grid.Column="2"
Margin="10,0,0,0
"></TextBlock>
HorizontalAlignment="Right
"></TextBlock>
</Grid>
</Grid>
<!-- GPU -->
<!-- GPU -->
<Grid Grid.Row="4">
<Grid Grid.Row="4">
...
@@ -148,7 +148,7 @@
...
@@ -148,7 +148,7 @@
<toolkit:DoubleUpDown Grid.Column="1" Minimum="0" Maximum="100" Increment="0.01" Height="40"
<toolkit:DoubleUpDown Grid.Column="1" Minimum="0" Maximum="100" Increment="0.01" Height="40"
Value="{Binding Path=AreaCorrectionRatio,Mode=TwoWay}"></toolkit:DoubleUpDown>
Value="{Binding Path=AreaCorrectionRatio,Mode=TwoWay}"></toolkit:DoubleUpDown>
<TextBlock Text="%" Foreground="White" FontSize="18" VerticalAlignment="Center" Grid.Column="2"
<TextBlock Text="%" Foreground="White" FontSize="18" VerticalAlignment="Center" Grid.Column="2"
Margin="10,0,0,0
"></TextBlock>
HorizontalAlignment="Right
"></TextBlock>
</Grid>
</Grid>
<!-- 单人机位面积校准置信度 -->
<!-- 单人机位面积校准置信度 -->
...
...
VIZ.H2V.Module/NDIView/Service/INDIViewService.cs
View file @
aaed881f
...
@@ -142,5 +142,10 @@ namespace VIZ.H2V.Module
...
@@ -142,5 +142,10 @@ namespace VIZ.H2V.Module
/// 发送错误标记
/// 发送错误标记
/// </summary>
/// </summary>
void
SendErrorTag
();
void
SendErrorTag
();
/// <summary>
/// 当算法停止时处理
/// </summary>
void
WhenAlgorithmStop
();
}
}
}
}
VIZ.H2V.Module/NDIView/View/NDIView.xaml
View file @
aaed881f
...
@@ -70,6 +70,8 @@
...
@@ -70,6 +70,8 @@
ViewStatusListString="CropRoi"
ViewStatusListString="CropRoi"
StrategyModeListString="center_mode">
StrategyModeListString="center_mode">
</resource:NDIViewProperty2VisibilityConverter>
</resource:NDIViewProperty2VisibilityConverter>
<!-- 目标框丢失指示灯 -->
<resource:AlgorithmTargetBoxExistsConverter x:Key="AlgorithmTargetBoxExistsConverter"></resource:AlgorithmTargetBoxExistsConverter>
</ResourceDictionary>
</ResourceDictionary>
</UserControl.Resources>
</UserControl.Resources>
...
@@ -156,8 +158,14 @@
...
@@ -156,8 +158,14 @@
<!-- 算法目标丢失指示灯, 不可点击 -->
<!-- 算法目标丢失指示灯, 不可点击 -->
<CheckBox Style="{StaticResource CheckBox_IsAlgorithmTargetBoxExists}"
<CheckBox Style="{StaticResource CheckBox_IsAlgorithmTargetBoxExists}"
IsHitTestVisible="False"
IsHitTestVisible="False"
HorizontalAlignment="Left" VerticalAlignment="Center" Margin="25,0,0,0"
HorizontalAlignment="Left" VerticalAlignment="Center" Margin="25,0,0,0">
IsChecked="{Binding Path=IsAlgorithmTargetBoxExists,Mode=OneWay}"></CheckBox>
<CheckBox.IsChecked>
<MultiBinding Converter="{StaticResource AlgorithmTargetBoxExistsConverter}">
<Binding Path="IsAlgorithmTargetBoxExists"></Binding>
<Binding Path="ViewStatus"></Binding>
</MultiBinding>
</CheckBox.IsChecked>
</CheckBox>
<!-- 算法模式 -->
<!-- 算法模式 -->
<RadioButton Content="A" FontSize="16" Foreground="White"
<RadioButton Content="A" FontSize="16" Foreground="White"
ToolTip="A" Grid.Row="1" Padding="12,0,0,0"
ToolTip="A" Grid.Row="1" Padding="12,0,0,0"
...
...
VIZ.H2V.Module/NDIView/VieweModel/NDIViewModel.Command.cs
View file @
aaed881f
...
@@ -377,6 +377,7 @@ namespace VIZ.H2V.Module
...
@@ -377,6 +377,7 @@ namespace VIZ.H2V.Module
this
.
AlgorithmControllerDic
[
this
.
StrategyType
].
StopAlgorithm
();
this
.
AlgorithmControllerDic
[
this
.
StrategyType
].
StopAlgorithm
();
this
.
ViewStatus
=
NDIViewStatus
.
Stop
;
this
.
ViewStatus
=
NDIViewStatus
.
Stop
;
this
.
WhenAlgorithmStop
();
});
});
}
}
...
...
VIZ.H2V.Module/NDIView/VieweModel/NDIViewModel.Property.cs
View file @
aaed881f
...
@@ -391,7 +391,12 @@ namespace VIZ.H2V.Module
...
@@ -391,7 +391,12 @@ namespace VIZ.H2V.Module
public
bool
IsAlgorithmTargetBoxExists
public
bool
IsAlgorithmTargetBoxExists
{
{
get
{
return
isAlgorithmTargetBoxExists
;
}
get
{
return
isAlgorithmTargetBoxExists
;
}
set
{
isAlgorithmTargetBoxExists
=
value
;
this
.
RaisePropertySaveChanged
(
nameof
(
IsAlgorithmTargetBoxExists
));
}
set
{
isAlgorithmTargetBoxExists
=
value
;
isAlgorithmTargetBoxExists_cache
=
value
;
this
.
RaisePropertySaveChanged
(
nameof
(
IsAlgorithmTargetBoxExists
));
}
}
}
#
endregion
#
endregion
...
...
VIZ.H2V.Module/NDIView/VieweModel/NDIViewModel.cs
View file @
aaed881f
...
@@ -424,6 +424,15 @@ namespace VIZ.H2V.Module
...
@@ -424,6 +424,15 @@ namespace VIZ.H2V.Module
}
}
/// <summary>
/// <summary>
/// 当算法停止时处理
/// </summary>
public
void
WhenAlgorithmStop
()
{
// 清理目标跟踪框信息
this
.
isAlgorithmTargetBoxExists_cache
=
false
;
}
/// <summary>
/// 加载 -- 更新模式属性
/// 加载 -- 更新模式属性
/// </summary>
/// </summary>
private
void
UpdateModeProperty
()
private
void
UpdateModeProperty
()
...
...
VIZ.H2V.Module/Setup/Provider/AppSetup_Algorithm.cs
View file @
aaed881f
...
@@ -108,6 +108,7 @@ namespace VIZ.H2V.Module
...
@@ -108,6 +108,7 @@ namespace VIZ.H2V.Module
return
;
return
;
service
.
ViewStatus
=
NDIViewStatus
.
Stop
;
service
.
ViewStatus
=
NDIViewStatus
.
Stop
;
service
.
WhenAlgorithmStop
();
//====================================================================
//====================================================================
// CODE: SYSTEM_LOG | 记录日志
// CODE: SYSTEM_LOG | 记录日志
...
...
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