Commit a3583e62 by 鲁志-悦动

裁切框数据发送数据验证宽和高 And 间隔帧率、间隔像素互斥开始做

parent 6b9432ff
...@@ -10,7 +10,8 @@ namespace VIZ.FGOUT.Connection ...@@ -10,7 +10,8 @@ namespace VIZ.FGOUT.Connection
public string type { get; set; } public string type { get; set; }
public Point point { get; set; } //public Point point { get; set; }
public int[] point { get; set; }
/// <summary> /// <summary>
/// 宽度 /// 宽度
......
...@@ -268,6 +268,7 @@ ...@@ -268,6 +268,7 @@
Height="40" Height="40"
Click="AutoMode_OnClick" Click="AutoMode_OnClick"
Content="{DynamicResource Auto}" Content="{DynamicResource Auto}"
GroupName="_AutoOrManual_"
IsChecked="{Binding Path=IsAutoEnable, Mode=TwoWay}" IsChecked="{Binding Path=IsAutoEnable, Mode=TwoWay}"
Style="{StaticResource RadioButton_NdiMainViewBlue}" /> Style="{StaticResource RadioButton_NdiMainViewBlue}" />
...@@ -329,6 +330,7 @@ ...@@ -329,6 +330,7 @@
Height="40" Height="40"
Click="ManualMode_OnClick" Click="ManualMode_OnClick"
Content="{DynamicResource Manual}" Content="{DynamicResource Manual}"
GroupName="_AutoOrManual_"
IsChecked="{Binding Path=IsEnableTarget, Mode=TwoWay}" IsChecked="{Binding Path=IsEnableTarget, Mode=TwoWay}"
Style="{StaticResource RadioButton_NdiMainViewBlue}" /> Style="{StaticResource RadioButton_NdiMainViewBlue}" />
<!--<CheckBox <!--<CheckBox
...@@ -947,13 +949,20 @@ ...@@ -947,13 +949,20 @@
Grid.Column="1" Grid.Column="1"
HorizontalAlignment="Center" HorizontalAlignment="Center"
Orientation="Horizontal"> Orientation="Horizontal">
<TextBlock <!--<TextBlock
Margin="0,0,3,0" Margin="0,0,3,0"
HorizontalAlignment="Right" HorizontalAlignment="Right"
VerticalAlignment="Center" VerticalAlignment="Center"
FontSize="14" FontSize="14"
Foreground="White" Foreground="White"
Text="{DynamicResource IntervalFrame}" /> Text="{DynamicResource IntervalFrame}" />-->
<RadioButton
Width="100"
Height="40"
Content="{DynamicResource IntervalFrame}"
GroupName="_FrameOrPixel_"
IsChecked="{Binding Path=IsIntervalFrame, Mode=TwoWay}"
Style="{StaticResource RadioButton_NdiMainViewBlue}" />
<TextBox <TextBox
Width="57" Width="57"
InputMethod.IsInputMethodEnabled="False" InputMethod.IsInputMethodEnabled="False"
...@@ -975,13 +984,20 @@ ...@@ -975,13 +984,20 @@
Grid.Column="2" Grid.Column="2"
HorizontalAlignment="Center" HorizontalAlignment="Center"
Orientation="Horizontal"> Orientation="Horizontal">
<TextBlock <!--<TextBlock
Margin="0,0,3,0" Margin="0,0,3,0"
HorizontalAlignment="Right" HorizontalAlignment="Right"
VerticalAlignment="Center" VerticalAlignment="Center"
FontSize="14" FontSize="14"
Foreground="White" Foreground="White"
Text="{DynamicResource IntervalPixel}" /> Text="{DynamicResource IntervalPixel}" />-->
<RadioButton
Width="100"
Height="40"
Content="{DynamicResource IntervalPixel}"
GroupName="_FrameOrPixel_"
IsChecked="{Binding Path=IsIntervalPixel, Mode=TwoWay}"
Style="{StaticResource RadioButton_NdiMainViewBlue}" />
<TextBox <TextBox
Width="57" Width="57"
InputMethod.IsInputMethodEnabled="False" InputMethod.IsInputMethodEnabled="False"
......
...@@ -36,7 +36,7 @@ namespace VIZ.FGOUT.Module ...@@ -36,7 +36,7 @@ namespace VIZ.FGOUT.Module
/// <param name="e"></param> /// <param name="e"></param>
private void ManualMode_OnClick(object sender, RoutedEventArgs e) private void ManualMode_OnClick(object sender, RoutedEventArgs e)
{ {
_ManualMode_.IsChecked = true; //_ManualMode_.IsChecked = true;
} }
/// <summary> /// <summary>
...@@ -46,7 +46,7 @@ namespace VIZ.FGOUT.Module ...@@ -46,7 +46,7 @@ namespace VIZ.FGOUT.Module
/// <param name="e"></param> /// <param name="e"></param>
private void AutoMode_OnClick(object sender, RoutedEventArgs e) private void AutoMode_OnClick(object sender, RoutedEventArgs e)
{ {
_AutoMode_.IsChecked = true; //_AutoMode_.IsChecked = true;
} }
private void OnPreviewTextInputCommon(object sender, TextCompositionEventArgs e) private void OnPreviewTextInputCommon(object sender, TextCompositionEventArgs e)
......
...@@ -868,11 +868,15 @@ namespace VIZ.FGOUT.Module ...@@ -868,11 +868,15 @@ namespace VIZ.FGOUT.Module
isAutoEnable = value; isAutoEnable = value;
RaisePropertyChanged(nameof(IsAutoEnable)); RaisePropertyChanged(nameof(IsAutoEnable));
//自动 //自动
if(value && !_flagAutoValue) if (value)
{ {
_flagAutoValue = true; //if(value && !_flagAutoValue)
_flagManualValue = false; //{
IsEnableTarget = false; // _flagAutoValue = true;
// _flagManualValue = false;
//IsEnableTarget = false;
IsStartImaget = false; IsStartImaget = false;
SendIsManual(AlgorithmPackageSignal.auto_mode); SendIsManual(AlgorithmPackageSignal.auto_mode);
manualConfig.IsManual = false; manualConfig.IsManual = false;
...@@ -899,11 +903,15 @@ namespace VIZ.FGOUT.Module ...@@ -899,11 +903,15 @@ namespace VIZ.FGOUT.Module
isEnableTarget = value; isEnableTarget = value;
this.RaisePropertyChanged(nameof(IsEnableTarget)); this.RaisePropertyChanged(nameof(IsEnableTarget));
//手动 //手动
if(value && !_flagManualValue) if (value)
{ {
_flagAutoValue = false; //if(value && !_flagManualValue)
_flagManualValue = true; //{
IsAutoEnable = false; // _flagAutoValue = false;
// _flagManualValue = true;
// IsAutoEnable = false;
SendIsManual(AlgorithmPackageSignal.manual_mode); SendIsManual(AlgorithmPackageSignal.manual_mode);
//manualConfig.IsManual = false; //manualConfig.IsManual = false;
manualConfig.IsManual = true; manualConfig.IsManual = true;
......
...@@ -1216,11 +1216,22 @@ namespace VIZ.FGOUT.Module ...@@ -1216,11 +1216,22 @@ namespace VIZ.FGOUT.Module
int dx = Convert.ToInt32(rect.X / xp); int dx = Convert.ToInt32(rect.X / xp);
int dy = Convert.ToInt32(rect.Y / xy); int dy = Convert.ToInt32(rect.Y / xy);
int width = Convert.ToInt32(rect.Width / xp); int width = Convert.ToInt32(rect.Width / xp);
//int height2 = Convert.ToInt32(rect.Height / xy); if (width + dx > resWith)
{
width = resWith - dx;
}
int height = Convert.ToInt32(width * 9 / 16); int height = Convert.ToInt32(width * 9 / 16);
//int height2 = Convert.ToInt32(rect.Height / xy);
if (height + dy > resHeight)
{
height = resHeight - dy;
width = height * 16 / 9;
}
return new CutPackage() { point = new Point(dx, dy), width = width, height = height }; //return new CutPackage() { point = new Point(dx, dy), width = width, height = height };
return new CutPackage() { point = new int[]{dx, dy}, width = width, height = height };
} }
private List<List<List<int>>> CoordinateTrackingBoxInfo(RawRectangleF rect, double srcWidth, double srcHeight) private List<List<List<int>>> CoordinateTrackingBoxInfo(RawRectangleF rect, double srcWidth, double srcHeight)
......
#pragma checksum "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "72019AA88A2EFE0C59DFBF453A7E27C8FD19969111F82637DAEAAD62684F11D5" #pragma checksum "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "15CC284A83D045D69995604731E50F83B95A9914DD5852260594F13D2AC94FF3"
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// 此代码由工具生成。 // 此代码由工具生成。
...@@ -66,7 +66,7 @@ namespace VIZ.FGOUT.Module { ...@@ -66,7 +66,7 @@ namespace VIZ.FGOUT.Module {
#line hidden #line hidden
#line 326 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml" #line 327 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.RadioButton _ManualMode_; internal System.Windows.Controls.RadioButton _ManualMode_;
...@@ -74,7 +74,7 @@ namespace VIZ.FGOUT.Module { ...@@ -74,7 +74,7 @@ namespace VIZ.FGOUT.Module {
#line hidden #line hidden
#line 1436 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml" #line 1452 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal VIZ.FGOUT.Module.NDIView cam1; internal VIZ.FGOUT.Module.NDIView cam1;
...@@ -82,7 +82,7 @@ namespace VIZ.FGOUT.Module { ...@@ -82,7 +82,7 @@ namespace VIZ.FGOUT.Module {
#line hidden #line hidden
#line 1621 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml" #line 1637 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal VIZ.FGOUT.Module.NDIView cam2; internal VIZ.FGOUT.Module.NDIView cam2;
...@@ -90,7 +90,7 @@ namespace VIZ.FGOUT.Module { ...@@ -90,7 +90,7 @@ namespace VIZ.FGOUT.Module {
#line hidden #line hidden
#line 1636 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml" #line 1652 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal VIZ.FGOUT.Module.NDIView cam3; internal VIZ.FGOUT.Module.NDIView cam3;
...@@ -149,7 +149,7 @@ namespace VIZ.FGOUT.Module { ...@@ -149,7 +149,7 @@ namespace VIZ.FGOUT.Module {
case 3: case 3:
this._ManualMode_ = ((System.Windows.Controls.RadioButton)(target)); this._ManualMode_ = ((System.Windows.Controls.RadioButton)(target));
#line 330 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml" #line 331 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
this._ManualMode_.Click += new System.Windows.RoutedEventHandler(this.ManualMode_OnClick); this._ManualMode_.Click += new System.Windows.RoutedEventHandler(this.ManualMode_OnClick);
#line default #line default
...@@ -157,7 +157,7 @@ namespace VIZ.FGOUT.Module { ...@@ -157,7 +157,7 @@ namespace VIZ.FGOUT.Module {
return; return;
case 4: case 4:
#line 823 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml" #line 825 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
((System.Windows.Controls.TextBox)(target)).PreviewTextInput += new System.Windows.Input.TextCompositionEventHandler(this.OnPreviewTextInputCommon); ((System.Windows.Controls.TextBox)(target)).PreviewTextInput += new System.Windows.Input.TextCompositionEventHandler(this.OnPreviewTextInputCommon);
#line default #line default
...@@ -165,7 +165,7 @@ namespace VIZ.FGOUT.Module { ...@@ -165,7 +165,7 @@ namespace VIZ.FGOUT.Module {
return; return;
case 5: case 5:
#line 960 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml" #line 969 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
((System.Windows.Controls.TextBox)(target)).PreviewTextInput += new System.Windows.Input.TextCompositionEventHandler(this.OnPreviewTextInputCommon); ((System.Windows.Controls.TextBox)(target)).PreviewTextInput += new System.Windows.Input.TextCompositionEventHandler(this.OnPreviewTextInputCommon);
#line default #line default
...@@ -173,7 +173,7 @@ namespace VIZ.FGOUT.Module { ...@@ -173,7 +173,7 @@ namespace VIZ.FGOUT.Module {
return; return;
case 6: case 6:
#line 988 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml" #line 1004 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
((System.Windows.Controls.TextBox)(target)).PreviewTextInput += new System.Windows.Input.TextCompositionEventHandler(this.OnPreviewTextInputCommon); ((System.Windows.Controls.TextBox)(target)).PreviewTextInput += new System.Windows.Input.TextCompositionEventHandler(this.OnPreviewTextInputCommon);
#line default #line default
...@@ -181,7 +181,7 @@ namespace VIZ.FGOUT.Module { ...@@ -181,7 +181,7 @@ namespace VIZ.FGOUT.Module {
return; return;
case 7: case 7:
#line 1016 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml" #line 1032 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
((System.Windows.Controls.TextBox)(target)).PreviewTextInput += new System.Windows.Input.TextCompositionEventHandler(this.OnPreviewTextInputCommon); ((System.Windows.Controls.TextBox)(target)).PreviewTextInput += new System.Windows.Input.TextCompositionEventHandler(this.OnPreviewTextInputCommon);
#line default #line default
......
#pragma checksum "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "72019AA88A2EFE0C59DFBF453A7E27C8FD19969111F82637DAEAAD62684F11D5" #pragma checksum "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "15CC284A83D045D69995604731E50F83B95A9914DD5852260594F13D2AC94FF3"
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// 此代码由工具生成。 // 此代码由工具生成。
...@@ -66,7 +66,7 @@ namespace VIZ.FGOUT.Module { ...@@ -66,7 +66,7 @@ namespace VIZ.FGOUT.Module {
#line hidden #line hidden
#line 326 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml" #line 327 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.RadioButton _ManualMode_; internal System.Windows.Controls.RadioButton _ManualMode_;
...@@ -74,7 +74,7 @@ namespace VIZ.FGOUT.Module { ...@@ -74,7 +74,7 @@ namespace VIZ.FGOUT.Module {
#line hidden #line hidden
#line 1436 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml" #line 1452 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal VIZ.FGOUT.Module.NDIView cam1; internal VIZ.FGOUT.Module.NDIView cam1;
...@@ -82,7 +82,7 @@ namespace VIZ.FGOUT.Module { ...@@ -82,7 +82,7 @@ namespace VIZ.FGOUT.Module {
#line hidden #line hidden
#line 1621 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml" #line 1637 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal VIZ.FGOUT.Module.NDIView cam2; internal VIZ.FGOUT.Module.NDIView cam2;
...@@ -90,7 +90,7 @@ namespace VIZ.FGOUT.Module { ...@@ -90,7 +90,7 @@ namespace VIZ.FGOUT.Module {
#line hidden #line hidden
#line 1636 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml" #line 1652 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal VIZ.FGOUT.Module.NDIView cam3; internal VIZ.FGOUT.Module.NDIView cam3;
...@@ -149,7 +149,7 @@ namespace VIZ.FGOUT.Module { ...@@ -149,7 +149,7 @@ namespace VIZ.FGOUT.Module {
case 3: case 3:
this._ManualMode_ = ((System.Windows.Controls.RadioButton)(target)); this._ManualMode_ = ((System.Windows.Controls.RadioButton)(target));
#line 330 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml" #line 331 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
this._ManualMode_.Click += new System.Windows.RoutedEventHandler(this.ManualMode_OnClick); this._ManualMode_.Click += new System.Windows.RoutedEventHandler(this.ManualMode_OnClick);
#line default #line default
...@@ -157,7 +157,7 @@ namespace VIZ.FGOUT.Module { ...@@ -157,7 +157,7 @@ namespace VIZ.FGOUT.Module {
return; return;
case 4: case 4:
#line 823 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml" #line 825 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
((System.Windows.Controls.TextBox)(target)).PreviewTextInput += new System.Windows.Input.TextCompositionEventHandler(this.OnPreviewTextInputCommon); ((System.Windows.Controls.TextBox)(target)).PreviewTextInput += new System.Windows.Input.TextCompositionEventHandler(this.OnPreviewTextInputCommon);
#line default #line default
...@@ -165,7 +165,7 @@ namespace VIZ.FGOUT.Module { ...@@ -165,7 +165,7 @@ namespace VIZ.FGOUT.Module {
return; return;
case 5: case 5:
#line 960 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml" #line 969 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
((System.Windows.Controls.TextBox)(target)).PreviewTextInput += new System.Windows.Input.TextCompositionEventHandler(this.OnPreviewTextInputCommon); ((System.Windows.Controls.TextBox)(target)).PreviewTextInput += new System.Windows.Input.TextCompositionEventHandler(this.OnPreviewTextInputCommon);
#line default #line default
...@@ -173,7 +173,7 @@ namespace VIZ.FGOUT.Module { ...@@ -173,7 +173,7 @@ namespace VIZ.FGOUT.Module {
return; return;
case 6: case 6:
#line 988 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml" #line 1004 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
((System.Windows.Controls.TextBox)(target)).PreviewTextInput += new System.Windows.Input.TextCompositionEventHandler(this.OnPreviewTextInputCommon); ((System.Windows.Controls.TextBox)(target)).PreviewTextInput += new System.Windows.Input.TextCompositionEventHandler(this.OnPreviewTextInputCommon);
#line default #line default
...@@ -181,7 +181,7 @@ namespace VIZ.FGOUT.Module { ...@@ -181,7 +181,7 @@ namespace VIZ.FGOUT.Module {
return; return;
case 7: case 7:
#line 1016 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml" #line 1032 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
((System.Windows.Controls.TextBox)(target)).PreviewTextInput += new System.Windows.Input.TextCompositionEventHandler(this.OnPreviewTextInputCommon); ((System.Windows.Controls.TextBox)(target)).PreviewTextInput += new System.Windows.Input.TextCompositionEventHandler(this.OnPreviewTextInputCommon);
#line default #line default
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment