Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
V
VIZ.ElectricRabbit
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.ElectricRabbit
Commits
dd8f2990
Commit
dd8f2990
authored
Oct 28, 2022
by
liulongfei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复差值计算错误的bug
parent
6a4f1e1c
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
4 deletions
+37
-4
VIZ.ElectricRabbit.Module/MainView/View/MainView.xaml
+6
-2
VIZ.ElectricRabbit.Module/MainView/ViewModel/MainViewModel.cs
+31
-2
No files found.
VIZ.ElectricRabbit.Module/MainView/View/MainView.xaml
View file @
dd8f2990
...
...
@@ -68,8 +68,12 @@
DifferenceValue="{Binding DifferenceValue,Mode=OneWay}"
LeftBrush="#066FA5" RightBrush="#F70044" SafeBrush="#11CD86"></common:ArrowShape>
</fcommon:FlashingBorder>
<!--<Slider VerticalAlignment="Center" Width="200" Minimum="-100" Maximum="100"
x:Name="slider" Value="0" Grid.ColumnSpan="2" HorizontalAlignment="Right"></Slider>-->
<fcommon:DebugBorder HorizontalAlignment="Left" VerticalAlignment="Center">
<StackPanel Orientation="Horizontal">
<TextBlock Text="算法FPS:" Foreground="Red" FontSize="20" Margin="10,0,10,0"></TextBlock>
<TextBlock Text="{Binding AlgorithmFPS.FPS}" Foreground="Red" FontSize="20"></TextBlock>
</StackPanel>
</fcommon:DebugBorder>
<!-- 主视频区域 -->
<fcommon:VideoControl x:Name="video" Grid.Row="1" Margin="10,0,44,0"></fcommon:VideoControl>
<CheckBox x:Name="cbShowSettingView" Grid.Row="1" Style="{StaticResource CheckBox_Expand}"
...
...
VIZ.ElectricRabbit.Module/MainView/ViewModel/MainViewModel.cs
View file @
dd8f2990
...
...
@@ -21,6 +21,9 @@ namespace VIZ.ElectricRabbit.Module
// 初始化命令
this
.
InitCommand
();
// 初始化FPS
this
.
InitFPS
();
// 初始化消息
this
.
InitMessage
();
}
...
...
@@ -44,6 +47,15 @@ namespace VIZ.ElectricRabbit.Module
ApplicationDomainEx
.
MessageManager
.
Register
<
AlgorithmDectectMessage
>(
this
,
this
.
OnAlgorithmDectectMessage
);
}
/// <summary>
/// 初始化FPS
/// </summary>
private
void
InitFPS
()
{
this
.
AlgorithmFPS
=
new
FPSHelper
();
this
.
AlgorithmFPS
.
Start
();
}
// ================================================================================
// Property
// ================================================================================
...
...
@@ -90,6 +102,20 @@ namespace VIZ.ElectricRabbit.Module
#
endregion
#
region
AlgorithmFPS
--
算法
FPS
private
FPSHelper
algorithmFPS
;
/// <summary>
/// 算法FPS
/// </summary>
public
FPSHelper
AlgorithmFPS
{
get
{
return
algorithmFPS
;
}
set
{
algorithmFPS
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
AlgorithmFPS
));
}
}
#
endregion
// ================================================================================
// Command
// ================================================================================
...
...
@@ -266,8 +292,11 @@ namespace VIZ.ElectricRabbit.Module
view
.
video
.
UpdateTrackingBox
(
infos
);
// 更新差值
double
center
=
(
right
-
left
)
/
2d
;
this
.
DifferenceValue
=
this
.
SettingViewModel
.
SafeAxis
-
center
;
double
center
=
left
+
(
right
-
left
)
/
2d
;
this
.
DifferenceValue
=
center
-
this
.
SettingViewModel
.
SafeAxis
;
// 更新FPS
this
.
AlgorithmFPS
.
CalcFps
();
}
}
}
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