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
645876fb
Commit
645876fb
authored
Feb 14, 2023
by
liulongfei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
裁切比例选择
parent
b0dea177
Show whitespace changes
Inline
Side-by-side
Showing
25 changed files
with
255 additions
and
25 deletions
+255
-25
VIZ.H2V.Connection/UDP/Algorithm/Provider/AlgorithmProvider__crop_roi..cs
+2
-0
VIZ.H2V.Connection/UDP/Algorithm/Provider/AlgorithmProvider__detect.cs
+4
-0
VIZ.H2V.Connection/UDP/Algorithm/Signal/Recv/AlgorithmRecvPackage__crop_roi.cs
+10
-0
VIZ.H2V.Connection/UDP/Algorithm/Signal/Recv/AlgorithmRecvPackage__detect.cs
+10
-0
VIZ.H2V.Connection/UDP/Clip/Sender/ClipSender.cs
+2
-0
VIZ.H2V.Connection/UDP/Clip/Signal/Send/ClipPackage__crop_roi.cs
+10
-0
VIZ.H2V.Connection/VIZ.H2V.Connection.csproj
+4
-0
VIZ.H2V.Domain/ApplicationDomainEx.cs
+19
-0
VIZ.H2V.Domain/Message/Algorithm/Implementation/AlgorithmMessage__crop_roi.cs
+10
-0
VIZ.H2V.Domain/Message/Algorithm/Implementation/AlgorithmMessage__detect.cs
+10
-0
VIZ.H2V.Domain/Message/Algorithm/Interface/IAlgorithmMessage__roi.cs
+10
-0
VIZ.H2V.Domain/Model/Config/VideoClipModeModel.cs
+43
-0
VIZ.H2V.Domain/VIZ.H2V.Domain.csproj
+1
-0
VIZ.H2V.Module.Resource/Icons/exclamatory_mark_32x32.png
+0
-0
VIZ.H2V.Module.Resource/VIZ.H2V.Module.Resource.csproj
+4
-0
VIZ.H2V.Module/NDIMainView/ViewModel/NDIMainViewModel.cs
+1
-1
VIZ.H2V.Module/NDIView/Controller/Manual/ManualController.cs
+2
-2
VIZ.H2V.Module/NDIView/VieweModel/NDIViewModel.Manual_NDI.cs
+6
-5
VIZ.H2V.Module/NDIView/VieweModel/NDIViewModel.Message.cs
+35
-1
VIZ.H2V.Module/NDIView/VieweModel/NDIViewModel.Property.cs
+1
-6
VIZ.H2V.Module/NDIView/VieweModel/NDIViewModel.cs
+1
-1
VIZ.H2V.Module/SystemSetting/View/StyleSettingPanelView.xaml
+28
-1
VIZ.H2V.Module/SystemSetting/ViewModel/StyleSettingPanelViewModel.cs
+40
-0
VIZ.H2V.Storage/LiteDB/Algorithm/AlgorithmBase.cs
+0
-5
VIZ.H2V/config/config.ini
+2
-3
No files found.
VIZ.H2V.Connection/UDP/Algorithm/Provider/AlgorithmProvider__crop_roi..cs
View file @
645876fb
...
...
@@ -43,6 +43,8 @@ namespace VIZ.H2V.Connection
{
message
.
roi
=
new
RawRectangleF
(
package
.
roi
[
0
],
package
.
roi
[
1
],
package
.
roi
[
2
],
package
.
roi
[
3
]);
}
message
.
center_x
=
package
.
center_x
;
message
.
center_y
=
package
.
center_y
;
if
(
package
.
target_bbox
!=
null
&&
package
.
target_bbox
.
Count
==
4
)
{
message
.
target_bbox
=
new
RawRectangleF
(
package
.
target_bbox
[
0
],
package
.
target_bbox
[
1
],
package
.
target_bbox
[
2
],
package
.
target_bbox
[
3
]);
...
...
VIZ.H2V.Connection/UDP/Algorithm/Provider/AlgorithmProvider__detect.cs
View file @
645876fb
...
...
@@ -8,6 +8,7 @@ using VIZ.Framework.Core;
using
VIZ.Framework.Connection
;
using
VIZ.H2V.Domain
;
using
SharpDX.Mathematics.Interop
;
using
VIZ.Framework.Storage
;
namespace
VIZ.H2V.Connection
{
...
...
@@ -50,6 +51,9 @@ namespace VIZ.H2V.Connection
message
.
roi
=
new
RawRectangleF
(
package
.
roi
[
0
],
package
.
roi
[
1
],
package
.
roi
[
2
],
package
.
roi
[
3
]);
}
message
.
center_x
=
package
.
center_x
;
message
.
center_y
=
package
.
center_y
;
ApplicationDomainEx
.
MessageManager
.
Send
(
message
);
}
}
...
...
VIZ.H2V.Connection/UDP/Algorithm/Signal/Recv/AlgorithmRecvPackage__crop_roi.cs
View file @
645876fb
...
...
@@ -24,6 +24,16 @@ namespace VIZ.H2V.Connection
public
List
<
int
>
roi
{
get
;
set
;
}
/// <summary>
/// 中心值X
/// </summary>
public
int
?
center_x
{
get
;
set
;
}
/// <summary>
/// 中心值Y
/// </summary>
public
int
?
center_y
{
get
;
set
;
}
/// <summary>
/// 跟踪目标(左上角x,y,右下角x,y)
/// </summary>
public
List
<
int
>
target_bbox
{
get
;
set
;
}
...
...
VIZ.H2V.Connection/UDP/Algorithm/Signal/Recv/AlgorithmRecvPackage__detect.cs
View file @
645876fb
...
...
@@ -23,6 +23,16 @@ namespace VIZ.H2V.Connection
public
List
<
int
>
roi
{
get
;
set
;
}
/// <summary>
/// 中心值X
/// </summary>
public
int
?
center_x
{
get
;
set
;
}
/// <summary>
/// 中心值Y
/// </summary>
public
int
?
center_y
{
get
;
set
;
}
/// <summary>
/// 时间码
/// </summary>
public
long
timecode
{
get
;
set
;
}
...
...
VIZ.H2V.Connection/UDP/Clip/Sender/ClipSender.cs
View file @
645876fb
...
...
@@ -32,6 +32,8 @@ namespace VIZ.H2V.Connection
ClipPackage__crop_roi
package
=
new
ClipPackage__crop_roi
();
package
.
id
=
id
;
package
.
roi
=
roi
;
package
.
center_x
=
(
roi
[
0
]
+
roi
[
2
])
/
2
;
package
.
center_y
=
height
/
2
;
package
.
width
=
width
;
package
.
height
=
height
;
package
.
timecode
=
timeCode
;
...
...
VIZ.H2V.Connection/UDP/Clip/Signal/Send/ClipPackage__crop_roi.cs
View file @
645876fb
...
...
@@ -22,6 +22,16 @@ namespace VIZ.H2V.Connection
public
List
<
int
>
roi
{
get
;
set
;
}
=
new
List
<
int
>();
/// <summary>
/// 中心值X
/// </summary>
public
int
?
center_x
{
get
;
set
;
}
/// <summary>
/// 中心值Y
/// </summary>
public
int
?
center_y
{
get
;
set
;
}
/// <summary>
/// 宽度
/// </summary>
public
int
width
{
get
;
set
;
}
...
...
VIZ.H2V.Connection/VIZ.H2V.Connection.csproj
View file @
645876fb
...
...
@@ -111,6 +111,10 @@
<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.Core\VIZ.H2V.Core.csproj">
<Project>{6b1aba83-bf38-40f6-9f4e-bd2ed95898a4}</Project>
<Name>VIZ.H2V.Core</Name>
...
...
VIZ.H2V.Domain/ApplicationDomainEx.cs
View file @
645876fb
...
...
@@ -5,6 +5,7 @@ using System.Text;
using
System.Threading.Tasks
;
using
VIZ.Framework.Core
;
using
VIZ.Framework.Domain
;
using
VIZ.Framework.Storage
;
using
VIZ.H2V.Storage
;
namespace
VIZ.H2V.Domain
...
...
@@ -33,5 +34,23 @@ namespace VIZ.H2V.Domain
/// 当前使用的GPIO模型
/// </summary>
public
static
GPIOModel
GPIOModel
{
get
;
set
;
}
// ---------------------------------------
// 裁切配置
/// <summary>
/// 视频裁切框宽度
/// </summary>
public
static
int
VIDEO_CLIP_BOX_WIDTH
{
get
;
set
;
}
=
ApplicationDomainEx
.
IniStorage
.
GetValue
<
VideoConfig
,
int
>(
p
=>
p
.
VIDEO_CLIP_BOX_WIDTH
);
/// <summary>
/// 视频宽度
/// </summary>
public
static
int
VIDEO_WIDTH
{
get
;
set
;
}
=
1920
;
/// <summary>
/// 视频高度
/// </summary>
public
static
int
VIDEO_HEIGHT
{
get
;
set
;
}
=
1080
;
}
}
VIZ.H2V.Domain/Message/Algorithm/Implementation/AlgorithmMessage__crop_roi.cs
View file @
645876fb
...
...
@@ -19,6 +19,16 @@ namespace VIZ.H2V.Domain
public
RawRectangleF
?
roi
{
get
;
set
;
}
/// <summary>
/// 中心值X
/// </summary>
public
int
?
center_x
{
get
;
set
;
}
/// <summary>
/// 中心值Y
/// </summary>
public
int
?
center_y
{
get
;
set
;
}
/// <summary>
/// 跟踪坐标
/// </summary>
public
RawRectangleF
?
target_bbox
{
get
;
set
;
}
...
...
VIZ.H2V.Domain/Message/Algorithm/Implementation/AlgorithmMessage__detect.cs
View file @
645876fb
...
...
@@ -23,6 +23,16 @@ namespace VIZ.H2V.Domain
public
RawRectangleF
?
roi
{
get
;
set
;
}
/// <summary>
/// 中心坐标X
/// </summary>
public
int
?
center_x
{
get
;
set
;
}
/// <summary>
/// 中心坐标Y
/// </summary>
public
int
?
center_y
{
get
;
set
;
}
/// <summary>
/// 时间码
/// </summary>
public
long
timecode
{
get
;
set
;
}
...
...
VIZ.H2V.Domain/Message/Algorithm/Interface/IAlgorithmMessage__roi.cs
View file @
645876fb
...
...
@@ -21,5 +21,15 @@ namespace VIZ.H2V.Domain
/// 裁切坐标
/// </summary>
RawRectangleF
?
roi
{
get
;
set
;
}
/// <summary>
/// 中心值X
/// </summary>
int
?
center_x
{
get
;
set
;
}
/// <summary>
/// 中心值Y
/// </summary>
int
?
center_y
{
get
;
set
;
}
}
}
VIZ.H2V.Domain/Model/Config/VideoClipModeModel.cs
0 → 100644
View file @
645876fb
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
using
VIZ.Framework.Core
;
namespace
VIZ.H2V.Domain
{
/// <summary>
/// 视频裁切模式模型
/// </summary>
public
class
VideoClipModeModel
:
ModelBase
{
#
region
Name
--
名称
private
string
name
;
/// <summary>
/// 名称
/// </summary>
public
string
Name
{
get
{
return
name
;
}
set
{
name
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
Name
));
}
}
#
endregion
#
region
Value
--
裁切值
private
int
_value
;
/// <summary>
/// 裁切值
/// </summary>
public
int
Value
{
get
{
return
_value
;
}
set
{
_value
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
Value
));
}
}
#
endregion
}
}
VIZ.H2V.Domain/VIZ.H2V.Domain.csproj
View file @
645876fb
...
...
@@ -79,6 +79,7 @@
<Compile Include="Model\Algorithm\AlgorithmBorderScenceModel.cs" />
<Compile Include="Model\Algorithm\AlgorithmStrategyGroupModel.cs" />
<Compile Include="Model\Algorithm\AlgorithmStrategyModel.cs" />
<Compile Include="Model\Config\VideoClipModeModel.cs" />
<Compile Include="Model\Navigation3D\Navigation3DMappingDomainModel.cs" />
<Compile Include="Model\Navigation3D\Navigation3DMappingGroupModel.cs" />
<Compile Include="Model\NDI\NDIStreamInfoModel.cs" />
...
...
VIZ.H2V.Module.Resource/Icons/exclamatory_mark_32x32.png
0 → 100644
View file @
645876fb
936 Bytes
VIZ.H2V.Module.Resource/VIZ.H2V.Module.Resource.csproj
View file @
645876fb
...
...
@@ -272,5 +272,8 @@
<ItemGroup>
<Resource Include="Icons\full_four_24x24.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Icons\exclamatory_mark_32x32.png" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
\ No newline at end of file
VIZ.H2V.Module/NDIMainView/ViewModel/NDIMainViewModel.cs
View file @
645876fb
...
...
@@ -365,7 +365,7 @@ namespace VIZ.H2V.Module
private
void
Setting
()
{
SystemSettingView
view
=
new
SystemSettingView
();
NoneWindow
window
=
new
NoneWindow
(
1200
,
10
0
0
,
view
);
NoneWindow
window
=
new
NoneWindow
(
1200
,
10
5
0
,
view
);
window
.
Owner
=
this
.
GetWindow
();
window
.
ShowDialog
();
...
...
VIZ.H2V.Module/NDIView/Controller/Manual/ManualController.cs
View file @
645876fb
...
...
@@ -45,7 +45,7 @@ namespace VIZ.H2V.Module
/// <summary>
/// 裁切框目标X坐标
/// </summary>
public
double
ClipBoxTargetX
{
get
;
set
;
}
=
555
;
public
double
ClipBoxTargetX
{
get
;
set
;
}
=
(
ApplicationDomainEx
.
VIDEO_WIDTH
-
ApplicationDomainEx
.
VIDEO_CLIP_BOX_WIDTH
)
/
2
;
/// <summary>
/// 支持
...
...
@@ -63,7 +63,7 @@ namespace VIZ.H2V.Module
// 居中模式直接返回居中位置
if
(
this
.
Support
.
StrategyMode
==
AlgorithmStrategyMode
.
center_mode
)
{
return
this
.
GetCalculationValue_Auto
(
min
,
max
,
555
);
return
this
.
GetCalculationValue_Auto
(
min
,
max
,
(
ApplicationDomainEx
.
VIDEO_WIDTH
-
ApplicationDomainEx
.
VIDEO_CLIP_BOX_WIDTH
)
/
2
);
}
// 手动模式 且 处于激活状态下进行计算
...
...
VIZ.H2V.Module/NDIView/VieweModel/NDIViewModel.Manual_NDI.cs
View file @
645876fb
...
...
@@ -49,8 +49,9 @@ namespace VIZ.H2V.Module
{
SystemConfig
config
=
ApplicationDomainEx
.
LiteDbContext
.
SystemConfig
.
FindAll
().
FirstOrDefault
();
this
.
ManualController
.
ClipBoxSmooth
.
Init
(
555
,
555
,
config
.
ManualSmoothCoeff
);
this
.
ManualController
.
ClipBoxTargetX
=
555
;
int
clipBoxTargetX
=
(
ApplicationDomainEx
.
VIDEO_WIDTH
-
ApplicationDomainEx
.
VIDEO_CLIP_BOX_WIDTH
)
/
2
;
this
.
ManualController
.
ClipBoxSmooth
.
Init
(
clipBoxTargetX
,
clipBoxTargetX
,
config
.
ManualSmoothCoeff
);
this
.
ManualController
.
ClipBoxTargetX
=
clipBoxTargetX
;
}
/// <summary>
...
...
@@ -86,11 +87,11 @@ namespace VIZ.H2V.Module
return
;
}
this
.
ClipBoxX
=
this
.
ManualController
.
GetCalculationValue
(
0d
,
renderInfo
.
Frame
.
Width
-
this
.
CLIP_BOX_WIDTH
);
this
.
ClipBoxX
=
this
.
ManualController
.
GetCalculationValue
(
0d
,
renderInfo
.
Frame
.
Width
-
ApplicationDomainEx
.
VIDEO_
CLIP_BOX_WIDTH
);
ClipBoxInfo
clipBox
=
new
ClipBoxInfo
();
clipBox
.
DrawingBorderWidth
=
this
.
CLIP_BOX_BORDER_WIDTH
;
clipBox
.
SrcRect
=
new
RawRectangleF
((
float
)(
this
.
ClipBoxX
),
0
,
(
float
)(
this
.
ClipBoxX
)
+
(
float
)
this
.
CLIP_BOX_WIDTH
,
renderInfo
.
Frame
.
Height
);
clipBox
.
SrcRect
=
new
RawRectangleF
((
float
)(
this
.
ClipBoxX
),
0
,
(
float
)(
this
.
ClipBoxX
)
+
(
float
)
ApplicationDomainEx
.
VIDEO_
CLIP_BOX_WIDTH
,
renderInfo
.
Frame
.
Height
);
if
(
this
.
StrategyMode
==
AlgorithmStrategyMode
.
manual_mode
)
{
clipBox
.
DrawingBorderColor
=
this
.
IsActive
?
this
.
ClipBoxStrokeColor_Manual
:
this
.
ClipBoxStrokeColor_ManualNotfoucs
;
...
...
@@ -152,7 +153,7 @@ namespace VIZ.H2V.Module
UdpEndpointManager
manager_clip
=
ConnectionManager
.
UdpConnection
.
GetEndpointManager
(
$"
{
this
.
ViewKey
}
__CLIP"
);
if
(
manager_clip
!=
null
)
{
ClipSender
.
CropRoi
(
manager_clip
,
0
,
roi
,
CLIP_BOX_WIDTH
,
e
.
Frame
.
Height
,
e
.
Frame
.
TimeStamp
);
ClipSender
.
CropRoi
(
manager_clip
,
0
,
roi
,
ApplicationDomainEx
.
VIDEO_
CLIP_BOX_WIDTH
,
e
.
Frame
.
Height
,
e
.
Frame
.
TimeStamp
);
}
}
}
...
...
VIZ.H2V.Module/NDIView/VieweModel/NDIViewModel.Message.cs
View file @
645876fb
...
...
@@ -180,7 +180,8 @@ namespace VIZ.H2V.Module
return
;
}
RawRectangleF
rect
=
RawRectangleFExpand
.
ClipInVideoFrame
(
msg
.
roi
.
Value
,
0
,
0
,
renderInfo
.
Frame
.
Width
,
renderInfo
.
Frame
.
Height
);
RawRectangleF
src
=
this
.
GetRawRectangleF
(
msg
,
renderInfo
.
Frame
.
Width
,
renderInfo
.
Frame
.
Height
);
RawRectangleF
rect
=
RawRectangleFExpand
.
ClipInVideoFrame
(
src
,
0
,
0
,
renderInfo
.
Frame
.
Width
,
renderInfo
.
Frame
.
Height
);
if
(!
RawRectangleFExpand
.
IsEffective
(
rect
))
{
...
...
@@ -373,5 +374,38 @@ namespace VIZ.H2V.Module
return
info
;
}
/// <summary>
/// 获取转化前的裁切矩形
/// </summary>
/// <param name="msg">消息</param>
/// <param name="width">画面宽度</param>
/// <param name="height">画面高度</param>
/// <returns>裁切矩形</returns>
private
RawRectangleF
GetRawRectangleF
(
IAlgorithmMessage__roi
msg
,
int
width
,
int
height
)
{
if
(
msg
.
center_x
==
null
)
{
return
msg
.
roi
.
Value
;
}
int
VIDEO_CLIP_BOX_WIDTH
=
ApplicationDomainEx
.
VIDEO_CLIP_BOX_WIDTH
;
int
half_width
=
width
/
2
;
int
x_max
=
msg
.
center_x
.
Value
+
half_width
;
int
x_min
=
x_max
-
VIDEO_CLIP_BOX_WIDTH
;
if
(
x_min
<
0
)
{
x_min
=
0
;
x_max
=
VIDEO_CLIP_BOX_WIDTH
;
}
if
(
x_max
>
width
)
{
x_max
=
width
;
x_min
=
width
-
VIDEO_CLIP_BOX_WIDTH
;
}
return
new
RawRectangleF
(
x_min
,
0
,
x_max
,
height
);
}
}
}
VIZ.H2V.Module/NDIView/VieweModel/NDIViewModel.Property.cs
View file @
645876fb
...
...
@@ -32,11 +32,6 @@ namespace VIZ.H2V.Module
/// <summary>
/// 剪切框宽度
/// </summary>
private
readonly
int
CLIP_BOX_WIDTH
=
ApplicationDomainEx
.
IniStorage
.
GetValue
<
VideoConfig
,
int
>(
p
=>
p
.
VIDEO_CLIP_BOX_WIDTH
);
/// <summary>
/// 剪切框宽度
/// </summary>
private
readonly
int
CLIP_BOX_BORDER_WIDTH
=
ApplicationDomainEx
.
IniStorage
.
GetValue
<
VideoConfig
,
int
>(
p
=>
p
.
VIDEO_CLIP_BOX_BORDER_WIDTH
);
/// <summary>
...
...
@@ -310,7 +305,7 @@ namespace VIZ.H2V.Module
#
region
ClipBoxX
--
裁切框
X
坐标
private
double
clipBoxX
=
555
;
private
double
clipBoxX
=
(
ApplicationDomainEx
.
VIDEO_WIDTH
-
ApplicationDomainEx
.
VIDEO_CLIP_BOX_WIDTH
)
/
2
;
/// <summary>
/// 裁切框X坐标
/// </summary>
...
...
VIZ.H2V.Module/NDIView/VieweModel/NDIViewModel.cs
View file @
645876fb
...
...
@@ -234,7 +234,7 @@ namespace VIZ.H2V.Module
{
int
left
=
(
int
)
this
.
ClipBoxX
;
int
top
=
0
;
int
right
=
left
+
this
.
CLIP_BOX_WIDTH
;
int
right
=
left
+
ApplicationDomainEx
.
VIDEO_
CLIP_BOX_WIDTH
;
int
bottom
=
1080
;
return
new
List
<
int
>
{
left
,
top
,
right
,
bottom
};
...
...
VIZ.H2V.Module/SystemSetting/View/StyleSettingPanelView.xaml
View file @
645876fb
...
...
@@ -39,7 +39,8 @@
<RowDefinition Height="60"></RowDefinition>
<RowDefinition Height="60"></RowDefinition>
<RowDefinition Height="60"></RowDefinition>
<RowDefinition Height="70"></RowDefinition>
<RowDefinition Height="60"></RowDefinition>
<RowDefinition Height="60"></RowDefinition>
<RowDefinition Height="60"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
</Grid.RowDefinitions>
...
...
@@ -162,6 +163,31 @@
<CheckBox Grid.Column="1" Style="{StaticResource CheckBox_Setting}" HorizontalAlignment="Right"
IsChecked="{Binding Path=IsWhenNavigationTouchedChangeToManualMode,Mode=TwoWay}"></CheckBox>
</Grid>
<!-- 裁切比例 -->
<Grid Grid.Row="10">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="200"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="120"></ColumnDefinition>
</Grid.ColumnDefinitions>
<TextBlock Text="裁切比例" Foreground="White" FontSize="18" VerticalAlignment="Center" Grid.Row="2"></TextBlock>
<ComboBox Style="{StaticResource ComboBox_Setting}" Grid.Column="1" Height="40"
ItemsSource="{Binding Path=VideoClipModeItems,Mode=OneWay}"
SelectedValue="{Binding Path=SelectedVideoClipMode,Mode=TwoWay}">
<ComboBox.ItemTemplate>
<DataTemplate>
<Border Background="Transparent" IsHitTestVisible="False">
<TextBlock Text="{Binding Path=Name}" Foreground="White" FontSize="16"></TextBlock>
</Border>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
<StackPanel Grid.Column="2" Orientation="Horizontal" HorizontalAlignment="Right">
<Image Source="/VIZ.H2V.Module.Resource;component/Icons/exclamatory_mark_32x32.png"
Width="18" Height="18" Margin="10,0,10,0" VerticalAlignment="Center"></Image>
<TextBlock Text="重启后生效" VerticalAlignment="Center" Foreground="#aaffffff"></TextBlock>
</StackPanel>
</Grid>
</Grid>
</Border>
</UserControl>
\ No newline at end of file
VIZ.H2V.Module/SystemSetting/ViewModel/StyleSettingPanelViewModel.cs
View file @
645876fb
using
System
;
using
System.Collections.Generic
;
using
System.Collections.ObjectModel
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
using
System.Windows
;
using
System.Windows.Media
;
using
VIZ.Framework.Core
;
using
VIZ.Framework.Storage
;
using
VIZ.H2V.Domain
;
using
VIZ.H2V.Storage
;
...
...
@@ -202,6 +204,34 @@ namespace VIZ.H2V.Module
#
endregion
#
region
VideoClipModeItems
--
视频裁切模式集合
private
ObservableCollection
<
VideoClipModeModel
>
videoClipModeItems
=
new
ObservableCollection
<
VideoClipModeModel
>();
/// <summary>
/// 视频裁切模式集合
/// </summary>
public
ObservableCollection
<
VideoClipModeModel
>
VideoClipModeItems
{
get
{
return
videoClipModeItems
;
}
set
{
videoClipModeItems
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
VideoClipModeItems
));
}
}
#
endregion
#
region
SelectedVideoClipMode
--
当前选中的视频裁切模式
private
VideoClipModeModel
selectedVideoClipMode
;
/// <summary>
/// 当前选中的视频裁切模式
/// </summary>
public
VideoClipModeModel
SelectedVideoClipMode
{
get
{
return
selectedVideoClipMode
;
}
set
{
selectedVideoClipMode
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
SelectedVideoClipMode
));
}
}
#
endregion
// ======================================================================================
// === Commond ===
// ======================================================================================
...
...
@@ -234,6 +264,11 @@ namespace VIZ.H2V.Module
this
.
ManualSmoothCoeff
=
this
.
SystemConfig
.
ManualSmoothCoeff
;
this
.
IsWhenNavigationTouchedChangeToManualMode
=
this
.
SystemConfig
.
IsWhenNavigationTouchedChangeToManualMode
;
this
.
VideoClipModeItems
.
Add
(
new
VideoClipModeModel
{
Name
=
"4:3"
,
Value
=
810
});
this
.
VideoClipModeItems
.
Add
(
new
VideoClipModeModel
{
Name
=
"16:9"
,
Value
=
607
});
this
.
SelectedVideoClipMode
=
this
.
VideoClipModeItems
.
FirstOrDefault
(
p
=>
p
.
Value
==
ApplicationDomainEx
.
VIDEO_CLIP_BOX_WIDTH
)
??
this
.
VideoClipModeItems
[
0
];
// 加载3D鼠标映射模型
this
.
Load3DNavigationMapping
();
}
...
...
@@ -304,6 +339,9 @@ namespace VIZ.H2V.Module
if
(
this
.
IsWhenNavigationTouchedChangeToManualMode
!=
this
.
SystemConfig
.
IsWhenNavigationTouchedChangeToManualMode
)
return
true
;
if
(
this
.
SelectedVideoClipMode
.
Value
!=
ApplicationDomainEx
.
IniStorage
.
GetValue
<
VideoConfig
,
int
>(
p
=>
p
.
VIDEO_CLIP_BOX_WIDTH
))
return
true
;
return
false
;
}
...
...
@@ -328,6 +366,8 @@ namespace VIZ.H2V.Module
ApplicationDomainEx
.
LiteDbContext
.
SystemConfig
.
Update
(
this
.
SystemConfig
);
ApplicationDomainEx
.
IniStorage
.
SetValue
<
VideoConfig
>(
p
=>
p
.
VIDEO_CLIP_BOX_WIDTH
,
this
.
SelectedVideoClipMode
.
Value
);
// 应用
ApplicationDomainEx
.
ServiceManager
.
GetServiceList
<
INDIViewService
>().
ForEach
(
p
=>
{
...
...
VIZ.H2V.Storage/LiteDB/Algorithm/AlgorithmBase.cs
View file @
645876fb
...
...
@@ -58,10 +58,5 @@ namespace VIZ.H2V.Storage
/// 手动校准半径
/// </summary>
public
double
ManualCorrectionRadius
{
get
;
set
;
}
=
200
;
/// <summary>
/// 居中模式裁切框X坐标
/// </summary>
public
double
CenterClipBoxX
{
get
;
set
;
}
=
555
;
}
}
VIZ.H2V/config/config.ini
View file @
645876fb
...
...
@@ -33,7 +33,8 @@ VIDEO_FRAME_SELECTION_BORDER_WIDTH=4
;视频框选边框颜色(格式:#AARRGGBB)
VIDEO_FRAME_SELECTION_BORDER_COLOR
=
#FFFF6D87
;视频剪切宽度(单位:像素)
VIDEO_CLIP_BOX_WIDTH=810
;4:3 ==> 810 16:9 ==> 607
VIDEO_CLIP_BOX_WIDTH=607
;视频剪切边框宽度(单位:像素)
VIDEO_CLIP_BOX_BORDER_WIDTH
=
4
;视频剪切边框颜色
...
...
@@ -58,8 +59,6 @@ VIDEO_MANUAL_CORRECTION_OPACITY=0.2
; === Navigation3D ===
; ============================================================
[Navigation3D]
;3D鼠标X轴偏移最大值
NAVIGATION3D_MAX_VALUE
=
555
;3D鼠标配置名称
NAVIGATION3D_PROFILE_NAME
=
VIZ.H2V
; ============================================================
...
...
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