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
c1db4d55
Commit
c1db4d55
authored
Nov 11, 2022
by
liulongfei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1. 样式调整
2. 目标丢失指示灯延时1秒生效
parent
aaed881f
Hide whitespace changes
Inline
Side-by-side
Showing
25 changed files
with
321 additions
and
239 deletions
+321
-239
VIZ.H2V.Connection/UDP/Algorithm/Enum/AlgorithmAutoModeCmd.cs
+5
-0
VIZ.H2V.Module.Resource/Converter/AlgorithmTargetBoxLostFrameConverter.cs
+11
-5
VIZ.H2V.Module.Resource/VIZ.H2V.Module.Resource.csproj
+9
-1
VIZ.H2V.Module/NDIMainView/Controller/Hotkey/HotkeyController.cs
+27
-16
VIZ.H2V.Module/NDIMainView/Controller/Loop/LoopController.cs
+5
-5
VIZ.H2V.Module/NDIMainView/View/NDIMainView.xaml
+5
-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
+16
-0
VIZ.H2V.Module/NDIView/Controller/Algorithm/Strategy/AlgorithmController_Near.cs
+16
-0
VIZ.H2V.Module/NDIView/Controller/Algorithm/Strategy/AlgorithmController_Single.cs
+16
-0
VIZ.H2V.Module/NDIView/Controller/Algorithm/Strategy/AlgorithmController_Sixteen.cs
+16
-0
VIZ.H2V.Module/NDIView/Controller/Algorithm/Strategy/AlgorithmController_Tactics.cs
+16
-0
VIZ.H2V.Module/NDIView/Service/INDIViewService.cs
+6
-1
VIZ.H2V.Module/NDIView/View/NDIView.xaml
+5
-5
VIZ.H2V.Module/NDIView/VieweModel/NDIViewModel.Command.cs
+0
-65
VIZ.H2V.Module/NDIView/VieweModel/NDIViewModel.Message.cs
+9
-2
VIZ.H2V.Module/NDIView/VieweModel/NDIViewModel.Property.cs
+14
-12
VIZ.H2V.Module/NDIView/VieweModel/NDIViewModel.cs
+91
-7
VIZ.H2V.Module/SystemSetting/View/HotkeySettingPanelView.xaml
+7
-21
VIZ.H2V.Module/SystemSetting/ViewModel/HotkeySettingPanelViewModel.cs
+16
-73
VIZ.H2V.Storage/CSV/Log/SystemLogStringFormats.cs
+5
-0
VIZ.H2V.Storage/Init/Config/AlgorithmConfig.cs
+6
-0
VIZ.H2V.Storage/LiteDB/System/HotkeyConfig.cs
+4
-19
VIZ.H2V/config/config.ini
+4
-2
No files found.
VIZ.H2V.Connection/UDP/Algorithm/Enum/AlgorithmAutoModeCmd.cs
View file @
c1db4d55
...
@@ -60,5 +60,10 @@ namespace VIZ.H2V.Connection
...
@@ -60,5 +60,10 @@ namespace VIZ.H2V.Connection
/// 错误标记
/// 错误标记
/// </summary>
/// </summary>
public
const
string
wrong_target
=
"wrong_target"
;
public
const
string
wrong_target
=
"wrong_target"
;
/// <summary>
/// 取消错误标记
/// </summary>
public
const
string
reset
=
"reset"
;
}
}
}
}
VIZ.H2V.Module.Resource/Converter/AlgorithmTargetBox
Exists
Converter.cs
→
VIZ.H2V.Module.Resource/Converter/AlgorithmTargetBox
LostFrame
Converter.cs
View file @
c1db4d55
...
@@ -6,26 +6,32 @@ using System.Text;
...
@@ -6,26 +6,32 @@ using System.Text;
using
System.Threading.Tasks
;
using
System.Threading.Tasks
;
using
System.Windows.Data
;
using
System.Windows.Data
;
using
VIZ.H2V.Domain
;
using
VIZ.H2V.Domain
;
using
VIZ.H2V.Storage
;
namespace
VIZ.H2V.Module.Resource
namespace
VIZ.H2V.Module.Resource
{
{
/// <summary>
/// <summary>
/// 算法是否拥有目标框转化器
/// 算法是否拥有目标框转化器
/// values[0] :
IsAlgorithmTargetBoxExists
/// values[0] :
AlgorithmTargetBoxLostFrame
/// values[1] : ViewStatus
/// values[1] : ViewStatus
/// </summary>
/// </summary>
public
class
AlgorithmTargetBox
Exists
Converter
:
IMultiValueConverter
public
class
AlgorithmTargetBox
LostFrame
Converter
:
IMultiValueConverter
{
{
/// <summary>
/// 算法目标框连续丢失帧数(如果目标框连续丢失则改变指示灯状态)
/// </summary>
private
readonly
int
ALGORITHM_TARGET_BOX_LOST_FRAME
=
ApplicationDomainEx
.
IniStorage
.
GetValue
<
AlgorithmConfig
,
int
>(
p
=>
p
.
ALGORITHM_TARGET_BOX_LOST_FRAME
);
public
object
Convert
(
object
[]
values
,
Type
targetType
,
object
parameter
,
CultureInfo
culture
)
public
object
Convert
(
object
[]
values
,
Type
targetType
,
object
parameter
,
CultureInfo
culture
)
{
{
if
(
values
==
null
||
values
.
Length
!=
2
)
if
(
values
==
null
||
values
.
Length
!=
2
)
return
false
;
return
false
;
bool
isAlgorithmTargetBoxExists
=
(
bool
)
values
[
0
];
int
lost
=
(
int
)
values
[
0
];
NDIViewStatus
viewStatus
=
(
NDIViewStatus
)
values
[
1
];
NDIViewStatus
viewStatus
=
(
NDIViewStatus
)
values
[
1
];
// 在裁切状态,且
拥有目标框时才
显示绿灯,否则为红灯
// 在裁切状态,且
目标框丢失次数小于 ALGORITHM_TARGET_BOX_LOST_FRAME 时
显示绿灯,否则为红灯
return
viewStatus
==
NDIViewStatus
.
CropRoi
&&
isAlgorithmTargetBoxExists
;
return
viewStatus
==
NDIViewStatus
.
CropRoi
&&
lost
<=
ALGORITHM_TARGET_BOX_LOST_FRAME
;
}
}
public
object
[]
ConvertBack
(
object
value
,
Type
[]
targetTypes
,
object
parameter
,
CultureInfo
culture
)
public
object
[]
ConvertBack
(
object
value
,
Type
[]
targetTypes
,
object
parameter
,
CultureInfo
culture
)
...
...
VIZ.H2V.Module.Resource/VIZ.H2V.Module.Resource.csproj
View file @
c1db4d55
...
@@ -150,7 +150,7 @@
...
@@ -150,7 +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\AlgorithmTargetBox
Exists
Converter.cs" />
<Compile Include="Converter\AlgorithmTargetBox
LostFrame
Converter.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" />
...
@@ -211,6 +211,14 @@
...
@@ -211,6 +211,14 @@
<Project>{92834c05-703e-4f05-9224-f36220939d8f}</Project>
<Project>{92834c05-703e-4f05-9224-f36220939d8f}</Project>
<Name>VIZ.Framework.Common</Name>
<Name>VIZ.Framework.Common</Name>
</ProjectReference>
</ProjectReference>
<ProjectReference Include="..\..\VIZ.Framework\VIZ.Framework.Domain\VIZ.Framework.Domain.csproj">
<Project>{28661e82-c86a-4611-a028-c34f6ac85c97}</Project>
<Name>VIZ.Framework.Domain</Name>
</ProjectReference>
<ProjectReference Include="..\..\VIZ.Framework\VIZ.Framework.Storage\VIZ.Framework.Storage.csproj">
<Project>{06b80c09-343d-4bb2-aeb1-61cfbfbf5cad}</Project>
<Name>VIZ.Framework.Storage</Name>
</ProjectReference>
<ProjectReference Include="..\VIZ.H2V.Domain\VIZ.H2V.Domain.csproj">
<ProjectReference Include="..\VIZ.H2V.Domain\VIZ.H2V.Domain.csproj">
<Project>{3C61290E-D9C3-4F00-83CB-AE5F64C3298C}</Project>
<Project>{3C61290E-D9C3-4F00-83CB-AE5F64C3298C}</Project>
<Name>VIZ.H2V.Domain</Name>
<Name>VIZ.H2V.Domain</Name>
...
...
VIZ.H2V.Module/NDIMainView/Controller/Hotkey/HotkeyController.cs
View file @
c1db4d55
...
@@ -101,6 +101,10 @@ namespace VIZ.H2V.Module
...
@@ -101,6 +101,10 @@ namespace VIZ.H2V.Module
// 错误标记
// 错误标记
if
(
this
.
ExecuteErrorTag
(
hotkey
))
if
(
this
.
ExecuteErrorTag
(
hotkey
))
return
;
return
;
// 取消错误标记
if
(
this
.
ExecuteCancelErrorTag
(
hotkey
))
return
;
}
}
/// <summary>
/// <summary>
...
@@ -281,22 +285,6 @@ namespace VIZ.H2V.Module
...
@@ -281,22 +285,6 @@ namespace VIZ.H2V.Module
{
{
INDIViewService
service
=
null
;
INDIViewService
service
=
null
;
if
(
string
.
Equals
(
this
.
Support
.
HotkeyConfig
.
ErrorTagCAM1
,
hotkey
))
{
service
=
ApplicationDomainEx
.
ServiceManager
.
GetService
<
INDIViewService
>(
NDIViewKeys
.
CAM_1
);
}
if
(
string
.
Equals
(
this
.
Support
.
HotkeyConfig
.
ErrorTagCAM2
,
hotkey
))
{
service
=
ApplicationDomainEx
.
ServiceManager
.
GetService
<
INDIViewService
>(
NDIViewKeys
.
CAM_2
);
}
if
(
string
.
Equals
(
this
.
Support
.
HotkeyConfig
.
ErrorTagCAM3
,
hotkey
))
{
service
=
ApplicationDomainEx
.
ServiceManager
.
GetService
<
INDIViewService
>(
NDIViewKeys
.
CAM_3
);
}
if
(
string
.
Equals
(
this
.
Support
.
HotkeyConfig
.
ErrorTagCAM4
,
hotkey
))
{
service
=
ApplicationDomainEx
.
ServiceManager
.
GetService
<
INDIViewService
>(
NDIViewKeys
.
CAM_4
);
}
if
(
string
.
Equals
(
this
.
Support
.
HotkeyConfig
.
ErrorTagActivedCAM
,
hotkey
))
if
(
string
.
Equals
(
this
.
Support
.
HotkeyConfig
.
ErrorTagActivedCAM
,
hotkey
))
{
{
service
=
NDIViewModel
.
ActiveViewModel
;
service
=
NDIViewModel
.
ActiveViewModel
;
...
@@ -310,5 +298,28 @@ namespace VIZ.H2V.Module
...
@@ -310,5 +298,28 @@ namespace VIZ.H2V.Module
return
true
;
return
true
;
}
}
/// <summary>
/// 处理取消错误标记
/// </summary>
/// <param name="hotkey">热键</param>
/// <returns>是否处理完成</returns>
private
bool
ExecuteCancelErrorTag
(
string
hotkey
)
{
INDIViewService
service
=
null
;
if
(
string
.
Equals
(
this
.
Support
.
HotkeyConfig
.
CancelErrorTagActivedCAM
,
hotkey
))
{
service
=
NDIViewModel
.
ActiveViewModel
;
}
if
(
service
==
null
)
return
false
;
// 发送取消错误标记
service
.
SendCancelErrorTag
();
return
true
;
}
}
}
}
}
VIZ.H2V.Module/NDIMainView/Controller/Loop/LoopController.cs
View file @
c1db4d55
...
@@ -77,8 +77,8 @@ namespace VIZ.H2V.Module
...
@@ -77,8 +77,8 @@ namespace VIZ.H2V.Module
// 检测3D鼠标值
// 检测3D鼠标值
this
.
Check3DNavigation
();
this
.
Check3DNavigation
();
// 更新算法
是否拥有目标框
// 更新算法
目标框连续丢失次数
this
.
Update
IsAlgorithmTargetBoxExists
();
this
.
Update
AlgorithmTargetBoxLostFrame
();
// 等待
// 等待
Task
.
Delay
(
100
).
Wait
();
Task
.
Delay
(
100
).
Wait
();
...
@@ -138,15 +138,15 @@ namespace VIZ.H2V.Module
...
@@ -138,15 +138,15 @@ namespace VIZ.H2V.Module
}
}
/// <summary>
/// <summary>
/// 更新算法
是否拥有目标框
/// 更新算法
目标框连续丢失次数
/// </summary>
/// </summary>
private
void
Update
IsAlgorithmTargetBoxExists
()
private
void
Update
AlgorithmTargetBoxLostFrame
()
{
{
List
<
INDIViewService
>
services
=
ApplicationDomainEx
.
ServiceManager
.
GetServiceList
<
INDIViewService
>();
List
<
INDIViewService
>
services
=
ApplicationDomainEx
.
ServiceManager
.
GetServiceList
<
INDIViewService
>();
if
(
services
==
null
)
if
(
services
==
null
)
return
;
return
;
services
.
ForEach
(
p
=>
p
.
Update
IsAlgorithmTargetBoxExists
());
services
.
ForEach
(
p
=>
p
.
Update
AlgorithmTargetBoxLostFrame
());
}
}
/// <summary>
/// <summary>
...
...
VIZ.H2V.Module/NDIMainView/View/NDIMainView.xaml
View file @
c1db4d55
...
@@ -64,7 +64,7 @@
...
@@ -64,7 +64,7 @@
</StackPanel>
</StackPanel>
</Grid>
</Grid>
<!-- 主体 -->
<!-- 主体 -->
<Grid Grid.Row="1" Margin="
25,10,25
,10">
<Grid Grid.Row="1" Margin="
40,0,40
,10">
<Grid.RowDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
...
@@ -73,10 +73,10 @@
...
@@ -73,10 +73,10 @@
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
</Grid.ColumnDefinitions>
</Grid.ColumnDefinitions>
<local:NDIView
x:Name="view_CAM_1" NDIKey="{x:Static Member=domain:NDIViewKeys.CAM_1}" Grid.Row="0" Grid.Column="0" Margin="5,5,20,5
"></local:NDIView>
<local:NDIView
NDIKey="{x:Static Member=domain:NDIViewKeys.CAM_1}" Grid.Row="0" Grid.Column="0" Margin="10,10,15,10
"></local:NDIView>
<local:NDIView
x:Name="view_CAM_2" NDIKey="{x:Static Member=domain:NDIViewKeys.CAM_3}" Grid.Row="1" Grid.Column="0" Margin="5,5,20,5
"></local:NDIView>
<local:NDIView
NDIKey="{x:Static Member=domain:NDIViewKeys.CAM_2}" Grid.Row="0" Grid.Column="1" Margin="15,10,10,10
"></local:NDIView>
<local:NDIView
x:Name="view_CAM_3" NDIKey="{x:Static Member=domain:NDIViewKeys.CAM_4}" Grid.Row="1" Grid.Column="1" Margin="20,5,5,5
"></local:NDIView>
<local:NDIView
NDIKey="{x:Static Member=domain:NDIViewKeys.CAM_3}" Grid.Row="1" Grid.Column="0" Margin="10,10,15,10
"></local:NDIView>
<local:NDIView
x:Name="view_CAM_4" NDIKey="{x:Static Member=domain:NDIViewKeys.CAM_2}" Grid.Row="0" Grid.Column="1" Margin="20,5,5,5
"></local:NDIView>
<local:NDIView
NDIKey="{x:Static Member=domain:NDIViewKeys.CAM_4}" Grid.Row="1" Grid.Column="1" Margin="15,10,10,10
"></local:NDIView>
</Grid>
</Grid>
<!-- 底部 -->
<!-- 底部 -->
<Border Grid.Row="2" Background="#ff12202d">
<Border Grid.Row="2" Background="#ff12202d">
...
...
VIZ.H2V.Module/NDIView/Controller/Algorithm/AlgorithmControllerBase.cs
View file @
c1db4d55
...
@@ -208,6 +208,12 @@ namespace VIZ.H2V.Module
...
@@ -208,6 +208,12 @@ namespace VIZ.H2V.Module
public
abstract
void
ErrorTag
(
List
<
int
>
target_bbox
,
long
timeCode
);
public
abstract
void
ErrorTag
(
List
<
int
>
target_bbox
,
long
timeCode
);
/// <summary>
/// <summary>
/// 取消错误标记
/// </summary>
/// <param name="timeCode">时间码</param>
public
abstract
void
CancelErrorTag
(
long
timeCode
);
/// <summary>
/// 手动校准
/// 手动校准
/// </summary>
/// </summary>
/// <param name="info">手动校准信息</param>
/// <param name="info">手动校准信息</param>
...
...
VIZ.H2V.Module/NDIView/Controller/Algorithm/IAlgorithmController.cs
View file @
c1db4d55
...
@@ -78,6 +78,12 @@ namespace VIZ.H2V.Module
...
@@ -78,6 +78,12 @@ namespace VIZ.H2V.Module
void
ErrorTag
(
List
<
int
>
target_bbox
,
long
timeCode
);
void
ErrorTag
(
List
<
int
>
target_bbox
,
long
timeCode
);
/// <summary>
/// <summary>
/// 取消错误标记
/// </summary>
/// <param name="timeCode">时间码</param>
void
CancelErrorTag
(
long
timeCode
);
/// <summary>
/// 初始化算法
/// 初始化算法
/// </summary>
/// </summary>
/// <remarks>
/// <remarks>
...
...
VIZ.H2V.Module/NDIView/Controller/Algorithm/Strategy/AlgorithmController_Cableway.cs
View file @
c1db4d55
...
@@ -135,6 +135,22 @@ namespace VIZ.H2V.Module
...
@@ -135,6 +135,22 @@ namespace VIZ.H2V.Module
}
}
/// <summary>
/// <summary>
/// 取消错误标记
/// </summary>
/// <param name="timeCode">时间码</param>
public
override
void
CancelErrorTag
(
long
timeCode
)
{
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
;
option
.
timecode
=
timeCode
;
AlgorithmSender
.
AutoMode
(
manager
,
this
.
BuildPackage
(
AlgorithmAutoModeCmd
.
reset
,
null
),
option
);
}
/// <summary>
/// 手动校准
/// 手动校准
/// </summary>
/// </summary>
/// <param name="info">手动校准信息</param>
/// <param name="info">手动校准信息</param>
...
...
VIZ.H2V.Module/NDIView/Controller/Algorithm/Strategy/AlgorithmController_Near.cs
View file @
c1db4d55
...
@@ -145,6 +145,22 @@ namespace VIZ.H2V.Module
...
@@ -145,6 +145,22 @@ namespace VIZ.H2V.Module
}
}
/// <summary>
/// <summary>
/// 取消错误标记
/// </summary>
/// <param name="timeCode">时间码</param>
public
override
void
CancelErrorTag
(
long
timeCode
)
{
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
;
option
.
timecode
=
timeCode
;
AlgorithmSender
.
AutoMode
(
manager
,
this
.
BuildPackage
(
AlgorithmAutoModeCmd
.
reset
,
null
,
null
),
option
);
}
/// <summary>
/// 手动校准
/// 手动校准
/// </summary>
/// </summary>
/// <param name="info">手动校准信息</param>
/// <param name="info">手动校准信息</param>
...
...
VIZ.H2V.Module/NDIView/Controller/Algorithm/Strategy/AlgorithmController_Single.cs
View file @
c1db4d55
...
@@ -182,6 +182,22 @@ namespace VIZ.H2V.Module
...
@@ -182,6 +182,22 @@ namespace VIZ.H2V.Module
}
}
/// <summary>
/// <summary>
/// 取消错误标记
/// </summary>
/// <param name="timeCode">时间码</param>
public
override
void
CancelErrorTag
(
long
timeCode
)
{
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
;
option
.
timecode
=
timeCode
;
AlgorithmSender
.
AutoMode
(
manager
,
this
.
BuildPackage
(
AlgorithmAutoModeCmd
.
reset
,
null
),
option
);
}
/// <summary>
/// 手动校准
/// 手动校准
/// </summary>
/// </summary>
/// <param name="info">手动校准信息</param>
/// <param name="info">手动校准信息</param>
...
...
VIZ.H2V.Module/NDIView/Controller/Algorithm/Strategy/AlgorithmController_Sixteen.cs
View file @
c1db4d55
...
@@ -145,6 +145,22 @@ namespace VIZ.H2V.Module
...
@@ -145,6 +145,22 @@ namespace VIZ.H2V.Module
}
}
/// <summary>
/// <summary>
/// 取消错误标记
/// </summary>
/// <param name="timeCode">时间码</param>
public
override
void
CancelErrorTag
(
long
timeCode
)
{
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
;
option
.
timecode
=
timeCode
;
AlgorithmSender
.
AutoMode
(
manager
,
this
.
BuildPackage
(
AlgorithmAutoModeCmd
.
reset
,
null
,
null
),
option
);
}
/// <summary>
/// 手动校准
/// 手动校准
/// </summary>
/// </summary>
/// <param name="info">手动校准信息</param>
/// <param name="info">手动校准信息</param>
...
...
VIZ.H2V.Module/NDIView/Controller/Algorithm/Strategy/AlgorithmController_Tactics.cs
View file @
c1db4d55
...
@@ -106,6 +106,22 @@ namespace VIZ.H2V.Module
...
@@ -106,6 +106,22 @@ namespace VIZ.H2V.Module
}
}
/// <summary>
/// <summary>
/// 取消错误标记
/// </summary>
/// <param name="timeCode">时间码</param>
public
override
void
CancelErrorTag
(
long
timeCode
)
{
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
;
option
.
timecode
=
timeCode
;
AlgorithmSender
.
AutoMode
(
manager
,
this
.
BuildPackage
(
AlgorithmAutoModeCmd
.
reset
,
null
,
null
),
option
);
}
/// <summary>
/// 边线检测校准
/// 边线检测校准
/// </summary>
/// </summary>
/// <param name="borderpoint">边线检测校准点</param>
/// <param name="borderpoint">边线检测校准点</param>
...
...
VIZ.H2V.Module/NDIView/Service/INDIViewService.cs
View file @
c1db4d55
...
@@ -119,7 +119,7 @@ namespace VIZ.H2V.Module
...
@@ -119,7 +119,7 @@ namespace VIZ.H2V.Module
/// <summary>
/// <summary>
/// 更新算法是否拥有目标框
/// 更新算法是否拥有目标框
/// </summary>
/// </summary>
void
Update
IsAlgorithmTargetBoxExists
();
void
Update
AlgorithmTargetBoxLostFrame
();
/// <summary>
/// <summary>
/// 停止算法
/// 停止算法
...
@@ -144,6 +144,11 @@ namespace VIZ.H2V.Module
...
@@ -144,6 +144,11 @@ namespace VIZ.H2V.Module
void
SendErrorTag
();
void
SendErrorTag
();
/// <summary>
/// <summary>
/// 发送取消错误标记
/// </summary>
void
SendCancelErrorTag
();
/// <summary>
/// 当算法停止时处理
/// 当算法停止时处理
/// </summary>
/// </summary>
void
WhenAlgorithmStop
();
void
WhenAlgorithmStop
();
...
...
VIZ.H2V.Module/NDIView/View/NDIView.xaml
View file @
c1db4d55
...
@@ -71,7 +71,7 @@
...
@@ -71,7 +71,7 @@
StrategyModeListString="center_mode">
StrategyModeListString="center_mode">
</resource:NDIViewProperty2VisibilityConverter>
</resource:NDIViewProperty2VisibilityConverter>
<!-- 目标框丢失指示灯 -->
<!-- 目标框丢失指示灯 -->
<resource:AlgorithmTargetBox
ExistsConverter x:Key="AlgorithmTargetBoxExistsConverter"></resource:AlgorithmTargetBoxExists
Converter>
<resource:AlgorithmTargetBox
LostFrameConverter x:Key="AlgorithmTargetBoxLostFrameConverter"></resource:AlgorithmTargetBoxLostFrame
Converter>
</ResourceDictionary>
</ResourceDictionary>
</UserControl.Resources>
</UserControl.Resources>
...
@@ -83,7 +83,7 @@
...
@@ -83,7 +83,7 @@
<Grid>
<Grid>
<Grid.RowDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="
8
0"></RowDefinition>
<RowDefinition Height="
7
0"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
</Grid.RowDefinitions>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<Grid.ColumnDefinitions>
...
@@ -133,7 +133,7 @@
...
@@ -133,7 +133,7 @@
MaxWidth="300"></TextBlock>
MaxWidth="300"></TextBlock>
</Grid>
</Grid>
<!-- 算法 -->
<!-- 算法 -->
<Grid Grid.RowSpan="2" Margin="0,
20,0
,0">
<Grid Grid.RowSpan="2" Margin="0,
16,-6
,0">
<Grid IsEnabled="{Binding Path=ViewStatus,Converter={StaticResource NDIViewStatus2IsEnabledConverter}}">
<Grid IsEnabled="{Binding Path=ViewStatus,Converter={StaticResource NDIViewStatus2IsEnabledConverter}}">
<Grid.RowDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="60"></RowDefinition>
<RowDefinition Height="60"></RowDefinition>
...
@@ -160,8 +160,8 @@
...
@@ -160,8 +160,8 @@
IsHitTestVisible="False"
IsHitTestVisible="False"
HorizontalAlignment="Left" VerticalAlignment="Center" Margin="25,0,0,0">
HorizontalAlignment="Left" VerticalAlignment="Center" Margin="25,0,0,0">
<CheckBox.IsChecked>
<CheckBox.IsChecked>
<MultiBinding Converter="{StaticResource AlgorithmTargetBox
Exists
Converter}">
<MultiBinding Converter="{StaticResource AlgorithmTargetBox
LostFrame
Converter}">
<Binding Path="
IsAlgorithmTargetBoxExists
"></Binding>
<Binding Path="
AlgorithmTargetBoxLostFrame
"></Binding>
<Binding Path="ViewStatus"></Binding>
<Binding Path="ViewStatus"></Binding>
</MultiBinding>
</MultiBinding>
</CheckBox.IsChecked>
</CheckBox.IsChecked>
...
...
VIZ.H2V.Module/NDIView/VieweModel/NDIViewModel.Command.cs
View file @
c1db4d55
...
@@ -488,70 +488,5 @@ namespace VIZ.H2V.Module
...
@@ -488,70 +488,5 @@ namespace VIZ.H2V.Module
}
}
#
endregion
#
endregion
#
region
AlgorithmErrorTagCommand
--
算法错误标记命令
/// <summary>
/// 算法错误标记命令
/// </summary>
public
VCommand
AlgorithmErrorTagCommand
{
get
;
set
;
}
/// <summary>
/// 算法错误标记
/// </summary>
private
void
AlgorithmErrorTag
()
{
// 只有在自动模式下可以标记
if
(
this
.
StrategyMode
!=
AlgorithmStrategyMode
.
auto_mode
)
return
;
// 只有裁切状态下可以标记
if
(
this
.
ViewStatus
!=
NDIViewStatus
.
CropRoi
)
return
;
// 目前单人机位不支持错误标记
if
(
this
.
StrategyType
==
AlgorithmStrategyType
.
Single
)
return
;
NDIView
view
=
this
.
GetView
<
NDIView
>();
if
(
view
==
null
)
return
;
VideoRenderInfo
renderInfo
=
view
.
video
.
GetRenderInfo
();
if
(
renderInfo
==
null
)
return
;
TrackingBoxPlugin
trackingBoxPlugin
=
view
.
video
.
GetPlugin
<
TrackingBoxPlugin
>(
VideoControlPluginNames
.
TrackingBox
);
if
(
trackingBoxPlugin
==
null
)
return
;
List
<
TrackingBoxInfo
>
trackingBoxInfos
=
trackingBoxPlugin
.
GetTrackingBoxInfos
();
if
(
trackingBoxInfos
==
null
||
trackingBoxInfos
.
Count
==
0
)
return
;
TrackingBoxInfo
boxInfo
=
trackingBoxInfos
[
0
];
// 标记错误
List
<
int
>
box
=
new
List
<
int
>();
box
.
Add
((
int
)
boxInfo
.
SrcRect
.
Left
);
box
.
Add
((
int
)
boxInfo
.
SrcRect
.
Top
);
box
.
Add
((
int
)
boxInfo
.
SrcRect
.
Right
);
box
.
Add
((
int
)
boxInfo
.
SrcRect
.
Bottom
);
this
.
AlgorithmControllerDic
[
this
.
StrategyType
].
ErrorTag
(
box
,
renderInfo
.
Frame
.
TimeStamp
);
//====================================================================
// CODE: SYSTEM_LOG | 记录日志
//====================================================================
// 记录日志: 算法错误标记 | [类型:{0}],<坐标:({1},{2},{3},{4}), 时码: {5}>
string
system_log
=
string
.
Format
(
SystemLogStringFormats
.
ALGORITHM_ERROR_TAG
,
this
.
StrategyType
.
GetDescription
(),
box
[
0
],
box
[
1
],
box
[
2
],
box
[
3
],
renderInfo
.
Frame
.
TimeStamp
);
ApplicationDomainEx
.
CsvContext
.
AppendSystemLog
(
this
.
ViewKey
,
this
.
DisplayName
,
system_log
);
//====================================================================
}
#
endregion
}
}
}
}
VIZ.H2V.Module/NDIView/VieweModel/NDIViewModel.Message.cs
View file @
c1db4d55
...
@@ -221,8 +221,15 @@ namespace VIZ.H2V.Module
...
@@ -221,8 +221,15 @@ namespace VIZ.H2V.Module
/// <param name="view">视图</param>
/// <param name="view">视图</param>
private
void
OnAlgorithmMessage__crop_roi__target_bbox
(
AlgorithmMessage__crop_roi
msg
,
VideoRenderInfo
renderInfo
,
NDIView
view
)
private
void
OnAlgorithmMessage__crop_roi__target_bbox
(
AlgorithmMessage__crop_roi
msg
,
VideoRenderInfo
renderInfo
,
NDIView
view
)
{
{
// 当前是否拥有目标框
// 当前是否拥有目标框,如果没有目标框则记录当前丢失目标框帧数
this
.
isAlgorithmTargetBoxExists_cache
=
msg
.
target_bbox
!=
null
;
if
(
msg
.
target_bbox
==
null
)
{
++
this
.
algorithmTargetBoxLostFrame_cache
;
}
else
{
this
.
algorithmTargetBoxLostFrame_cache
=
0
;
}
// 没有目标框 || 配置是否显示目标框
// 没有目标框 || 配置是否显示目标框
if
(
msg
.
target_bbox
==
null
||
!
this
.
IsShowAlgorithmTargetBox
)
if
(
msg
.
target_bbox
==
null
||
!
this
.
IsShowAlgorithmTargetBox
)
...
...
VIZ.H2V.Module/NDIView/VieweModel/NDIViewModel.Property.cs
View file @
c1db4d55
...
@@ -380,23 +380,25 @@ namespace VIZ.H2V.Module
...
@@ -380,23 +380,25 @@ namespace VIZ.H2V.Module
#
endregion
#
endregion
#
region
IsAlgorithmTargetBoxExists
--
算法目标框是否存在
#
region
AlgorithmTargetBoxLostFrame
--
算法目标框连续丢失帧数
private
bool
isAlgorithmTargetBoxExists_cache
;
/// <summary>
/// 算法目标框连续丢失帧数 缓存
/// </summary>
/// <remarks>
/// 算法目标框连续丢失帧数 值首先记录在cache中
/// 真实值更新则在 NDIMainViewModel 的 LoopController 中
/// </remarks>
private
int
algorithmTargetBoxLostFrame_cache
;
private
bool
isAlgorithmTargetBoxExists
;
private
int
algorithmTargetBoxLostFrame
;
/// <summary>
/// <summary>
/// 算法目标框
是否存在
/// 算法目标框
连续丢失帧数
/// </summary>
/// </summary>
public
bool
IsAlgorithmTargetBoxExists
public
int
AlgorithmTargetBoxLostFrame
{
{
get
{
return
isAlgorithmTargetBoxExists
;
}
get
{
return
algorithmTargetBoxLostFrame
;
}
set
set
{
algorithmTargetBoxLostFrame
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
AlgorithmTargetBoxLostFrame
));
}
{
isAlgorithmTargetBoxExists
=
value
;
isAlgorithmTargetBoxExists_cache
=
value
;
this
.
RaisePropertySaveChanged
(
nameof
(
IsAlgorithmTargetBoxExists
));
}
}
}
#
endregion
#
endregion
...
...
VIZ.H2V.Module/NDIView/VieweModel/NDIViewModel.cs
View file @
c1db4d55
...
@@ -82,7 +82,6 @@ namespace VIZ.H2V.Module
...
@@ -82,7 +82,6 @@ namespace VIZ.H2V.Module
this
.
IsAreaCorrectionEnabledChangedCommand
=
new
VCommand
(
this
.
IsAreaCorrectionEnabledChanged
);
this
.
IsAreaCorrectionEnabledChangedCommand
=
new
VCommand
(
this
.
IsAreaCorrectionEnabledChanged
);
this
.
SaveAlgorithmConfigCommand
=
new
VCommand
(
this
.
SaveAlgorithmConfig
);
this
.
SaveAlgorithmConfigCommand
=
new
VCommand
(
this
.
SaveAlgorithmConfig
);
this
.
SetActiveCommand
=
new
VCommand
(
this
.
SetActive
);
this
.
SetActiveCommand
=
new
VCommand
(
this
.
SetActive
);
this
.
AlgorithmErrorTagCommand
=
new
VCommand
(
this
.
AlgorithmErrorTag
);
}
}
/// <summary>
/// <summary>
...
@@ -399,12 +398,12 @@ namespace VIZ.H2V.Module
...
@@ -399,12 +398,12 @@ namespace VIZ.H2V.Module
/// <summary>
/// <summary>
/// 更新算法是否拥有目标框
/// 更新算法是否拥有目标框
/// </summary>
/// </summary>
public
void
Update
IsAlgorithmTargetBoxExists
()
public
void
Update
AlgorithmTargetBoxLostFrame
()
{
{
if
(
this
.
IsAlgorithmTargetBoxExists
==
this
.
isAlgorithmTargetBoxExists
_cache
)
if
(
this
.
AlgorithmTargetBoxLostFrame
==
this
.
algorithmTargetBoxLostFrame
_cache
)
return
;
return
;
this
.
IsAlgorithmTargetBoxExists
=
this
.
isAlgorithmTargetBoxExists
_cache
;
this
.
AlgorithmTargetBoxLostFrame
=
this
.
algorithmTargetBoxLostFrame
_cache
;
}
}
/// <summary>
/// <summary>
...
@@ -420,7 +419,92 @@ namespace VIZ.H2V.Module
...
@@ -420,7 +419,92 @@ namespace VIZ.H2V.Module
/// </summary>
/// </summary>
public
void
SendErrorTag
()
public
void
SendErrorTag
()
{
{
this
.
AlgorithmErrorTag
();
// 只有在自动模式下可以标记
if
(
this
.
StrategyMode
!=
AlgorithmStrategyMode
.
auto_mode
)
return
;
// 只有裁切状态下可以标记
if
(
this
.
ViewStatus
!=
NDIViewStatus
.
CropRoi
)
return
;
// 目前单人机位不支持错误标记
if
(
this
.
StrategyType
==
AlgorithmStrategyType
.
Single
)
return
;
NDIView
view
=
this
.
GetView
<
NDIView
>();
if
(
view
==
null
)
return
;
VideoRenderInfo
renderInfo
=
view
.
video
.
GetRenderInfo
();
if
(
renderInfo
==
null
)
return
;
TrackingBoxPlugin
trackingBoxPlugin
=
view
.
video
.
GetPlugin
<
TrackingBoxPlugin
>(
VideoControlPluginNames
.
TrackingBox
);
if
(
trackingBoxPlugin
==
null
)
return
;
List
<
TrackingBoxInfo
>
trackingBoxInfos
=
trackingBoxPlugin
.
GetTrackingBoxInfos
();
if
(
trackingBoxInfos
==
null
||
trackingBoxInfos
.
Count
==
0
)
return
;
TrackingBoxInfo
boxInfo
=
trackingBoxInfos
[
0
];
// 标记错误
List
<
int
>
box
=
new
List
<
int
>();
box
.
Add
((
int
)
boxInfo
.
SrcRect
.
Left
);
box
.
Add
((
int
)
boxInfo
.
SrcRect
.
Top
);
box
.
Add
((
int
)
boxInfo
.
SrcRect
.
Right
);
box
.
Add
((
int
)
boxInfo
.
SrcRect
.
Bottom
);
this
.
AlgorithmControllerDic
[
this
.
StrategyType
].
ErrorTag
(
box
,
renderInfo
.
Frame
.
TimeStamp
);
//====================================================================
// CODE: SYSTEM_LOG | 记录日志
//====================================================================
// 记录日志: 算法错误标记 | [类型:{0}],<坐标:({1},{2},{3},{4}), 时码: {5}>
string
system_log
=
string
.
Format
(
SystemLogStringFormats
.
ALGORITHM_ERROR_TAG
,
this
.
StrategyType
.
GetDescription
(),
box
[
0
],
box
[
1
],
box
[
2
],
box
[
3
],
renderInfo
.
Frame
.
TimeStamp
);
ApplicationDomainEx
.
CsvContext
.
AppendSystemLog
(
this
.
ViewKey
,
this
.
DisplayName
,
system_log
);
//====================================================================
}
/// <summary>
/// 发送取消错误标记
/// </summary>
public
void
SendCancelErrorTag
()
{
// 只有在自动模式下可以标记
if
(
this
.
StrategyMode
!=
AlgorithmStrategyMode
.
auto_mode
)
return
;
// 只有裁切状态下可以标记
if
(
this
.
ViewStatus
!=
NDIViewStatus
.
CropRoi
)
return
;
// 目前单人机位不支持错误标记
if
(
this
.
StrategyType
==
AlgorithmStrategyType
.
Single
)
return
;
NDIView
view
=
this
.
GetView
<
NDIView
>();
if
(
view
==
null
)
return
;
VideoRenderInfo
renderInfo
=
view
.
video
.
GetRenderInfo
();
if
(
renderInfo
==
null
)
return
;
this
.
AlgorithmControllerDic
[
this
.
StrategyType
].
CancelErrorTag
(
renderInfo
.
Frame
.
TimeStamp
);
//====================================================================
// CODE: SYSTEM_LOG | 记录日志
//====================================================================
// 记录日志: 算法取消错误标记,[类型:{0}],<时码: {1}>
string
system_log
=
string
.
Format
(
SystemLogStringFormats
.
ALGORITHM_CANCEL_ERROR_TAG
,
this
.
StrategyType
.
GetDescription
(),
renderInfo
.
Frame
.
TimeStamp
);
ApplicationDomainEx
.
CsvContext
.
AppendSystemLog
(
this
.
ViewKey
,
this
.
DisplayName
,
system_log
);
//====================================================================
}
}
/// <summary>
/// <summary>
...
@@ -428,8 +512,8 @@ namespace VIZ.H2V.Module
...
@@ -428,8 +512,8 @@ namespace VIZ.H2V.Module
/// </summary>
/// </summary>
public
void
WhenAlgorithmStop
()
public
void
WhenAlgorithmStop
()
{
{
//
清理目标跟踪框信息
//
从新统计目标框丢失帧数
this
.
isAlgorithmTargetBoxExists_cache
=
false
;
this
.
algorithmTargetBoxLostFrame_cache
=
0
;
}
}
/// <summary>
/// <summary>
...
...
VIZ.H2V.Module/SystemSetting/View/HotkeySettingPanelView.xaml
View file @
c1db4d55
...
@@ -167,13 +167,11 @@
...
@@ -167,13 +167,11 @@
</Grid>
</Grid>
<!-- 标记误检快捷键 -->
<!-- 标记误检快捷键 -->
<TextBlock Text="标记误检快捷键" Foreground="#AAFFFFFF" FontSize="20" VerticalAlignment="Center" Grid.Row="8"></TextBlock>
<TextBlock Text="标记
当前窗口
误检快捷键" Foreground="#AAFFFFFF" FontSize="20" VerticalAlignment="Center" Grid.Row="8"></TextBlock>
<Rectangle Grid.Row="8" VerticalAlignment="Bottom" Height="2" Fill="#ff364051"></Rectangle>
<Rectangle Grid.Row="8" VerticalAlignment="Bottom" Height="2" Fill="#ff364051"></Rectangle>
<Grid Grid.Row="9">
<Grid Grid.Row="9">
<Grid.RowDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="50"></RowDefinition>
<RowDefinition Height="50"></RowDefinition>
<RowDefinition Height="50"></RowDefinition>
<RowDefinition Height="50"></RowDefinition>
</Grid.RowDefinitions>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="120"></ColumnDefinition>
<ColumnDefinition Width="120"></ColumnDefinition>
...
@@ -181,26 +179,14 @@
...
@@ -181,26 +179,14 @@
<ColumnDefinition Width="120"></ColumnDefinition>
<ColumnDefinition Width="120"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
</Grid.ColumnDefinitions>
</Grid.ColumnDefinitions>
<!-- CAM 1 -->
<!-- 标记 -->
<TextBlock Text="CAM 1" Foreground="White" FontSize="18" VerticalAlignment="Center" Grid.Row="0"></TextBlock>
<TextBlock Text="标记" Foreground="White" FontSize="18" VerticalAlignment="Center"></TextBlock>
<fcommon:HotkeyBox Grid.Column="1" Hotkey="{Binding Path=ErrorTagCAM1,Mode=TwoWay}" Height="30"
<fcommon:HotkeyBox Grid.Column="1" Hotkey="{Binding Path=ErrorTagActivedCAM,Mode=TwoWay}" Height="30"
Style="{StaticResource HotkeyBox_Setting}" Margin="0,0,20,0"></fcommon:HotkeyBox>
<!-- CAM 2 -->
<TextBlock Text="CAM 2" Foreground="White" FontSize="18" VerticalAlignment="Center" Grid.Row="0" Grid.Column="2"></TextBlock>
<fcommon:HotkeyBox Grid.Column="3" Hotkey="{Binding Path=ErrorTagCAM2,Mode=TwoWay}" Height="30" Grid.Row="0"
Style="{StaticResource HotkeyBox_Setting}" Margin="0,0,20,0"></fcommon:HotkeyBox>
<!-- CAM 3 -->
<TextBlock Text="CAM 3" Foreground="White" FontSize="18" VerticalAlignment="Center" Grid.Row="1"></TextBlock>
<fcommon:HotkeyBox Grid.Column="1" Hotkey="{Binding Path=ErrorTagCAM3,Mode=TwoWay}" Height="30" Grid.Row="1"
Style="{StaticResource HotkeyBox_Setting}" Margin="0,0,20,0"></fcommon:HotkeyBox>
<!-- CAM 4 -->
<TextBlock Text="CAM 4" Foreground="White" FontSize="18" VerticalAlignment="Center" Grid.Row="1" Grid.Column="2"></TextBlock>
<fcommon:HotkeyBox Grid.Column="3" Hotkey="{Binding Path=ErrorTagCAM4,Mode=TwoWay}" Height="30" Grid.Row="1"
Style="{StaticResource HotkeyBox_Setting}" Margin="0,0,20,0"></fcommon:HotkeyBox>
Style="{StaticResource HotkeyBox_Setting}" Margin="0,0,20,0"></fcommon:HotkeyBox>
<!--
当前激活窗口
-->
<!--
取消标记
-->
<TextBlock Text="
当前激活窗口" Foreground="White" FontSize="18" VerticalAlignment="Center" Grid.Row
="2"></TextBlock>
<TextBlock Text="
取消标记" Foreground="White" FontSize="18" VerticalAlignment="Center" Grid.Column
="2"></TextBlock>
<fcommon:HotkeyBox Grid.Column="
1" Hotkey="{Binding Path=ErrorTagActivedCAM,Mode=TwoWay}" Height="30" Grid.Row="2"
<fcommon:HotkeyBox Grid.Column="
3" Hotkey="{Binding Path=CancelErrorTagActivedCAM,Mode=TwoWay}" Height="30"
Style="{StaticResource HotkeyBox_Setting}" Margin="0,0,20,0"></fcommon:HotkeyBox>
Style="{StaticResource HotkeyBox_Setting}" Margin="0,0,20,0"></fcommon:HotkeyBox>
</Grid>
</Grid>
</Grid>
</Grid>
...
...
VIZ.H2V.Module/SystemSetting/ViewModel/HotkeySettingPanelViewModel.cs
View file @
c1db4d55
...
@@ -379,77 +379,32 @@ namespace VIZ.H2V.Module
...
@@ -379,77 +379,32 @@ namespace VIZ.H2V.Module
// -----------------------------------------------------------------------
// -----------------------------------------------------------------------
// 错误标记
// 错误标记
#
region
ErrorTagCAM1
--
错误标记
视图
1
#
region
ErrorTagActivedCAM
--
错误标记
当前激活的视图
private
string
errorTagCAM1
;
/// <summary>
/// 错误标记 视图1
/// </summary>
[
HotkeyProperty
]
public
string
ErrorTagCAM1
{
get
{
return
errorTagCAM1
;
}
set
{
errorTagCAM1
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
ErrorTagCAM1
));
}
}
#
endregion
#
region
ErrorTagCAM2
--
错误标记
视图
2
private
string
errorTagCAM2
;
/// <summary>
/// 错误标记 视图2
/// </summary>
[
HotkeyProperty
]
public
string
ErrorTagCAM2
{
get
{
return
errorTagCAM2
;
}
set
{
errorTagCAM2
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
ErrorTagCAM2
));
}
}
#
endregion
#
region
ErrorTagCAM3
--
错误标记
视图
3
private
string
errorTagCAM3
;
/// <summary>
/// 错误标记 视图3
/// </summary>
[
HotkeyProperty
]
public
string
ErrorTagCAM3
{
get
{
return
errorTagCAM3
;
}
set
{
errorTagCAM3
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
ErrorTagCAM3
));
}
}
#
endregion
#
region
ErrorTagCAM4
--
错误标记
视图
4
private
string
errorTag
CAM4
;
private
string
errorTag
ActivedCAM
;
/// <summary>
/// <summary>
/// 错误标记
视图4
/// 错误标记
当前激活的视图
/// </summary>
/// </summary>
[
HotkeyProperty
]
[
HotkeyProperty
]
public
string
ErrorTag
CAM4
public
string
ErrorTag
ActivedCAM
{
{
get
{
return
errorTag
CAM4
;
}
get
{
return
errorTag
ActivedCAM
;
}
set
{
errorTag
CAM4
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
ErrorTagCAM4
));
}
set
{
errorTag
ActivedCAM
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
ErrorTagActivedCAM
));
}
}
}
#
endregion
#
endregion
#
region
ErrorTagActivedCAM
--
错误标记
当前激活
的视图
#
region
CancelErrorTagActivedCAM
--
取消错误标记
当前激活对
的视图
private
string
e
rrorTagActivedCAM
;
private
string
cancelE
rrorTagActivedCAM
;
/// <summary>
/// <summary>
///
错误标记 当前激活
的视图
///
取消错误标记 当前激活对
的视图
/// </summary>
/// </summary>
[
HotkeyProperty
]
[
HotkeyProperty
]
public
string
ErrorTagActivedCAM
public
string
Cancel
ErrorTagActivedCAM
{
{
get
{
return
e
rrorTagActivedCAM
;
}
get
{
return
cancelE
rrorTagActivedCAM
;
}
set
{
errorTagActivedCAM
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
ErrorTagActivedCAM
));
}
set
{
cancelErrorTagActivedCAM
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
Cancel
ErrorTagActivedCAM
));
}
}
}
#
endregion
#
endregion
...
@@ -500,11 +455,8 @@ namespace VIZ.H2V.Module
...
@@ -500,11 +455,8 @@ namespace VIZ.H2V.Module
this
.
ActiveCAM4
=
this
.
HotkeyConfig
.
ActiveCAM4
;
this
.
ActiveCAM4
=
this
.
HotkeyConfig
.
ActiveCAM4
;
// 错误标记
// 错误标记
this
.
ErrorTagCAM1
=
this
.
HotkeyConfig
.
ErrorTagCAM1
;
this
.
ErrorTagCAM2
=
this
.
HotkeyConfig
.
ErrorTagCAM2
;
this
.
ErrorTagCAM3
=
this
.
HotkeyConfig
.
ErrorTagCAM3
;
this
.
ErrorTagCAM4
=
this
.
HotkeyConfig
.
ErrorTagCAM4
;
this
.
ErrorTagActivedCAM
=
this
.
HotkeyConfig
.
ErrorTagActivedCAM
;
this
.
ErrorTagActivedCAM
=
this
.
HotkeyConfig
.
ErrorTagActivedCAM
;
this
.
CancelErrorTagActivedCAM
=
this
.
HotkeyConfig
.
CancelErrorTagActivedCAM
;
}
}
#
endregion
#
endregion
...
@@ -556,16 +508,10 @@ namespace VIZ.H2V.Module
...
@@ -556,16 +508,10 @@ namespace VIZ.H2V.Module
return
true
;
return
true
;
// 错误标记
// 错误标记
if
(
this
.
ErrorTagCAM1
!=
this
.
HotkeyConfig
.
ErrorTagCAM1
)
return
true
;
if
(
this
.
ErrorTagCAM2
!=
this
.
HotkeyConfig
.
ErrorTagCAM2
)
return
true
;
if
(
this
.
ErrorTagCAM3
!=
this
.
HotkeyConfig
.
ErrorTagCAM3
)
return
true
;
if
(
this
.
ErrorTagCAM4
!=
this
.
HotkeyConfig
.
ErrorTagCAM4
)
return
true
;
if
(
this
.
ErrorTagActivedCAM
!=
this
.
HotkeyConfig
.
ErrorTagActivedCAM
)
if
(
this
.
ErrorTagActivedCAM
!=
this
.
HotkeyConfig
.
ErrorTagActivedCAM
)
return
true
;
return
true
;
if
(
this
.
CancelErrorTagActivedCAM
!=
this
.
HotkeyConfig
.
CancelErrorTagActivedCAM
)
return
true
;
// 不需要保存
// 不需要保存
return
false
;
return
false
;
...
@@ -602,11 +548,8 @@ namespace VIZ.H2V.Module
...
@@ -602,11 +548,8 @@ namespace VIZ.H2V.Module
this
.
HotkeyConfig
.
ActiveCAM4
=
this
.
ActiveCAM4
;
this
.
HotkeyConfig
.
ActiveCAM4
=
this
.
ActiveCAM4
;
// 错误标记
// 错误标记
this
.
HotkeyConfig
.
ErrorTagCAM1
=
this
.
ErrorTagCAM1
;
this
.
HotkeyConfig
.
ErrorTagCAM2
=
this
.
ErrorTagCAM2
;
this
.
HotkeyConfig
.
ErrorTagCAM3
=
this
.
ErrorTagCAM3
;
this
.
HotkeyConfig
.
ErrorTagCAM4
=
this
.
ErrorTagCAM4
;
this
.
HotkeyConfig
.
ErrorTagActivedCAM
=
this
.
ErrorTagActivedCAM
;
this
.
HotkeyConfig
.
ErrorTagActivedCAM
=
this
.
ErrorTagActivedCAM
;
this
.
HotkeyConfig
.
CancelErrorTagActivedCAM
=
this
.
CancelErrorTagActivedCAM
;
// 更新配置
// 更新配置
ApplicationDomainEx
.
LiteDbContext
.
HotkeyConfig
.
Upsert
(
this
.
HotkeyConfig
);
ApplicationDomainEx
.
LiteDbContext
.
HotkeyConfig
.
Upsert
(
this
.
HotkeyConfig
);
...
...
VIZ.H2V.Storage/CSV/Log/SystemLogStringFormats.cs
View file @
c1db4d55
...
@@ -70,5 +70,10 @@ namespace VIZ.H2V.Storage
...
@@ -70,5 +70,10 @@ namespace VIZ.H2V.Storage
/// 算法错误标记
/// 算法错误标记
/// </summary>
/// </summary>
public
const
string
ALGORITHM_ERROR_TAG
=
"算法错误标记,[类型:{0}],<坐标:({1},{2},{3},{4}), 时码: {5}>"
;
public
const
string
ALGORITHM_ERROR_TAG
=
"算法错误标记,[类型:{0}],<坐标:({1},{2},{3},{4}), 时码: {5}>"
;
/// <summary>
/// 算法取消错误标记
/// </summary>
public
const
string
ALGORITHM_CANCEL_ERROR_TAG
=
"算法取消错误标记,[类型:{0}],<时码: {1}>"
;
}
}
}
}
VIZ.H2V.Storage/Init/Config/AlgorithmConfig.cs
View file @
c1db4d55
...
@@ -23,5 +23,11 @@ namespace VIZ.H2V.Storage
...
@@ -23,5 +23,11 @@ namespace VIZ.H2V.Storage
/// </summary>
/// </summary>
[
Ini
(
Section
=
"Algorithm"
,
DefaultValue
=
"30000"
,
Type
=
typeof
(
int
))]
[
Ini
(
Section
=
"Algorithm"
,
DefaultValue
=
"30000"
,
Type
=
typeof
(
int
))]
public
string
ALGORITHM_STOP_TIMEOUT
{
get
;
set
;
}
public
string
ALGORITHM_STOP_TIMEOUT
{
get
;
set
;
}
/// <summary>
/// ALGORITHM_TARGET_BOX_LOST_FRAME
/// </summary>
[
Ini
(
Section
=
"Algorithm"
,
DefaultValue
=
"25"
,
Type
=
typeof
(
int
))]
public
string
ALGORITHM_TARGET_BOX_LOST_FRAME
{
get
;
set
;
}
}
}
}
}
VIZ.H2V.Storage/LiteDB/System/HotkeyConfig.cs
View file @
c1db4d55
...
@@ -98,28 +98,13 @@ namespace VIZ.H2V.Storage
...
@@ -98,28 +98,13 @@ namespace VIZ.H2V.Storage
public
string
ActiveCAM4
{
get
;
set
;
}
=
"F4"
;
public
string
ActiveCAM4
{
get
;
set
;
}
=
"F4"
;
/// <summary>
/// <summary>
/// 错误标记 视图1
/// 错误标记 当前激活的视图
/// </summary>
public
string
ErrorTagCAM1
{
get
;
set
;
}
=
"Ctrl + D1"
;
/// <summary>
/// 错误标记 视图2
/// </summary>
public
string
ErrorTagCAM2
{
get
;
set
;
}
=
"Ctrl + D2"
;
/// <summary>
/// 错误标记 视图3
/// </summary>
public
string
ErrorTagCAM3
{
get
;
set
;
}
=
"Ctrl + D3"
;
/// <summary>
/// 错误标记 视图4
/// </summary>
/// </summary>
public
string
ErrorTag
CAM4
{
get
;
set
;
}
=
"Ctrl + D4
"
;
public
string
ErrorTag
ActivedCAM
{
get
;
set
;
}
=
"Q
"
;
/// <summary>
/// <summary>
///
错误标记 当前激活的视图
///
取消错误标记 当前激活的窗口
/// </summary>
/// </summary>
public
string
ErrorTagActivedCAM
{
get
;
set
;
}
=
"Q
"
;
public
string
CancelErrorTagActivedCAM
{
get
;
set
;
}
=
"R
"
;
}
}
}
}
VIZ.H2V/config/config.ini
View file @
c1db4d55
...
@@ -80,4 +80,6 @@ ALGORITHM_PYTHON_PATH=E:\Projects\VIZ.H2V\VIZ.H2V.UdpTestTool\bin\x64\Debug\VIZ.
...
@@ -80,4 +80,6 @@ ALGORITHM_PYTHON_PATH=E:\Projects\VIZ.H2V\VIZ.H2V.UdpTestTool\bin\x64\Debug\VIZ.
;算法停止超时时间(单位:毫秒)
;算法停止超时时间(单位:毫秒)
ALGORITHM_STOP_TIMEOUT
=
5000
ALGORITHM_STOP_TIMEOUT
=
5000
;是否显示目标框
;是否显示目标框
ALGORITHM_IS_SHOW_TARGET_BOX
=
true
ALGORITHM_IS_SHOW_TARGET_BOX
=
true
\ No newline at end of file
;算法目标框连续丢失帧数(如果目标框连续丢失则改变指示灯状态)
ALGORITHM_TARGET_BOX_LOST_FRAME
=
25
\ No newline at end of file
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