Commit 8c6c6250 by 鲁志-悦动

在界面新增数字输入框:"出点像素" And 点击"播放"按钮时,新增"outPoints"字段,发送出点的跟踪坐标

parent fd44d70e

//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
namespace XamlGeneratedNamespace {
/// <summary>
/// GeneratedInternalTypeHelper
/// </summary>
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
public sealed class GeneratedInternalTypeHelper : System.Windows.Markup.InternalTypeHelper {
/// <summary>
/// CreateInstance
/// </summary>
protected override object CreateInstance(System.Type type, System.Globalization.CultureInfo culture) {
return System.Activator.CreateInstance(type, ((System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.NonPublic)
| (System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.CreateInstance)), null, null, culture);
}
/// <summary>
/// GetPropertyValue
/// </summary>
protected override object GetPropertyValue(System.Reflection.PropertyInfo propertyInfo, object target, System.Globalization.CultureInfo culture) {
return propertyInfo.GetValue(target, System.Reflection.BindingFlags.Default, null, null, culture);
}
/// <summary>
/// SetPropertyValue
/// </summary>
protected override void SetPropertyValue(System.Reflection.PropertyInfo propertyInfo, object target, object value, System.Globalization.CultureInfo culture) {
propertyInfo.SetValue(target, value, System.Reflection.BindingFlags.Default, null, null, culture);
}
/// <summary>
/// CreateDelegate
/// </summary>
protected override System.Delegate CreateDelegate(System.Type delegateType, object target, string handler) {
return ((System.Delegate)(target.GetType().InvokeMember("_CreateDelegate", (System.Reflection.BindingFlags.InvokeMethod
| (System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance)), null, target, new object[] {
delegateType,
handler}, null)));
}
/// <summary>
/// AddEventHandler
/// </summary>
protected override void AddEventHandler(System.Reflection.EventInfo eventInfo, object target, System.Delegate handler) {
eventInfo.AddEventHandler(target, handler);
}
}
}
......@@ -10,11 +10,11 @@ none
false
21870986562
2-725104376
31364711570
17-1683084370
3947974750
17-1462717611
Themes\Generic.xaml;Widgets\FootballFieldPanel\FootballFieldPanel.xaml;
False
True
......@@ -27,6 +27,11 @@
public int Moving_pixel { get; set; }
/// <summary>
/// 出点像素
/// </summary>
public int Remove_out_point_pixel { get; set; } = 100;
/// <summary>
/// 延迟多少帧结束
/// </summary>
public int Extend_frame { get; set; }
......
......@@ -32,8 +32,13 @@ namespace VIZ.FGOUT.Connection
//public VideoData data { get; set; }
/// <summary>
/// InValidPalce
/// 入点
/// </summary>
public List<List<List<int>>> inPoints { get; set; }
/// <summary>
/// 出点
/// </summary>
public List<List<List<int>>> outPoints { get; set; }
}
}
......@@ -10,11 +10,11 @@ none
false
DEBUG;TRACE
221979955803
1470602451
11-350624472
24-1321085892
22-1578589972
1-1441241311
11-1602666439
23-2035776870
Resources\StringResource.zh-CN.xaml;Resources\StringResource.en.xaml;Style\Button\Button_NdiView.xaml;Style\Button\Button_Setting.xaml;Style\Button\Button_WindowTop.xaml;Style\CheckBox\CheckBox_NdiView.xaml;Style\CheckBox\CheckBox_RaidoButtonStyle.xaml;Style\CheckBox\CheckBox_Setting.xaml;Style\CheckBox\CheckBox_WindowTop.xaml;Style\ComboBox\ComboBox_Setting.xaml;Style\HotkeyBox\HotkeyBox_Setting.xaml;Style\MessageBox\MessageBoxEx.xaml;Style\RadioButton\RadioButton_FootballSide.xaml;Style\RadioButton\RadioButton_NdiMainViewBlue.xaml;Style\RadioButton\RadioButton_NdiView.xaml;Style\RadioButton\RadioButton_Setting.xaml;Style\Slider\Slider_Setting.xaml;Style\TextBlock\TextBlock_Setting.xaml;Style\TextBox\TextBox_Setting.xaml;Style\ToogleButton\ToogleButton_Setting.xaml;Themes\Generic.xaml;Toolkit\NumericUpDown\NumericUpDown.xaml;
False
True
......@@ -47,6 +47,7 @@
<behaviors:InvokeCommandAction Command="{Binding LoadedCommand}" />
</behaviors:EventTrigger>
</behaviors:Interaction.Triggers>
<ScrollViewer VerticalScrollBarVisibility="Disabled">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="30" />
......@@ -152,11 +153,15 @@
Grid.Row="2"
Grid.Column="1"
Margin="45,30,0,0">-->
<ScrollViewer
<!--<ScrollViewer
Grid.Row="2"
Grid.Column="1"
VerticalScrollBarVisibility="Disabled">
<Grid Margin="70,0">
VerticalScrollBarVisibility="Disabled">-->
<Grid
Grid.Row="2"
Grid.Column="1"
Margin="70,0">
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition />
......@@ -937,6 +942,7 @@
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<TextBlock
HorizontalAlignment="Center"
......@@ -1001,8 +1007,38 @@
</b:Interaction.Triggers>
</TextBox>
</StackPanel>
<CheckBox
<StackPanel
Grid.Column="3"
HorizontalAlignment="Center"
Orientation="Horizontal">
<TextBlock
Margin="0,0,3,0"
HorizontalAlignment="Right"
VerticalAlignment="Center"
FontSize="14"
Foreground="White"
Text="出点像素" />
<TextBox
x:Name="_Remove_out_point_pixel_"
Width="60"
InputMethod.IsInputMethodEnabled="False"
PreviewTextInput="Moving_pixel_OnPreviewTextInput"
Style="{StaticResource TextBoxStyle}"
Text="{Binding Remove_out_point_pixel, Mode=TwoWay}">
<b:Interaction.Behaviors>
<local:TextBoxEnterKeyUpdateBehavior />
</b:Interaction.Behaviors>
<b:Interaction.Triggers>
<b:EventTrigger EventName="KeyDown">
<b:InvokeCommandAction Command="{Binding Remove_out_point_pixelKeyDownCommand}" PassEventArgsToCommand="True" />
</b:EventTrigger>
</b:Interaction.Triggers>
</TextBox>
</StackPanel>
<CheckBox
Grid.Column="4"
Margin="0,12"
HorizontalAlignment="Center"
Command="{Binding BigModelCommand}"
......@@ -1012,7 +1048,7 @@
IsChecked="{Binding Path=IsBigModel, Mode=TwoWay}"
Style="{StaticResource CheckBox_Setting}" />
<Button
Grid.Column="4"
Grid.Column="5"
Width="100"
Height="40"
HorizontalAlignment="Center"
......@@ -1140,7 +1176,7 @@
</StackPanel>
</Grid>
</ScrollViewer>
<!--</ScrollViewer>-->
<!--</WrapPanel>-->
<!--<WrapPanel
Grid.Row="3"
......@@ -2001,4 +2037,5 @@
</Grid>
</Border>-->
</Grid>
</ScrollViewer>
</UserControl>
......@@ -52,17 +52,11 @@ namespace VIZ.FGOUT.Module
// 注册系统检测循环
//ApplicationDomainEx.LoopManager.Register("NDIMainViewModel.UpdateSystemMonitor", 1, this.UpdateSystemMonitor);
// 注册服务
//ApplicationDomainEx.ServiceManager.AddService(NDIViewKeys.MainView, this);
ApplicationDomainEx.ServiceManager.AddService(NDIMainViewKeys.MainView, this);
// 初始化二次确认自动发送倒计时器
InitAutoSendTimer();
//_autoSend_Timer.Stop();
//_autoSend_Timer.Start();
//TimeCountActVisibility = Visibility.Visible;
//TimeCountDefaultVisibility = Visibility.Collapsed;
//初始化算法参数数据
InitAlgorithmData();
......@@ -88,18 +82,8 @@ namespace VIZ.FGOUT.Module
Version.TryParse(str, out Version version);
this.SystemVersion = $"{version.Major}.{version.Minor}.{version.Build}";
//_tempAutoSendCount = AutoSendCount = AutoSendIntervalTime - 1;
//_autoSend_Timer.Stop();
//_autoSend_Timer.Start();
}
//Dictionary<string, string> dics = new Dictionary<string, string>
//{
// { "LJ", "Long Jump" }, { "TJ", "Triple Jump" }, { "VT", "Vault" }, { "JT", "Javelin Throw" }, { "FX", "Floor Exercise" }, { "HB", "Horizontal Bar" }, { "UB", "Uneven Bars" }
// , { "DS", "Diving Springboard" } , { "DT", "Diving Tower" } , { "SS", "Synchronized Diving Springboard" } , { "ST", "Synchronized Diving Tower" } , { "SP", "Speed" }
//};
Dictionary<string, string> dics = new Dictionary<string, string>
{
{ "LJ", "Long Jump" }, { "TJ", "Triple Jump" }, { "VT", "Vault" }, { "JT", "Javelin Throw" }, { "FX", "Floor Exercise" }, { "HB", "Horizontal Bar" }, { "UB", "Uneven Bars" }
......@@ -139,7 +123,6 @@ namespace VIZ.FGOUT.Module
private void InitStreamCachedTime()
{
int STREAM_CACHEED_TIME = ApplicationDomain.IniStorage.GetValue<StreamConfig, int>(p => p.STREAM_CACHEED_TIME);
//SliderEndValue = SliderMaxValue = STREAM_CACHEED_TIME * 50;
SliderMaximum = STREAM_CACHEED_TIME * 50;
}
......@@ -170,13 +153,10 @@ namespace VIZ.FGOUT.Module
this.ReplayCommand = new VCommand(this.Replay);
this.ReplayCheckedCommand = new VCommand(this.ReplayChecked);
this.ReplayUncheckedCommand = new VCommand(this.ReplayUnchecked);
//this.SliderValueChangedCommand = new VCommand(this.SliderValueChanged);
//Replay Start
this.ReplayStartCommand = new VCommand(this.ReplayStart);
//Replay Stop
this.ReplayStopCommand = new VCommand(this.ReplayStop);
//Replay Restart
//this.ReplayReStartCommand = new VCommand(this.ReplayReStart);
//入点
this.InPointCommand = new VCommand(this.InPoint);
//出点
......@@ -188,6 +168,7 @@ namespace VIZ.FGOUT.Module
this.UESettingCommand = new VCommand(this.UESetting);
//UEControl
this.UEControlCommand = new VCommand(this.UEControl);
//算法重启
this.RestartCommand = new VCommand(this.Restart);
//算法关闭
......@@ -220,6 +201,7 @@ namespace VIZ.FGOUT.Module
//两个算法参数回车命令
this.Matting_intervalKeyDownCommand = new VCommand<KeyEventArgs>(this.Matting_intervalKeyDown);
this.Moving_pixelKeyDownCommand = new VCommand<KeyEventArgs>(this.Moving_pixelKeyDown);
this.Remove_out_point_pixelKeyDownCommand = new VCommand<KeyEventArgs>(Remove_out_point_pixelKeyDown);
this.BigModelCommand = new VCommand(this.BigModel);
//裁切区域
......@@ -231,20 +213,9 @@ namespace VIZ.FGOUT.Module
/// </summary>
private void InitMessage()
{
////Replay入点值
//ApplicationDomain.MessageManager.Register<ReplayStartValueModel>(this, this.ReplayStartValueFromNDIViewModel);
////Replay出点值
//ApplicationDomain.MessageManager.Register<ReplayEndValueModel>(this, this.ReplayEndValueFromNDIViewModel);
//接收自动发送消息,触发倒计时
//ApplicationDomain.MessageManager.Register<AutoSendModel>(this, this.AutoSendIntervalTimeChanged);
//接收更新主页面Title体育项目名和位置标记消息和三个常用算法参数信息
ApplicationDomain.MessageManager.Register<UpdateTitleAndPositionMarkModel>(this, this.UpdateTitleAndPositionMarkMethod);
// 算法落盘开始、结束时间戳消息(在NDIViewModel已注册了接收方法)
//ApplicationDomain.MessageManager.Register<AlgorithmMessage__start_end>(this, this.OnAlgorithmMessage__start_end);
//通知UI界面贴图状态
ApplicationDomain.MessageManager.Register<ClipMessage__MaskMsg>(this, this.OnClipMessage__MaskMsg);
......@@ -298,19 +269,12 @@ namespace VIZ.FGOUT.Module
}
/// <summary>
/// 算法二次确认自动发送时间
/// </summary>
//protected int ALGORITHM_ReconfirmAutoSend_TIME = ApplicationDomain.IniStorage.GetValue<AlgorithmConfig, int>(p => p.ALGORITHM_ReconfirmAutoSend_TIME);
/// <summary>
/// 算法落盘开始、结束时间戳消息
/// </summary>
/// <param name="msg"></param>
private void OnAlgorithmMessage__start_end(AlgorithmMessage__start_end msg)
{
//_tempAutoSendCount = AutoSendCount = (ALGORITHM_ReconfirmAutoSend_TIME / 1000) + 1;
//_autoSend_Timer.Stop();
//_autoSend_Timer.Start();
}
private void UpdateTitleAndPositionMarkMethod(UpdateTitleAndPositionMarkModel model)
......@@ -323,43 +287,6 @@ namespace VIZ.FGOUT.Module
InitAlgorithmData();
}
//private void AutoSendIntervalTimeChanged(AutoSendModel model)
//{
// WPFHelper.BeginInvoke(() =>
// {
// AutoSendCount = AutoSendIntervalTime;
// //_tempAutoSendCount = AutoSendCount = AutoSendIntervalTime - 1;
// //AutoSendCount = (model.Interval / 1000);
// _autoSend_Timer.Stop();
// _autoSend_Timer.Start();
// });
// //WPFHelper.BeginInvoke(() =>
// //{
// // this.GetWindow().WindowState = WindowState.Minimized;
// // this.GetWindow().WindowState = WindowState.Normal;
// //});
// //Refresh();
// //WPFHelper.BeginInvoke(() =>
// //{
// // TimeCountActVisibility = Visibility.Visible;
// // TimeCountDefaultVisibility = Visibility.Collapsed;
// //});
//}
/// <summary>
/// 更新算法是否拥有目标框
/// </summary>
//public void UpdateAlgorithmTargetBoxLostFrame()
//{
// if (this.AlgorithmTargetBoxLostFrame == this.algorithmTargetBoxLostFrame_cache)
// return;
// this.AlgorithmTargetBoxLostFrame = this.algorithmTargetBoxLostFrame_cache;
//}
#region AlgorithmTargetBoxLostFrame -- 算法目标框连续丢失帧数
///// <summary>
......@@ -405,120 +332,29 @@ namespace VIZ.FGOUT.Module
private System.Timers.Timer _autoSend_Timer = new System.Timers.Timer();
//刷新界面控件
//public void Refresh()
//{
// DispatcherFrame frame = new DispatcherFrame();
// Dispatcher.CurrentDispatcher.BeginInvoke(DispatcherPriority.Background,
// new DispatcherOperationCallback(delegate (object f)
// {
// ((DispatcherFrame)f).Continue = false;
// return null;
// }
// ), frame);
// Dispatcher.PushFrame(frame);
//}
public void InitAutoSendTimer()
{
_autoSend_Timer.Interval = 1000;
_autoSend_Timer.Elapsed += UpdateAutoSendTimer_Tick;
}
//int _count = 0;
//int _tempAutoSendCount = 3;
//private void StartAutoSendTimer()
//{
// _tempAutoSendCount = AutoSendCount = AutoSendIntervalTime - 1;
// //var minus = NDIViewModel.EndTime - NDIViewModel.StartTime;
// //if (minus > 0)
// //{
// // //1
// // //Task.Factory.StartNew(() =>
// // //{
// // // Task.Delay((int)(minus * 30)).Wait();
// // //});
// // //2
// // Task.Delay((int)(minus * 2)).Wait();
// // //3
// // //WPFHelper.BeginInvoke(() =>
// // //{
// // // Thread.Sleep((int)(minus * 30));
// // //});
// // //4
// // //WPFHelper.BeginInvoke(() =>
// // //{
// // // Task.Delay((int)(minus * 30)).Wait();
// // //});
// //}
// _count = 1;
// _autoSend_Timer.Stop();
// _autoSend_Timer.Start();
//}
public ObservableCollection<string> MessageCollection { get; set; }
//private void UpdateAutoSendTimer_Tick(object sender, EventArgs e)
//{
// try
// {
// Application.Current.Dispatcher.BeginInvoke(new Action(() =>
// //WPFHelper.BeginInvoke(() =>
// {
// if (AutoSendCount == 0)
// {
// _autoSend_Timer.Stop();
// }
// else
// {
// AutoSendCount -= 1;
// MessageCollection = new ObservableCollection<string>(){ AutoSendCount.ToString() };
// }
// }));
// }
// catch (Exception ex)
// {
// log.Error(ex);
// }
//}
private void UpdateAutoSendTimer_Tick(object sender, EventArgs e)
{
try
{
//UIDispatcher = DispatcherHelper.CheckBeginInvokeOnUI;
//DispatcherHelper.UIDispatcher.InvokeAsync(() =>
//Application.Current.Dispatcher.BeginInvoke(new Action(() =>
WPFHelper.BeginInvoke(() =>
{
if (AutoSendCount == 0)
{
AutoSend();
//if (_count == 1)
_autoSend_Timer.Stop();
//else
//{
// _count++;
// AutoSendCount = _tempAutoSendCount;
//}
}
else
{
//1
AutoSendCount--;
//this.RaisePropertyChanged(nameof(AutoSendCount));
//2
//AutoSendCount -= 1;
}
//});
//}));
});
}
catch (Exception ex)
......@@ -559,6 +395,20 @@ namespace VIZ.FGOUT.Module
}
}
private int _remove_out_point_pixel = 100;
/// <summary>
/// 出点像素
/// </summary>
public int Remove_out_point_pixel
{
get => _remove_out_point_pixel;
set
{
_remove_out_point_pixel = value;
this.RaisePropertyChanged(nameof(Remove_out_point_pixel));
}
}
private bool _isBigModel;
/// <summary>
/// 是否是大模型
......@@ -582,13 +432,13 @@ namespace VIZ.FGOUT.Module
if (!string.IsNullOrEmpty(number))
{
var config = ApplicationDomainEx.LiteDbContext.JavelinThrowConfig.FindOne(p => p.Number == number);
if (config == null)
return;
if (config == null) return;
var alPackage =
(AlgorithmPackage_Figout_sports_model)JsonConvert.DeserializeObject(config.AlgorithmData,
typeof(AlgorithmPackage_Figout_sports_model));
Matting_interval = alPackage.Matting_interval;
Moving_pixel = alPackage.Moving_pixel;
Remove_out_point_pixel = alPackage.Remove_out_point_pixel;
IsBigModel = alPackage.Is_Big_Model;
}
}
......@@ -611,51 +461,6 @@ namespace VIZ.FGOUT.Module
private void AlgorithmSend()
{
AlgorithmSendCommon(true);
//UdpEndpointManager manager = ConnectionManager.UdpConnection.GetEndpointManager(NDIViewKeys.CAM_1);
//if (manager == null) return;
//var number = ApplicationDomainEx.LiteDbContext.ViewConfig.FindOne(p => p.ViewKey == NDIViewKeys.CAM_1)
// .GameName;
//if (!string.IsNullOrEmpty(number))
//{
// var config = ApplicationDomainEx.LiteDbContext.JavelinThrowConfig.FindOne(p => p.Number == number);
// if (config == null) return;
// //拿出来,更新修改数据
// var alPackage = (AlgorithmPackage_Figout_sports_model)JsonConvert.DeserializeObject(config.AlgorithmData, typeof(AlgorithmPackage_Figout_sports_model));
// if(alPackage == null) return;
// alPackage.Matting_interval = Matting_interval;
// alPackage.Moving_pixel = Moving_pixel;
// alPackage.Is_Big_Model = IsBigModel;
// // AlgorithmPackage_Figout_sports_model package = new AlgorithmPackage_Figout_sports_model
// //{
// // Matting_interval = Matting_interval,
// // Moving_pixel = Moving_pixel,
// // Is_Big_Model = IsBigModel,
// // SportsCode = number
// //};
// //发送给算法
// manager.SendJson(alPackage);
// MessageBoxEx.ShowDialog("算法参数保存成功。");
// //存算法数据
// //if (!string.IsNullOrEmpty(number))
// //{
// // var config = ApplicationDomainEx.LiteDbContext.JavelinThrowConfig.FindOne(p => p.Number == number);
// // if (config == null) return;
// // //拿出来,更新修改数据,再放回去
// // var alPackage =
// // (AlgorithmPackage_Figout_sports_model)JsonConvert.DeserializeObject(config.AlgorithmData,
// // typeof(AlgorithmPackage_Figout_sports_model));
// // alPackage.Matting_interval = Matting_interval;
// // alPackage.Moving_pixel = Moving_pixel;
// // alPackage.Is_Big_Model = IsBigModel;
// //再放回去
// var algorithmMessage = JsonConvert.SerializeObject(alPackage, JSON_SERIALIZER_SETTINGS);
// config.AlgorithmData = algorithmMessage;
// ApplicationDomainEx.LiteDbContext.JavelinThrowConfig.Upsert(config);
//}
}
private void AlgorithmSendCommon(bool isMessage = false)
......@@ -673,6 +478,7 @@ namespace VIZ.FGOUT.Module
if (alPackage == null) return;
alPackage.Matting_interval = Matting_interval;
alPackage.Moving_pixel = Moving_pixel;
alPackage.Remove_out_point_pixel = Remove_out_point_pixel;
alPackage.Is_Big_Model = IsBigModel;
//发送给算法
......@@ -694,22 +500,6 @@ namespace VIZ.FGOUT.Module
#endregion
//int _sliderStartInitValue;
//int _sliderEndInitValue;
//private void ReplayStartValueFromNDIViewModel(ReplayStartValueModel vm)
//{
// _isReplayChecked = true;
// SliderStartValue = _sliderStartInitValue = vm.ReplayStartValue;
// _isReplayChecked = false;
//}
//private void ReplayEndValueFromNDIViewModel(ReplayEndValueModel vm)
//{
// _isReplayChecked = true;
// SliderEndValue = _sliderEndInitValue = vm.ReplayEndValue;
// _isReplayChecked = false;
//}
private SetLanguageConfig _setLanguageConfig;
/// <summary>
/// 初始化语言
......@@ -759,31 +549,15 @@ namespace VIZ.FGOUT.Module
if (manualConfig == null) return;
IsStartImaget = this.manualConfig.IsStartMat;
//这个字段和逻辑肯定反了,所以我给他改过来
//if (this.manualConfig.IsManual)
//{
// IsAutoEnbale = true;
// IsEnbaleTarget = false;
// SendIsManual(AlgorithmPackageSignal.auto_mode);//自动模式
//}
//else
//{
// IsEnbaleTarget = true;
// IsAutoEnbale = false;
// SendIsManual(AlgorithmPackageSignal.manual_mode);//手动模式
//}
if (this.manualConfig.IsManual)
{
IsEnableTarget = true;
IsAutoEnable = false;
//SendIsManual(AlgorithmPackageSignal.manual_mode);//手动模式
}
else
{
IsEnableTarget = false;
IsAutoEnable = true;
//SendIsManual(AlgorithmPackageSignal.auto_mode);//自动模式
}
}
......@@ -805,8 +579,6 @@ namespace VIZ.FGOUT.Module
private void InitController()
{
this.hotkeyController = new HotkeyController(this);
//20240415注释掉
//this.gpioController = new GpioController(this);
this.loopController = new LoopController(this);
}
......@@ -1036,14 +808,6 @@ namespace VIZ.FGOUT.Module
#region 自动检测
// if (this.manualConfig==null)
// {
//}
// this.manualConfig.IsManual = savePlaceModel.IsManual;
// this.manualConfig.IsStartMat = savePlaceModel.IsStartMat;
//ApplicationDomainEx.LiteDbContext.SetManualConfig.Upsert(this.manualConfig);
private bool isAutoEnable = true;
private bool _flagAutoValue;
......@@ -1063,10 +827,8 @@ namespace VIZ.FGOUT.Module
IsEnableTarget = false;
IsStartImaget = false;
SendIsManual(AlgorithmPackageSignal.auto_mode);
//manualConfig.IsManual = true;
manualConfig.IsManual = false;
ApplicationDomainEx.LiteDbContext.SetManualConfig.Upsert(manualConfig);
//CleanRect();
ShowPlace();
PositionButtonEnable();
}
......@@ -1215,13 +977,8 @@ namespace VIZ.FGOUT.Module
/// </summary>
private void Abandon()
{
//ReconfirmSendParamsCommon(ReconfirmStatus.Abandon);
ApplicationDomain.MessageManager.Send(_reconfirmAbandonModel);
//_autoSend_Timer.Stop();
//TimeCountActVisibility = Visibility.Collapsed;
//TimeCountDefaultVisibility = Visibility.Visible;
WPFHelper.BeginInvoke(() =>
{
MessageBoxEx.ShowDialog("二次确认抛弃完成。");
......@@ -1243,7 +1000,6 @@ namespace VIZ.FGOUT.Module
/// </summary>
private void Send()
{
//ReconfirmSendParamsCommon(ReconfirmStatus.Send);
ApplicationDomain.MessageManager.Send(_reconfirmSendModel);
WPFHelper.BeginInvoke(() =>
......@@ -1296,11 +1052,6 @@ namespace VIZ.FGOUT.Module
{
_autoSendIntervalTime = value;
this.RaisePropertyChanged(nameof(AutoSendIntervalTime));
//if (value == 1)
//{
// TimeCountActVisibility = Visibility.Collapsed;
// TimeCountDefaultVisibility = Visibility.Visible;
//}
}
}
......@@ -1317,7 +1068,6 @@ namespace VIZ.FGOUT.Module
}
}
//public ReconfirmAutoSendIntervalTimeModel _reconfirmAutoSendIntervalTimeModel = new ReconfirmAutoSendIntervalTimeModel();
public VCommand<RoutedEventArgs> AutoSendIntervalTimeChangedCommand { get; set; }
private void AutoSendIntervalTimeChanged(RoutedEventArgs e)
{
......@@ -1326,8 +1076,6 @@ namespace VIZ.FGOUT.Module
var text = tb.Text;
if (int.TryParse(text, out var value) && value > 0)
{
//AutoSendCount = _reconfirmAutoSendIntervalTimeModel.IntervalTime = value;
//ApplicationDomain.MessageManager.Send(_reconfirmAutoSendIntervalTimeModel);
AutoSendCount = value;
}
}
......@@ -1345,6 +1093,13 @@ namespace VIZ.FGOUT.Module
TextBoxTextCommon(e);
}
public VCommand<KeyEventArgs> Remove_out_point_pixelKeyDownCommand { get; set; }
private void Remove_out_point_pixelKeyDown(KeyEventArgs e)
{
TextBoxTextCommon(e);
}
private void TextBoxTextCommon(KeyEventArgs e)
{
if (e.Key == Key.Enter)
......@@ -1367,25 +1122,6 @@ namespace VIZ.FGOUT.Module
AlgorithmSendCommon();
}
//private void ReconfirmSendParamsCommon(ReconfirmStatus reconfirmStatus)
//{
// var manager = ConnectionManager.UdpConnection.GetEndpointManager(NDIViewKeys.CAM_1__CLIP);
// if (manager == null) return;
// var config = ApplicationDomainEx.LiteDbContext.AlgorithmSaveMatImage.FindAll().FirstOrDefault();
// if (config == null)
// return;
// var reconfirm = new ReconfirmPackage()
// {
// type = ClipPackageSignal.RECONFIRM,
// start_time = config.start,
// status = reconfirmStatus
// };
// manager.SendJson(reconfirm);
//}
#endregion
#region 算法GoOn And Holdon And MattStart And MattEnd
......@@ -1481,32 +1217,13 @@ namespace VIZ.FGOUT.Module
#region Replay功能
public VCommand ReplayCommand { get; set; }
//private bool _replayButtonIsEnable = true;
/// <summary>
/// replay 播控功能
/// </summary>
private void Replay()
{
//if (_replayButtonIsEnable)
// ReplayEnable = _replayButtonIsEnable = false;
//else
// ReplayEnable = _replayButtonIsEnable = true;
//ReplayModel replayModel = new ReplayModel() { IsReplay = !_replayButtonIsEnable };
//ApplicationDomainEx.MessageManager.Send(replayModel);
}
//public VCommand SliderValueChangedCommand { get; set; }
//private int _initialValue = 150;
//private void SliderValueChanged()
//{
// if (_initialValue != SliderValue)
// {
// _initialValue = SliderValue;
// var replayModel = new ReplayModel() { IsReplay = true, IsSliderValueChanged = true, SliderValue = SliderValue };
// ApplicationDomain.MessageManager.Send(replayModel);
// }
//}
private bool _replayIsChecked = false;
public bool ReplayIsChecked
{
......@@ -1524,7 +1241,6 @@ namespace VIZ.FGOUT.Module
{
ReplaySendVisibility = Visibility.Visible;
SliderVisibility = Visibility.Visible;
//SliderValue = SliderMaxValue;
var replayModel = new ReplayModel();
replayModel.IsReplay = true;
replayModel.IsReplayStarted = true;
......@@ -1532,15 +1248,6 @@ namespace VIZ.FGOUT.Module
//自动模式下
if (isAutoEnable)
{
//现在改由存音视频发一个开始贴图的时间戳
//var config = ApplicationDomainEx.LiteDbContext.AlgorithmSaveMatImage.FindAll().FirstOrDefault();
//if (config != null)
//{
// //取算法发过来的Start、EndTime
// replayModel.InPointStartTime = config.start;
// replayModel.OutPointEndTime = config.end;
//}
//发送抛弃命令
AutoAbandon();
_autoSend_Timer.Stop();
......@@ -1565,10 +1272,6 @@ namespace VIZ.FGOUT.Module
SliderStartValue = NDIViewModel.SliderStartValue;
SliderEndValue = NDIViewModel.SliderEndValue;
_isReplayChecked = false;
//_autoSend_Timer.Stop();
//TimeCountActVisibility = Visibility.Collapsed;
//TimeCountDefaultVisibility = Visibility.Visible;
}
public VCommand ReplayUncheckedCommand { get; set; }
......@@ -1578,9 +1281,6 @@ namespace VIZ.FGOUT.Module
SliderVisibility = Visibility.Hidden;
var replayModel = new ReplayModel() { IsReplay = false };
ApplicationDomain.MessageManager.Send(replayModel);
//_initialValue = SliderMaxValue;
//StartTime = 0;
//EndTime = 0;
var managerAlgorithm = ConnectionManager.UdpConnection.GetEndpointManager(NDIViewKeys.CAM_1);
if (managerAlgorithm == null) return;
......@@ -1595,10 +1295,8 @@ namespace VIZ.FGOUT.Module
if (manager == null) return;
manager.SendJson(replayPackage);
//TimeCountActVisibility = Visibility.Collapsed;
//TimeCountDefaultVisibility = Visibility.Visible;
AutoSendCount = AutoSendIntervalTime;
_autoSend_Timer.Stop();
}
#endregion
......@@ -1620,17 +1318,6 @@ namespace VIZ.FGOUT.Module
private void ReplayStop()
{
//var manager = ConnectionManager.UdpConnection.GetEndpointManager(NDIViewKeys.CAM_1__CLIP);
//if (manager == null) return;
//var replayPackage = new ReplayPackage()
//{
// type = ClipPackageSignal.REPLAY,
// status = ReplayStatus.Stop
//};
//ReplayIsChecked = false;
////当没有播放音视频的流时,是会有个被捕获的异常
//manager.SendJson(replayPackage);
ReplayIsChecked = false;
}
......@@ -1663,26 +1350,6 @@ namespace VIZ.FGOUT.Module
ApplicationDomain.MessageManager.Send(replayStartModel);
//UdpEndpointManager manager = ConnectionManager.UdpConnection.GetEndpointManager(NDIViewKeys.CAM_1__CLIP);
//if (manager == null) return;
//ReplayPackage replayPackage = new ReplayPackage();
//replayPackage.type = ClipPackageSignal.REPLAY;
////VideoData data = new VideoData();
//////data.backTimes = Convert.ToInt32(ReplaySecond);
//////timecode时间戳
////data.timecode = NDIViewModel.ReplayTimeStamp;
////data.status = 1;
////replayPackage.data = data;
//replayPackage.start_time = StartTime;
//replayPackage.end_time = EndTime;
//replayPackage.status = ReplayStatus.Start;
//manager.SendJson(replayPackage);
//MessageBoxEx.ShowDialog("Replay Start OK.");
//StartAutoSendTimer();
AutoSendCount = AutoSendIntervalTime;
}
......@@ -1700,34 +1367,6 @@ namespace VIZ.FGOUT.Module
ApplicationDomain.MessageManager.Send(replayOutPointModel);
}
//private long _start_time;
///// <summary>
///// 开始时间戳
///// </summary>
//public long StartTime
//{
// get => _start_time;
// set
// {
// _start_time = value;
// this.RaisePropertyChanged(nameof(StartTime));
// }
//}
//private long _end_time;
///// <summary>
///// 结束时间戳
///// </summary>
//public long EndTime
//{
// get => _end_time;
// set
// {
// _end_time = value;
// this.RaisePropertyChanged(nameof(EndTime));
// }
//}
#endregion
#region RestartCommand -- 算法重启命令
......@@ -1742,14 +1381,9 @@ namespace VIZ.FGOUT.Module
/// </summary>
private void Restart()
{
//MessageBoxEx.ShowDialog("开发中...");
//return;
MessageBoxExResult result = MessageBoxEx.ShowDialog("提示", "重启算法进程大概需要1分钟,是否继续?", MessageBoxExButtons.YES_CANCEL);
if (result == MessageBoxExResult.CANCEL) return;
//// 清理视频控件
//ClearVideoControlContext clear_context = new ClearVideoControlContext(false, true);
//this.ClearVideoControl(clear_context);
RestartAlgorithmModel restartAlgorithmModel = new RestartAlgorithmModel();
ApplicationDomain.MessageManager.Send(restartAlgorithmModel);
}
......@@ -1798,9 +1432,6 @@ namespace VIZ.FGOUT.Module
MessageBoxExResult result = MessageBoxEx.ShowDialog("提示", "是否关闭算法?", MessageBoxExButtons.YES_CANCEL);
if (result == MessageBoxExResult.CANCEL) return;
//// 清理视频控件
//ClearVideoControlContext clear_context = new ClearVideoControlContext(false, true);
//this.ClearVideoControl(clear_context);
StopAlgorithmModel stopAlgorithmModel = new StopAlgorithmModel();
ApplicationDomain.MessageManager.Send(stopAlgorithmModel);
}
......@@ -1852,23 +1483,9 @@ namespace VIZ.FGOUT.Module
// 发送UDP命令给音视频
UdpEndpointManager manager = ConnectionManager.UdpConnection.GetEndpointManager(NDIViewKeys.CAM_1__CLIP);
//var ndiViewConfig =
// ApplicationDomainEx.LiteDbContext.ViewConfig.FindOne(p => p.ViewKey == NDIViewKeys.CAM_1);
//package.SportsCode = ndiViewConfig.GameName;
//package.RecordResult = IsMatImage;
//// 发送UDP命令给算法
//UdpEndpointManager manager = ConnectionManager.UdpConnection.GetEndpointManager(NDIViewKeys.CAM_1);
if (manager == null) return;
manager.SendJson(package);
}
//ReplayPackage replayPackage = new ReplayPackage();
// data.loadFlag = 1;
//else
// data.loadFlag = 0;
//VideoData data = new VideoData();
//replayPackage.data = data;
}
private bool _isMatImage;
......@@ -2019,9 +1636,6 @@ namespace VIZ.FGOUT.Module
endPlaceModel.EndPlace = false;
invalidPlaceModel.IsInvalid = true;
ApplicationDomain.MessageManager.Send(invalidPlaceModel);
//EndEnable = true;
//InvalidEnable = false;
//StartEnable = true;
StartIsChecked = false;
EndIsChecked = false;
}
......@@ -2046,14 +1660,10 @@ namespace VIZ.FGOUT.Module
private void StartRegion()
{
//NDIMainView nDIMainView=this.GetView<NDIMainView>();
startPlaceModel.StartPlace = true;
endPlaceModel.EndPlace = false;
invalidPlaceModel.IsInvalid = false;
ApplicationDomain.MessageManager.Send(startPlaceModel);
//EndEnable = true;
//InvalidEnable = true;
//StartEnable = false;
EndIsChecked = false;
InvalidIsChecked = false;
}
......@@ -2080,9 +1690,6 @@ namespace VIZ.FGOUT.Module
endPlaceModel.EndPlace = true;
invalidPlaceModel.IsInvalid = false;
ApplicationDomain.MessageManager.Send(endPlaceModel);
//EndEnable = false;
//InvalidEnable = true;
//StartEnable = true;
StartIsChecked = false;
InvalidIsChecked = false;
}
......@@ -2162,11 +1769,6 @@ namespace VIZ.FGOUT.Module
private void SavePlace()
{
ThreePositionButtonsUnChecked();
//if(IsAutoEnable)
// savePlaceModel.IsManual = true;
//else
// savePlaceModel.IsManual = false;
//savePlaceModel.IsStartMat = IsStartImaget;
ApplicationDomain.MessageManager.Send(savePlaceModel);
}
......@@ -2174,17 +1776,6 @@ namespace VIZ.FGOUT.Module
#region 按钮可用性
/// <summary>
/// 开始位置可用性
/// </summary>
//private bool replayEnable = true;
//public bool ReplayEnable
//{
// get { return replayEnable; }
// set { replayEnable = value; this.RaisePropertyChanged(nameof(ReplayEnable)); }
//}
private Visibility _sliderVisibility = Visibility.Hidden;
public Visibility SliderVisibility
{
......@@ -2203,24 +1794,16 @@ namespace VIZ.FGOUT.Module
get => (int)_sliderStartValue;
set
{
//if ((DateTime.Now - _prestartDt).TotalMilliseconds < _minis) return;
//var nowDt = _prestartDt = DateTime.Now;
//if ((nowDt - _startDt).TotalMilliseconds < _minis) return;
//var minus = (nowDt - _startDt).TotalMilliseconds;
var nowDt = DateTime.Now;
var minus = (nowDt - _endDt).TotalMilliseconds;
if (minus > _minis)
{
if (!_isReplayChecked)
if (minus > _minis && !_isReplayChecked)
{
_sliderStartValue = value;
this.RaisePropertyChanged(nameof(SliderStartValue));
var replayModel = new ReplayModel() { IsReplay = true, IsStartValue = true, SliderValue = value };
ApplicationDomain.MessageManager.Send(replayModel);
}
}
_startDt = DateTime.Now;
//log.Info("StartValue =" + _sliderStartValue);
_isDown = false;
}
}
......@@ -2232,11 +1815,6 @@ namespace VIZ.FGOUT.Module
get => _sliderEndValue;
set
{
//if ((DateTime.Now - _prestartDt).TotalMilliseconds < _minis) return;
//var nowDt = _prestartDt = DateTime.Now;
//if ((nowDt - _endDt).TotalMilliseconds < _minis) return;
//log.Info("EndValue =" + _sliderEndValue);
var nowDt = DateTime.Now;
var minus = (nowDt - _startDt).TotalMilliseconds;
if (minus > _minis)
......@@ -2274,13 +1852,6 @@ namespace VIZ.FGOUT.Module
set { _sliderValue2 = value; this.RaisePropertyChanged(nameof(SliderValue2)); }
}
//private int _sliderMaxValue = 500;
//public int SliderMaxValue
//{
// get => (int)_sliderMaxValue;
// set { _sliderMaxValue = value; this.RaisePropertyChanged(nameof(SliderMaxValue)); }
//}
private bool _startIsChecked;
/// <summary>
/// 开始位置是否选中
......@@ -2552,10 +2123,7 @@ namespace VIZ.FGOUT.Module
return;
//窗口不是激活状态,返回
if (!window.IsActive)
return;
//MessageBox.Show(HotkeyHelper.GetHotkey(e));
if (!window.IsActive) return;
// 屏蔽空格键
if (e.KeyCode == System.Windows.Forms.Keys.Space)
......
......@@ -26,31 +26,18 @@ namespace VIZ.FGOUT.Module
public NDIViewModel vm = new NDIViewModel();
// Rectangle rectStart = new Rectangle();
// Rectangle rectEnd = new Rectangle();
public PathGeometry aa = new PathGeometry();
//PathGeometry bb = new PathGeometry();
//public Rect rectStart;
public List<PointCollection> polygonsStart = new List<PointCollection>();
public List<PointCollection> polygonsEnd = new List<PointCollection>();
public List<PointCollection> polygonsInvalid = new List<PointCollection>();
//public List<PointCollection> _polygonsMark;
// public Rect rectEnd;
public Rect rectInvalid;
// public Rectangle rectInvalid;
//public List<Rect> rectsInvalid = new List<Rect>();
public Rect rectReplay;
// public Rectangle rectInvalid;
public static List<Rect> rectsReplay = new List<Rect>();
public static TrackingBoxInfo saveInfo = new TrackingBoxInfo();
public static List<TrackingBoxInfo> saveInfos = new List<TrackingBoxInfo>();
// public Path myPath = new Path();
// public Path myPath1 = new Path();
public NDIView()
{
......@@ -161,7 +148,6 @@ namespace VIZ.FGOUT.Module
{
if ((bool)e.NewValue)
{
//_DetectBtn_.Visibility =
_CheckBoxIsAlgorithmTargetBoxExists_.Visibility = _RestartBtn_.Visibility = _StopBtn_.Visibility = Visibility.Collapsed;
_NewWindowBtn_.Visibility = Visibility.Visible;
}
......@@ -353,8 +339,6 @@ namespace VIZ.FGOUT.Module
{
aa.AddGeometry(new RectangleGeometry(rectReplay));
rectsReplay.Add(rectReplay);
//if (rectsReplay.Count == 2)
// rectsReplay.RemoveAt(0);
var myPath = new Path()
{
Fill = Brushes.Transparent,
......@@ -400,12 +384,6 @@ namespace VIZ.FGOUT.Module
if (info.SrcRect.Left >= 0 && info.SrcRect.Right >= 0 && info.SrcRect.Top >= 0 &&
info.SrcRect.Bottom >= 0)
{
//计算四个方向到点的距离取绝对值
//var difference = Math.Abs(x - info.SrcRect.Left) + Math.Abs(info.SrcRect.Right - x)
// + Math.Abs(y - info.SrcRect.Top) + Math.Abs(info.SrcRect.Bottom - y);
//计算点到矩形中心点的距离的绝对值
//var difference = Math.Abs(x - (info.SrcRect.Right - info.SrcRect.Left)) + Math.Abs(y - (info.SrcRect.Bottom - info.SrcRect.Top));
//先平方相加再开方
var difference =
Math.Sqrt(Math.Pow((((info.SrcRect.Right + info.SrcRect.Left)) / 2 - x), 2.0) +
......@@ -426,7 +404,6 @@ namespace VIZ.FGOUT.Module
}
var gameName = ApplicationDomainEx.LiteDbContext.ViewConfig.FindOne(p => p.ViewKey == NDIViewKeys.CAM_1).GameName;
//当双人3m跳水,双人10m跳水,双人速度攀岩时,保存2个入点框
//if (gameName.Equals("SS") || gameName.Equals("ST") || gameName.Equals("SP"))
if (gameName.Equals(SportsProjectCodes.SS) || gameName.Equals(SportsProjectCodes.ST) || gameName.Equals(SportsProjectCodes.SP))
{
if (saveInfos.Count == 2)
......@@ -518,10 +495,6 @@ namespace VIZ.FGOUT.Module
DrawPolygon(e.GetPosition(this.canvas1), Brushes.Green);
else if (vm.IsDrawInvalidPlace)
DrawPolygon(e.GetPosition(this.canvas1), Brushes.Red);
//else if(vm.IsMark)
// DrawDot(e.GetPosition(this.canvas1), Brushes.Red);
//else if (vm.IsManualDetect)
//{
......
......@@ -32,7 +32,6 @@ namespace VIZ.FGOUT.Module
private readonly TrackingBoxInfoBuffer _trackingBBoxInfoBuffer =
new TrackingBoxInfoBuffer(TimeSpan.FromSeconds(50 * STREAM_CACHEED_TIME));
//public List<TrackingBoxInfo> _cam3UpdateInfos = new List<TrackingBoxInfo>();
public List<TrackingBoxInfo> _cam3Infos = new List<TrackingBoxInfo>();
public List<TrackingBoxInfo> _cam3BInfos = new List<TrackingBoxInfo>();
......@@ -59,11 +58,6 @@ namespace VIZ.FGOUT.Module
/// </summary>
private void InitManual()
{
//SystemConfig config = ApplicationDomainEx.LiteDbContext.SystemConfig.FindAll().FirstOrDefault();
//int clipBoxTargetX = (ApplicationDomainEx.VIDEO_WIDTH - ApplicationDomainEx.VIDEO_CLIP_BOX_WIDTH) / 2;
//this.ManualController.ClipBoxSmooth.Init(clipBoxTargetX, clipBoxTargetX, config.ManualSmoothCoeff);
//this.ManualController.ClipBoxTargetX = clipBoxTargetX;
}
/// <summary>
......@@ -167,26 +161,17 @@ namespace VIZ.FGOUT.Module
try
{
var view = this.GetView<NDIView>();
if (view == null)
return;
//不能这么判断,会崩,要用WPFHelper.Invoke这个
//if (view.NDIKey == NDIViewKeys.CAM_3)
//{
//}
if (view == null) return;
//入点热键
if (view.vm.IsSliderStartClicked)
{
//SliderStartTimeStamp = e.Frame.TimeStamp;
StartTime = e.Frame.TimeStamp;
view.vm.IsSliderStartClicked = false;
}
//出点热键
else if (view.vm.IsSliderEndClicked)
{
//SliderEndTimeStamp = e.Frame.TimeStamp;
EndTime = e.Frame.TimeStamp;
view.vm.IsSliderEndClicked = false;
}
......@@ -200,27 +185,17 @@ namespace VIZ.FGOUT.Module
{
view.vm.IsReplayStarted = false;
//if(view.vm.ReplayInPointStartTime > 0)
// StartTime = view.vm.ReplayInPointStartTime;
//if(view.vm.ReplayOutPointEndTime > 0)
// EndTime = view.vm.ReplayOutPointEndTime;
//if (view.vm.IsSliderValueChanged)
//{
if (buffer.Count > 0)
{
foreach (var matExtend in buffer)
{
//遍历队列集合,先遍历到入点帧
//if (matExtend.TimeStamp == SliderStartTimeStamp)
// SliderStartValue = index;
//else if(matExtend.TimeStamp == SliderEndTimeStamp)
// break;
if (matExtend.TimeStamp == StartTime)
{
SliderStartValue = index;
//var replayStartValueModel = new ReplayStartValueModel() { ReplayStartValue = index};
//ApplicationDomain.MessageManager.Send(replayStartValueModel);
}
else if (matExtend.TimeStamp == EndTime)
break;
......@@ -228,25 +203,20 @@ namespace VIZ.FGOUT.Module
index++;
}
//view.vm.SliderStartValue = index;
//view.vm.SliderEndValue = index;
SliderEndValue = index;
//var replayEndValueModel = new ReplayEndValueModel() { ReplayEndValue = index };
//ApplicationDomain.MessageManager.Send(replayEndValueModel);
}
//}
}
//如果是Start滑块在动
else if (view.vm.IsStartValue)
{
//view.vm.IsStartValue =false;
SliderStartValue = index = SliderValue;
}
//如果是End滑块在动
else if (view.vm.IsEndValue)
{
//view.vm.IsEndValue = false;
SliderEndValue = index = SliderValue;
}
......@@ -276,7 +246,6 @@ namespace VIZ.FGOUT.Module
Queue<TrackingBoxInfo> infoBBuffers = _trackingBBoxInfoBuffer.GetInfos();
_cam3Infos = new List<TrackingBoxInfo>();
_cam3BInfos = new List<TrackingBoxInfo>();
//_cam3UpdateInfos = new List<TrackingBoxInfo>();
//跟踪框全显示
if (infoBuffers.Count > 0)
{
......@@ -300,7 +269,8 @@ namespace VIZ.FGOUT.Module
#region 算法track到人的情况下跟踪框标红
if (_cam3BInfos.Count > 0 && view.vm.IsStartValue)
if (_cam3BInfos.Count > 0)
//if (_cam3BInfos.Count > 0 && view.vm.IsStartValue)
{
var info2 = _cam3BInfos[0];
if (info2.BboxType != null && info2.BboxType.Equals(AlgorithmPackageSignal.track))
......@@ -312,21 +282,37 @@ namespace VIZ.FGOUT.Module
gameName.Equals(SportsProjectCodes.ST) ||
gameName.Equals(SportsProjectCodes.SP))
{
if (view.vm.IsStartValue)
{
_twoInfos = new List<TrackingBoxInfo>();
}
else if (view.vm.IsEndValue)
{
_twoOutPointInfos = new List<TrackingBoxInfo>();
}
foreach (var saveInfo in _cam3BInfos)
{
//更新红色点中框
saveInfo.DrawingBorderColor = this.TRACKING_BOX_BORDER_COLOR;
//把选中框的信息也加到这个集合里
_cam3Infos.Add(saveInfo);
//记录标红框时入点时间戳
_RecordStartTime = saveInfo.TimeCode;
//赋值
if (view.vm.IsStartValue)
{
//记录标红框时入点时间戳
_RecordStartTime = saveInfo.TimeCode;
_twoInfos.Add(saveInfo);
}
else if (view.vm.IsEndValue)
{
//记录标红框时入点时间戳
_RecordEndTime = saveInfo.TimeCode;
_twoOutPointInfos.Add(saveInfo);
}
//清除点选跟踪框的数据
//view.saveInfos = new List<TrackingBoxInfo>();
NDIView.saveInfos = new List<TrackingBoxInfo>();
}
}
......@@ -336,15 +322,23 @@ namespace VIZ.FGOUT.Module
info2.DrawingBorderColor = this.TRACKING_BOX_BORDER_COLOR;
//把选中框的信息也加到这个集合里
_cam3Infos.Add(info2);
//记录标红框时入点时间戳
_RecordStartTime = info2.TimeCode;
//赋值
if (view.vm.IsStartValue)
{
//记录标红框时入点时间戳
_RecordStartTime = info2.TimeCode;
_singleInfo = info2;
}
else if (view.vm.IsEndValue)
{
//记录标红框时出点时间戳
_RecordEndTime = info2.TimeCode;
_singleOutPointInfo = info2;
}
}
//清除点选跟踪框的数据
//view.saveInfo = new TrackingBoxInfo();
NDIView.saveInfo = new TrackingBoxInfo();
//清除拖框的数据
//view.rectsReplay.Clear();
......@@ -373,43 +367,6 @@ namespace VIZ.FGOUT.Module
// 更新视频流
view3.video.UpdateVideoFrame(dsExtend, true);
#region 注释的代码
//// 更新视频控件跟踪框信息,现在_cam3Infos里是缓存的跟踪框信息
//if (_cam3Infos.Count > 0)
//{
// _cam3StaticInfos = _cam3Infos;
// var gameName = ApplicationDomainEx.LiteDbContext.ViewConfig.FindOne(p => p.ViewKey == NDIViewKeys.CAM_1).GameName;
// //当双人3m跳水,双人10m跳水,双人速度攀岩时,保存2个入点框
// if (gameName.Equals("SS") || gameName.Equals("ST") || gameName.Equals("SP"))
// {
// foreach (var saveInfo in view3.saveInfos)
// {
// //更新红色点中框
// if (saveInfo.SrcRect.Left > 0)
// {
// saveInfo.DrawingBorderColor = this.TRACKING_BOX_BORDER_COLOR;
// _cam3Infos.Add(saveInfo);//把选中框的信息也加到这个集合里
// }
// }
// }
// else
// {
// //更新红色点中框
// if (view3.saveInfo.SrcRect.Left > 0)
// {
// view3.saveInfo.DrawingBorderColor = this.TRACKING_BOX_BORDER_COLOR;
// _cam3Infos.Add(view3.saveInfo);//把选中框的信息也加到这个集合里
// }
// }
// //先清除跟踪框
// //view3.video.ClearTrackingBox();
// //再更新跟踪框信息
// view3.video.UpdateTrackingBox(_cam3Infos);
//}
#endregion
// 更新视频控件跟踪框信息,现在_cam3BInfos里是缓存的跟踪框信息
if (_cam3BInfos.Count > 0)
{
......@@ -417,7 +374,6 @@ namespace VIZ.FGOUT.Module
var gameName = ApplicationDomainEx.LiteDbContext.ViewConfig
.FindOne(p => p.ViewKey == NDIViewKeys.CAM_1).GameName;
//当双人3m跳水,双人10m跳水,双人速度攀岩时,保存2个入点框
//if (gameName.Equals("SS") || gameName.Equals("ST") || gameName.Equals("SP"))
if (gameName.Equals(SportsProjectCodes.SS) ||
gameName.Equals(SportsProjectCodes.ST) ||
gameName.Equals(SportsProjectCodes.SP))
......@@ -431,21 +387,15 @@ namespace VIZ.FGOUT.Module
saveInfo.DrawingBorderColor = this.TRACKING_BOX_BORDER_COLOR;
//把选中框的信息也加到这个集合里
_cam3Infos.Add(saveInfo);
//_cam3UpdateInfos.Add(saveInfo);
//记录标红框时入点时间戳
_RecordStartTime = saveInfo.TimeCode;
}
}
//view3.video.UpdateTrackingBox(_cam3UpdateInfos);
//记录标红框时入点时间戳
//_RecordStartTime = StartTime;
}
else
{
//单人
//var info = view3.saveInfo;
var info = NDIView.saveInfo;
//更新红色点中框
if (info.SrcRect.Left > 0)
......@@ -453,16 +403,12 @@ namespace VIZ.FGOUT.Module
info.DrawingBorderColor = this.TRACKING_BOX_BORDER_COLOR;
//把选中框的信息也加到这个集合里
_cam3Infos.Add(info);
//view3.video.UpdateTrackingBox(new List<TrackingBoxInfo>(){ info });
//记录标红框时入点时间戳
//_RecordStartTime = StartTime;
_RecordStartTime = info.TimeCode;
}
}
//先清除跟踪框
//view3.video.ClearTrackingBox();
//再更新跟踪框信息
view3.video.UpdateTrackingBox(_cam3Infos);
}
......@@ -484,64 +430,19 @@ namespace VIZ.FGOUT.Module
{
index = 0;
#region 注释的代码
//缓存策略1
//dsExtend.DataStream = DeepCloneDataStream(e.Frame.DataStream);
//dsExtend.Width = e.Frame.Width;
//dsExtend.Height = e.Frame.Height;
//dsExtend.TimeStamp = e.Frame.TimeStamp;
//_frameBuffer.AddFrame(dsExtend);
#endregion
//缓存策略2
// 将视频帧转换为Mat对象
//var t1 = DateTime.Now;
var mat = new Mat(e.Frame.Height, e.Frame.Width, MatType.CV_8UC4, e.Frame.DataStream.DataPointer);
// 将帧缩放到低分辨率
var resizedFrame = new Mat();
//Cv2.Resize(mat, resizedFrame, new Size(mat.Width / 4 , mat.Height / 4));
Cv2.Resize(mat, resizedFrame, new OpenCvSharp.Size(mat.Width, mat.Height));
//时间戳获取
timecode = e.Frame.TimeStamp;
//_frameBuffer.AddFrame(resizedFrame);
_frameBuffer.AddFrame(new MatExtend() { Mat = resizedFrame, TimeStamp = timecode });
// 释放视频帧资源
mat.Dispose();
#region 注释的代码
//原始帧直接放到队列
//var mat = new Mat(e.Frame.Height, e.Frame.Width, MatType.CV_8UC4, e.Frame.DataStream.DataPointer);
//_frameBuffer.AddFrame(mat);
//var t2 = DateTime.Now;
//var minus = (t2 - t1).TotalMilliseconds;
////时间戳获取
//timecode = e.Frame.TimeStamp;
// 更新画面 4K流优化
//var mat2 = new Mat(e.Frame.Height, e.Frame.Width, MatType.CV_8UC4, e.Frame.DataStream.DataPointer);
//var resizedFrame2 = new Mat();
//Cv2.Resize(mat2, resizedFrame2, new Size(mat2.Width / 4, mat2.Height / 4));
//byte[] lowResolutionData = new byte[resizedFrame2.Width * resizedFrame2.Height * 4];
//var newLength = lowResolutionData.Length;
//Marshal.Copy(resizedFrame2.Data, lowResolutionData, 0, newLength);
//DataStreamExtend dsExtend = new DataStreamExtend();
//dsExtend.DataStream = new DataStream((int)newLength, true, true);
//dsExtend.DataStream.Write(lowResolutionData, 0, newLength);
//dsExtend.DataStream.Position = 0;
//dsExtend.Width = resizedFrame2.Width;
//dsExtend.Height = resizedFrame2.Height;
//dsExtend.Length = newLength;
//dsExtend.TimeStamp = NDIViewModel.ReplayTimeStamp = e.Frame.TimeStamp;
//view.video.UpdateVideoFrame(dsExtend);
#endregion
}
// 更新画面
......@@ -574,25 +475,11 @@ namespace VIZ.FGOUT.Module
else if (this.StrategyMode == AlgorithmStrategyMode.manual_mode)
AlgorithmSender.ManualMode(manager, this.ID, this.ViewConfig.IsSendToCrop, roi,
this.AlgorithmConfig.SmoothCoeff);
// 在需要发送裁切框时
//if (this.viewConfig.IsSendToCrop)
//{
// UdpEndpointManager manager_clip = ConnectionManager.UdpConnection.GetEndpointManager($"{this.ViewKey}__CLIP");
// if (manager_clip != null)
// {
// ClipSender.CropRoi(manager_clip, 0, this.GetManulRoi((int)sendValue.Value), ApplicationDomainEx.VIDEO_CLIP_BOX_WIDTH, e.Frame.Height, sendValue.TimeCode);
// }
//}
// 统计裁切FPS(20240305注释)
//this.ClipFPS.CalcFps();
}
}
catch (Exception ex)
{
log.Error(ex);
return;
}
}
}
......@@ -665,7 +552,6 @@ namespace VIZ.FGOUT.Module
public FrameBuffer(TimeSpan duration)
{
bufferDuration = duration;
//bufferSize = (int)(duration.TotalMilliseconds / TimeSpan.FromSeconds(0.1).TotalMilliseconds);
bufferSize = duration.Seconds * 50;
buffer = new Queue<MatExtend>(bufferSize);
}
......@@ -674,7 +560,6 @@ namespace VIZ.FGOUT.Module
{
buffer.Enqueue(frame);
// 如果缓冲区超过容量,则移除最旧的帧
//if (buffer.Count > bufferSize)
if (buffer.Count > (50 * STREAM_CACHEED_TIME))
buffer.Dequeue();
}
......@@ -690,37 +575,4 @@ namespace VIZ.FGOUT.Module
public Mat Mat { get; set; }
public long TimeStamp { get; set; }
}
#region 注释的代码
//public class FrameBuffer
//{
// private Queue<DataStreamExtend> buffer;
// private int bufferSize;
// private TimeSpan bufferDuration;
// public FrameBuffer(TimeSpan duration)
// {
// bufferDuration = duration;
// //bufferSize = (int)(duration.TotalMilliseconds / TimeSpan.FromSeconds(0.1).TotalMilliseconds);
// bufferSize = duration.Seconds * 50;
// buffer = new Queue<DataStreamExtend>(bufferSize);
// }
// public void AddFrame(DataStreamExtend frame)
// {
// buffer.Enqueue(frame);
// // 如果缓冲区超过容量,则移除最旧的帧
// //if (buffer.Count > bufferSize)
// if (buffer.Count > 150)
// buffer.Dequeue();
// }
// public Queue<DataStreamExtend> GetFrames()
// {
// return buffer;
// }
//}
#endregion
}
......@@ -213,23 +213,19 @@ namespace VIZ.FGOUT.Module
private void ReplayOutPort(ReplayOutPointModel replayOutPointModel)
{
if (this.ViewKey != NDIViewKeys.CAM_3)
return;
if (this.ViewKey != NDIViewKeys.CAM_3) return;
EndTime = ReplayTimeStamp;
}
private void ReplayInPort(ReplayInPortModel replayInPortModel)
{
if (this.ViewKey != NDIViewKeys.CAM_3)
return;
if (this.ViewKey != NDIViewKeys.CAM_3) return;
StartTime = ReplayTimeStamp;
}
private void ReplayStart(ReplayStartModel replayStartModel)
{
if (this.ViewKey != NDIViewKeys.CAM_3)
//if (this.ViewKey != NDIViewKeys.CAM_1)
return;
if (this.ViewKey != NDIViewKeys.CAM_3) return;
// 对结束值进行组装
NDIView nDIView = this.GetView<NDIView>();
//var rects = nDIView.rectsReplay;
......@@ -242,60 +238,24 @@ namespace VIZ.FGOUT.Module
var managerAlgorithm = ConnectionManager.UdpConnection.GetEndpointManager(NDIViewKeys.CAM_1);
if (managerAlgorithm == null) return;
//if (StartTime == 0)
//{
// MessageBoxEx.ShowDialog("请选择入点.");
// return;
//}
//if (EndTime == 0)
//{
// MessageBoxEx.ShowDialog("请选择出点.");
// return;
//}
//if (EndTime <= StartTime)
//{
// MessageBoxEx.ShowDialog("出点应大于入点.");
// return;
//}
List<List<List<int>>> inPoints = new List<List<List<int>>>();
List<List<List<int>>> outPoints = new List<List<List<int>>>();
bool isInPoint = false;
bool isOutPoint = true;
//前三个手拖框、双人项目、单人项目都是判断是否有值
//手拖框
//if (nDIView.rectsReplay.Count > 0 && nDIView.rectsReplay[0].Width > 0 && nDIView.rectsReplay[0].Height > 0)
//{
// inPoints = Coordinate(nDIView.rectsReplay, srcWidth, srcHeight);
// isInPoint = true;
//}
if (NDIView.rectsReplay.Count > 0 && NDIView.rectsReplay[0].Width > 0 && NDIView.rectsReplay[0].Height > 0)
{
inPoints = Coordinate(NDIView.rectsReplay, srcWidth, srcHeight);
isInPoint = true;
}
//双人项目
//else if(nDIView.saveInfos.Count > 0)
//{
// if (nDIView.saveInfos.Count == 2)
// {
// if (InPointIsMoved()) return; //入点和入点标记框位置不一致,返回
// inPoints = CoordinateTrackingBoxInfos(nDIView.saveInfos, srcWidth, srcHeight);
// isInPoint = true;
// }
// else
// {
// WPFHelper.BeginInvoke(() =>
// {
// MessageBoxEx.ShowDialog("双人比赛项目应选择两个入点.");
// });
// return;
// }
//}
else if (NDIView.saveInfos.Count > 0)
{
if (NDIView.saveInfos.Count == 2)
{
if (InPointIsMoved()) return; //入点和入点标记框位置不一致,返回
if (InPointIsMoved()) return;
inPoints = CoordinateTrackingBoxInfos(NDIView.saveInfos, srcWidth, srcHeight);
isInPoint = true;
}
......@@ -309,24 +269,9 @@ namespace VIZ.FGOUT.Module
}
}
//单人项目
//else
//{
// if(nDIView.saveInfo.SrcRect.Left > 0)
// {
// if (InPointIsMoved()) return; //入点和入点标记框位置不一致,返回
// inPoints = CoordinateTrackingBoxInfo(nDIView.saveInfo.SrcRect, srcWidth, srcHeight);
// isInPoint = true;
// }
//}
//else if (nDIView.saveInfo.SrcRect.Left > 0)
//{
// if (InPointIsMoved()) return; //入点和入点标记框位置不一致,返回
// inPoints = CoordinateTrackingBoxInfo(nDIView.saveInfo.SrcRect, srcWidth, srcHeight);
// isInPoint = true;
//}
else if (NDIView.saveInfo.SrcRect.Left > 0)
{
if (InPointIsMoved()) return; //入点和入点标记框位置不一致,返回
if (InPointIsMoved()) return;
inPoints = CoordinateTrackingBoxInfo(NDIView.saveInfo.SrcRect, srcWidth, srcHeight);
isInPoint = true;
}
......@@ -334,17 +279,30 @@ namespace VIZ.FGOUT.Module
else if (_twoInfos.Count > 0)
{
if (InPointIsMoved()) return; //入点和入点标记框位置不一致,返回
if (InPointIsMoved()) return;
inPoints = CoordinateTrackingBoxInfos(_twoInfos, srcWidth, srcHeight);
isInPoint = true;
}
else if (_singleInfo.SrcRect.Left > 0)
{
if (InPointIsMoved()) return; //入点和入点标记框位置不一致,返回
if (InPointIsMoved()) return;
inPoints = CoordinateTrackingBoxInfo(_singleInfo.SrcRect, srcWidth, srcHeight);
isInPoint = true;
}
if (_twoOutPointInfos.Count > 0)
{
if (OutPointIsMoved()) return;
outPoints = CoordinateTrackingBoxInfos(_twoOutPointInfos, srcWidth, srcHeight);
isOutPoint = true;
}
else if (_singleOutPointInfo.SrcRect.Left > 0)
{
if (OutPointIsMoved()) return;
outPoints = CoordinateTrackingBoxInfo(_singleOutPointInfo.SrcRect, srcWidth, srcHeight);
isOutPoint = true;
}
#endregion
if (!isInPoint)
......@@ -353,20 +311,24 @@ namespace VIZ.FGOUT.Module
return;
}
//if (!isOutPoint)
//{
// WPFHelper.BeginInvoke(() => { MessageBoxEx.ShowDialog("没有获取到出点跟踪框信息。"); });
// return;
//}
var replayPackage = new ReplayPackage()
{
type = ClipPackageSignal.REPLAY,
start_time = StartTime,
end_time = EndTime,
status = ReplayStatus.Start,
inPoints = inPoints
inPoints = inPoints,
outPoints = outPoints
};
managerAlgorithm.SendJson(replayPackage);
////延时2秒
//Thread.Sleep(2000);
manager.SendJson(replayPackage);
//MessageBoxEx.ShowDialog("Replay Start OK.");
}
/// <summary>
......@@ -386,24 +348,31 @@ namespace VIZ.FGOUT.Module
return false;
}
private bool OutPointIsMoved()
{
if (_RecordEndTime != EndTime)
{
WPFHelper.BeginInvoke(() =>
{
MessageBoxEx.ShowDialog("出点和出点标记框位置不一致。");
});
return true;
}
return false;
}
private void CleanInPoints(CleanInPointsModel cleanInPointsModel)
{
if (this.ViewKey != NDIViewKeys.CAM_3) return;
var ndiView = this.GetView<NDIView>();
if (ndiView == null) return;
//ndiView.rectsReplay.Clear();
NDIView.rectsReplay.Clear();
ndiView.canvas1.Children.Clear();
//清除跟踪框的数据
//ndiView.saveInfo = new TrackingBoxInfo();
//ndiView.saveInfos = new List<TrackingBoxInfo>();
NDIView.saveInfo = new TrackingBoxInfo();
NDIView.saveInfos = new List<TrackingBoxInfo>();
_singleInfo = new TrackingBoxInfo();
_twoInfos = new List<TrackingBoxInfo>();
//清除跟踪框(没啥用)
//ndiView.video.ClearTrackingBox();
}
private void NewWindow(NewWindowModel newWindowModel)
......@@ -417,23 +386,14 @@ namespace VIZ.FGOUT.Module
{
if (this.ViewKey != NDIViewKeys.CAM_1) return;
ReconfirmSendParamsCommon(ReconfirmStatus.Abandon);
//_autoSend_Timer.Stop();
}
private void ReconfirmSend(ReconfirmSendModel reconfirmSendModel)
{
if (this.ViewKey != NDIViewKeys.CAM_1) return;
ReconfirmSendParamsCommon(ReconfirmStatus.Send);
//_autoSend_Timer.Stop();
//_autoSend_Timer.Start();
}
//private void ReconfirmAutoSendIntervalTime(ReconfirmAutoSendIntervalTimeModel reconfirmAutoSendIntervalTimeModel)
//{
// if (this.ViewKey != NDIViewKeys.CAM_1) return;
// _autoSend_Timer.Interval = ALGORITHM_ReconfirmAutoSend_TIME = reconfirmAutoSendIntervalTimeModel.IntervalTime * 1000;
//}
private void ReconfirmSendParamsCommon(ReconfirmStatus reconfirmStatus)
{
var manager = ConnectionManager.UdpConnection.GetEndpointManager(NDIViewKeys.CAM_1__CLIP);
......@@ -482,30 +442,28 @@ namespace VIZ.FGOUT.Module
//滑动条的值
public int SliderValue;
public bool IsSliderValueChanged;
//public long ReplayInPointStartTime;
//public long ReplayOutPointEndTime;
public bool IsReplay;
public bool IsReplayStarted;
public bool IsStartValue;
public bool IsEndValue;
public bool IsSliderStartClicked;
public bool IsSliderEndClicked;
//public long SliderStartTimeStamp;
//public long SliderEndTimeStamp;
public static int SliderStartValue;
public static int SliderEndValue;
public static long StartTime { get; set; }
public static long EndTime { get; set; }
//public static List<TrackingBoxInfo> _cam3StaticInfos;
public static List<TrackingBoxInfo> _cam3StaticInfos = new List<TrackingBoxInfo>();
public static long _RecordStartTime;
public static long _RecordEndTime;
#region Replay算法识别到人的情况下保存跟踪框信息
public static TrackingBoxInfo _singleInfo = new TrackingBoxInfo();
public static List<TrackingBoxInfo> _twoInfos = new List<TrackingBoxInfo>();
public static TrackingBoxInfo _singleOutPointInfo = new TrackingBoxInfo();
public static List<TrackingBoxInfo> _twoOutPointInfos = new List<TrackingBoxInfo>();
#endregion
......@@ -515,9 +473,15 @@ namespace VIZ.FGOUT.Module
/// </summary>
private void Replay(ReplayModel replayModel)
{
//20240223,如果换成!CAM_1,在CAM_3的窗口就不能拖入点的框了
//if (this.ViewKey != NDIViewKeys.CAM_1) return;
//现在直接!CAM_3返回,这样保证方法里内容只运行一次
//if (this.ViewKey != NDIViewKeys.CAM_3) return;
//现在看不能用!CAM_3的真实原因是CAM_3看不到流了,
//为CAM_3缓存和播放流的逻辑目前只能写在CAM_1处理流的方法里,
//所以只能用排除CAM_2和CAM_4的情况
if (this.ViewKey == NDIViewKeys.CAM_2 || this.ViewKey == NDIViewKeys.CAM_4) return;
//if (this.ViewKey != NDIViewKeys.CAM_1)
// return;
IsReplayStarted = replayModel.IsReplayStarted;
IsStartValue = replayModel.IsStartValue;
IsEndValue = replayModel.IsEndValue;
......@@ -526,28 +490,6 @@ namespace VIZ.FGOUT.Module
IsSliderValueChanged = replayModel.IsSliderValueChanged;
SliderValue = replayModel.SliderValue;
//只在清除选区按钮的时候IsReplay不赋值,默认为false
//if (IsReplay)
//{
// _autoSend_Timer.Stop();//自动发送计时器取消
//}
//else
//if(!IsReplay)
//{
// if(this.ViewKey == NDIViewKeys.CAM_3)
// {
// NDIView nDIView = this.GetView<NDIView>();
// if(nDIView == null) return;
// //清除拖框的数据
// nDIView.rectsReplay.Clear();
// nDIView.canvas1.Children.Clear();
// //清除跟踪框的数据
// nDIView.saveInfo = new TrackingBoxInfo();
// nDIView.saveInfos = new List<TrackingBoxInfo>();
// _singleInfo = new TrackingBoxInfo();
// _twoInfos = new List<TrackingBoxInfo>();
// }
//}
//当UnChecked时
if (!IsReplay && this.ViewKey == NDIViewKeys.CAM_3)
......@@ -565,67 +507,11 @@ namespace VIZ.FGOUT.Module
NDIView.saveInfos = new List<TrackingBoxInfo>();
_singleInfo = new TrackingBoxInfo();
_twoInfos = new List<TrackingBoxInfo>();
_twoOutPointInfos = new List<TrackingBoxInfo>();
_singleOutPointInfo = new TrackingBoxInfo();
}
}
/// <summary>
/// 清除拖框和跟踪框的数据
/// </summary>
//private void ClearMoveAndTrackRectangleBoxData()
//{
// //清除拖框的数据
// nDIView.rectsReplay.Clear();
// nDIView.canvas1.Children.Clear();
// //清除跟踪框的数据
// nDIView.saveInfo = new TrackingBoxInfo();
// nDIView.saveInfos = new List<TrackingBoxInfo>();
//}
public bool IsMark;
/// <summary>
/// 算法标记命令
/// </summary>
/// <param name="markModel"></param>
//private void Mark(MarkModel markModel)
//{
// if (this.ViewKey != NDIViewKeys.CAM_1)
// {
// IsMark = false;
// return;
// }
// var nDIView = this.GetView<NDIView>();
// nDIView.dotPoints = new PointCollection();
// nDIView._polygonsMark = new List<PointCollection>();
// IsMark = markModel.IsMark;
//}
/// <summary>
/// 发送算法标记
/// </summary>
/// <param name="saveMarkModel"></param>
//private void SaveMark(SaveMarkModel saveMarkModel)
//{
// if (this.ViewKey != NDIViewKeys.CAM_1)
// return;
// UdpEndpointManager manager = ConnectionManager.UdpConnection.GetEndpointManager(NDIViewKeys.CAM_1);
// if (manager == null)
// return;
// NDIView nDIView = this.GetView<NDIView>();
// var srcWidth = nDIView.video.ActualWidth;
// var srcHeight = nDIView.video.ActualHeight;
// nDIView._polygonsMark.Add(nDIView.dotPoints);
// AlgorithmPackage_Figout_new_model package = new AlgorithmPackage_Figout_new_model();
// package.mark = Coordinate(nDIView._polygonsMark, srcWidth, srcHeight);
// manager.SendJson(package);
// MessageBoxEx.ShowDialog("算法标记保存成功");
//}
public bool IsDrawStartPlace;
/// <summary>
/// 开始位置命令
......@@ -702,7 +588,6 @@ namespace VIZ.FGOUT.Module
var setPlaceNewConfig = ApplicationDomainEx.LiteDbContext.SetPlaceNewConfig.FindOne(p =>
p.SportCode == this.viewConfig.GameName);
if (setPlaceNewConfig == null) return;
//if (setPlaceNewConfig.EndPlace.Count == 0) return;
//自动模式下显示开始和结束位置
if (displayPlaceModel.IsAutoMode)
......@@ -724,11 +609,9 @@ namespace VIZ.FGOUT.Module
if (setPlaceNewConfig.InvlidPlace.Count > 0)
{
//ndiView.rectsInvalid = setPlaceNewConfig.InvlidPlace;
ndiView.polygonsInvalid = setPlaceNewConfig.InvlidPlace;
foreach (var points in setPlaceNewConfig.InvlidPlace)
AddPoints(ndiView, points, Brushes.Red);
//AddRects(ndiView, points, Brushes.Red);
}
}
......@@ -748,21 +631,14 @@ namespace VIZ.FGOUT.Module
if (ndiView == null)
return;
IsCleanPlace = cleanPlaceModel.CleanPlace;
//nDIView.aa = null;
//nDIView.myPath.Data = null;
IsDrawStartPlace = false;
IsDrawEndPlace = false;
IsDrawInvalidPlace = false;
//nDIView.rectStart = new System.Windows.Rect(0, 0, 0, 0);
//nDIView.rectEnd = new System.Windows.Rect(0, 0, 0, 0);
//nDIView.rectInvalid = new System.Windows.Rect(0, 0, 0, 0);
ndiView.polygonsStart.Clear();
ndiView.polygonsEnd.Clear();
ndiView.polygonsInvalid.Clear();
//ndiView.rectsInvalid.Clear();
ndiView.canvas1.Children.Clear();
ndiView.polygon = null;
......@@ -875,58 +751,18 @@ namespace VIZ.FGOUT.Module
// 对结束值进行组装
NDIView nDIView = this.GetView<NDIView>();
//var renderInfo = nDIView.video.GetRenderInfo();
//var rectStart = nDIView.rectStart;
//var rectEnd = nDIView.rectEnd;
//var rectInvalid = nDIView.rectInvalid;
var srcWidth = nDIView.video.ActualWidth;
var srcHeight = nDIView.video.ActualHeight;
// ConnectionManager.UdpConnection.AddEndpointManager(new UdpEndpointManager(NDIViewKeys.CAM_1, "192.168.31.95", 8001));
UdpEndpointManager manager = ConnectionManager.UdpConnection.GetEndpointManager(NDIViewKeys.CAM_1);
if (manager == null)
return;
if (manager == null) return;
//AlgorithmPackage_Figout_model package = new AlgorithmPackage_Figout_model();
AlgorithmPackage_Figout_new_model package = new AlgorithmPackage_Figout_new_model();
package.start = Coordinate(nDIView.polygonsStart, srcWidth, srcHeight);
package.end = Coordinate(nDIView.polygonsEnd, srcWidth, srcHeight);
package.ignore = Coordinate(nDIView.polygonsInvalid, srcWidth, srcHeight);
//package.ignore = Coordinate(nDIView.rectsInvalid, srcWidth, srcHeight);
//if (rectStart.Width == 0 && rectStart.Height == 0)
//{
// package.startPlace = null;
//}
//else
//{
// package.startPlace = Coordinate(rectStart, renderInfo, srcWidth, srcHeight);
//}
//if (rectEnd.Width==0&&rectEnd.Height==0)
//{
// package.endPlace = null;
//}
//else
//{
// package.endPlace = Coordinate(rectEnd, renderInfo, srcWidth, srcHeight);
//}
//if (rectInvalid.Width == 0 && rectInvalid.Height == 0)
//{
// package.invalidPlace = null;
//}
//else
//{
// package.invalidPlace = Coordinate(rectInvalid, renderInfo, srcWidth, srcHeight);
//}
manager.SendJson(package);
//MessageBoxEx.ShowDialog("发送成功 IP = " + manager.IP + " Port =" + manager.Port);
WPFHelper.BeginInvoke(() =>
{
MessageBoxEx.ShowDialog("发送成功");
......@@ -1023,80 +859,24 @@ namespace VIZ.FGOUT.Module
private SetManualConfig manualConfig;
private void SavePlace(SavePlaceModel savePlaceModel)
{
if (this.ViewKey != NDIViewKeys.CAM_1)
return;
if (this.ViewKey != NDIViewKeys.CAM_1) return;
//this.setPlaceConfig = ApplicationDomainEx.LiteDbContext.SetPlaceConfig.FindAll().FirstOrDefault();
//this.setPlaceNewConfig = ApplicationDomainEx.LiteDbContext.SetPlaceNewConfig.FindAll().FirstOrDefault();
this.setPlaceNewConfig = ApplicationDomainEx.LiteDbContext.SetPlaceNewConfig.FindOne(p => p.SportCode == this.viewConfig.GameName);
if (setPlaceNewConfig == null)
setPlaceNewConfig = new SetPlaceNewConfig();
NDIView nDIView = this.GetView<NDIView>();
// List<double> startPlace = new List<double>() { nDIView.rectStart.X, nDIView.rectStart.Y, nDIView.rectStart.Width, nDIView.rectStart.Height };
//List<double> endPlace = new List<double>() { nDIView.rectEnd.X, nDIView.rectEnd.Y, nDIView.rectEnd.Width, nDIView.rectEnd.Height };
//List<double> invalid = new List<double>() { nDIView.rectInvalid.X, nDIView.rectInvalid.Y, nDIView.rectInvalid.Width, nDIView.rectInvalid.Height };
//setPlaceConfig.StartPlace = startPlace;
//setPlaceConfig.EndPlace = endPlace;
//setPlaceConfig.InvlidPlace = invalid;
setPlaceNewConfig.SportCode = viewConfig.GameName;
setPlaceNewConfig.StartPlace = nDIView.polygonsStart;
setPlaceNewConfig.EndPlace = nDIView.polygonsEnd;
setPlaceNewConfig.InvlidPlace = nDIView.polygonsInvalid;
// setPlaceNewConfig.InvlidPlace = nDIView.rectsInvalid;
//ApplicationDomainEx.LiteDbContext.SetPlaceConfig.Upsert(setPlaceConfig);
ApplicationDomainEx.LiteDbContext.SetPlaceNewConfig.Upsert(setPlaceNewConfig);
//在保存位置的时候保存是否手动和是否抠图我是不理解的,所以先给他注释掉
//this.manualConfig = ApplicationDomainEx.LiteDbContext.SetManualConfig.FindAll().FirstOrDefault();
//if (this.manualConfig == null)
// this.manualConfig = new SetManualConfig();
//this.manualConfig.IsManual = savePlaceModel.IsManual;
//this.manualConfig.IsStartMat = savePlaceModel.IsStartMat;
//ApplicationDomainEx.LiteDbContext.SetManualConfig.Upsert(this.manualConfig);
WPFHelper.BeginInvoke(() => { MessageBoxEx.ShowDialog("保存成功"); });
}
#region 注释的代码
//private List<List<int>> Coordinate(Rect rect, VideoRenderInfo renderInfo, double srcWidth, double srcHeight)
//{
// // 视频的宽度
// int resWith = ApplicationDomainEx.IniStorage.GetValue<VideoConfig, int>(p => p.VIDEO_WIDTH);
// // 视频的高度
// int resHeight = ApplicationDomainEx.IniStorage.GetValue<VideoConfig, int>(p => p.VIDEO_HEIGHT);
// //int resHeight= ApplicationDomainEx.IniStorage.GetValue<ResConfig, int>(p => p.RES_HIEGHT);
// double xp = srcWidth / resWith;
// double xy = srcHeight / resHeight;
// int dx = Convert.ToInt32(rect.X / xp);
// int dy = Convert.ToInt32(rect.Y / xy);
// int width = Convert.ToInt32(rect.Width / xp);
// int height = Convert.ToInt32(rect.Height / xy);
// int x2 = dx + width;
// int y2 = dy;
// int x3 = dx + width;
// int y3 = dy + height;
// int x4 = dx;
// int y4 = dy + height;
// List<List<int>> coordinates = new List<List<int>>() { new List<int>() { dx, dy }, new List<int>() { x2, y2 }, new List<int>() { x3, y3 }, new List<int>() { x4, y4 } };
// return coordinates;
//}
#endregion
/// <summary>
/// 初始化属性
/// </summary>
......@@ -1379,8 +1159,6 @@ namespace VIZ.FGOUT.Module
var setPlaceNewConfig = ApplicationDomainEx.LiteDbContext.SetPlaceNewConfig.FindOne(p =>
p.SportCode == this.viewConfig.GameName);
if (setPlaceNewConfig == null) return;
////如果结束位置的count为0,则不加载位置标记
//if (setPlaceNewConfig.EndPlace.Count == 0) return;
NDIView view = this.GetView<NDIView>();
if (view == null) return;
......@@ -1396,13 +1174,6 @@ namespace VIZ.FGOUT.Module
//在自动模式下显示开始、结束位置
if (this.manualConfig != null && !this.manualConfig.IsManual)
{
//NDIView view = this.GetView<NDIView>();
//if (view == null) return;
//WPFHelper.Invoke(() =>
//{
// try
// {
if (setPlaceNewConfig.StartPlace.Count > 0)
{
view.polygonsStart = setPlaceNewConfig.StartPlace;
......@@ -1415,21 +1186,6 @@ namespace VIZ.FGOUT.Module
foreach (var points in setPlaceNewConfig.EndPlace)
AddPoints(view, points, Brushes.Green);
}
//if (setPlaceNewConfig.InvlidPlace.Count > 0)
//{
// //view.rectsInvalid = setPlaceNewConfig.InvlidPlace;
// view.polygonsInvalid = setPlaceNewConfig.InvlidPlace;
// foreach (var points in setPlaceNewConfig.InvlidPlace)
// AddPoints(view, points, Brushes.Red);
// //AddRects(view, points, Brushes.Red);
//}
// }
// catch (Exception ex)
// {
// log.Error(ex);
// }
//});
}
}
......@@ -1766,11 +1522,6 @@ namespace VIZ.FGOUT.Module
public void NDIViewHotkeyMode(NDIViewHotkeyContext context)
{
//if (context.hotkey.Equals(NDIViewHotkeys.I))
// StartTime = ReplayTimeStamp;
//if (context.hotkey.Equals(NDIViewHotkeys.O))
// EndTime = ReplayTimeStamp;
//新增手动模式下S、D快捷键
if (context.hotkey.Equals(NDIViewHotkeys.I) || context.hotkey.Equals(NDIViewHotkeys.S))
IsSliderStartClicked = true;
......
......@@ -428,10 +428,11 @@
VerticalAlignment="Center"
CacheMode="BitmapCache"
FocusVisualStyle="{x:Null}"
IsSelectionRangeEnabled="True" PreviewMouseUp="SL_Bat1_OnPreviewMouseUp"
IsSelectionRangeEnabled="True"
IsSnapToTickEnabled="True"
Maximum="{Binding ElementName=UC_Arrange, Path=Maximum}"
Minimum="{Binding ElementName=UC_Arrange, Path=Minimum}"
PreviewMouseUp="SL_Bat1_OnPreviewMouseUp"
SelectionEnd="{Binding ElementName=UC_Arrange, Path=EndValue}"
SelectionStart="{Binding ElementName=UC_Arrange, Path=StartValue}"
Style="{DynamicResource SliderStyle1}"
......
#pragma checksum "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "92CF01C8D1D0F6848BFA9FFB44D3C7C2403632E228021B49AD2D32C9D10449F4"
#pragma checksum "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "DF8F2E79D23947B44BD9000227F1F5DCF5F472D806DDA5CFF0D9C2107E91B291"
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
......@@ -50,7 +50,7 @@ namespace VIZ.FGOUT.Module {
public partial class NDIMainView : System.Windows.Controls.UserControl, System.Windows.Markup.IComponentConnector {
#line 57 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
#line 58 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.TextBox tbFocus;
......@@ -58,7 +58,7 @@ namespace VIZ.FGOUT.Module {
#line hidden
#line 259 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
#line 264 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.RadioButton _AutoMode_;
......@@ -66,7 +66,7 @@ namespace VIZ.FGOUT.Module {
#line hidden
#line 321 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
#line 326 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.RadioButton _ManualMode_;
......@@ -74,7 +74,7 @@ namespace VIZ.FGOUT.Module {
#line hidden
#line 813 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
#line 818 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.TextBox _AutoSendIntervalTime_;
......@@ -82,7 +82,7 @@ namespace VIZ.FGOUT.Module {
#line hidden
#line 959 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
#line 965 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.TextBox _Matting_interval_;
......@@ -90,7 +90,7 @@ namespace VIZ.FGOUT.Module {
#line hidden
#line 988 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
#line 994 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.TextBox _Moving_pixel_;
......@@ -98,7 +98,15 @@ namespace VIZ.FGOUT.Module {
#line hidden
#line 1399 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
#line 1023 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.TextBox _Remove_out_point_pixel_;
#line default
#line hidden
#line 1435 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal VIZ.FGOUT.Module.NDIView cam1;
......@@ -106,7 +114,7 @@ namespace VIZ.FGOUT.Module {
#line hidden
#line 1584 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
#line 1620 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal VIZ.FGOUT.Module.NDIView cam2;
......@@ -114,7 +122,7 @@ namespace VIZ.FGOUT.Module {
#line hidden
#line 1599 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
#line 1635 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal VIZ.FGOUT.Module.NDIView cam3;
......@@ -164,7 +172,7 @@ namespace VIZ.FGOUT.Module {
case 2:
this._AutoMode_ = ((System.Windows.Controls.RadioButton)(target));
#line 264 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
#line 269 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
this._AutoMode_.Click += new System.Windows.RoutedEventHandler(this.AutoMode_OnClick);
#line default
......@@ -173,7 +181,7 @@ namespace VIZ.FGOUT.Module {
case 3:
this._ManualMode_ = ((System.Windows.Controls.RadioButton)(target));
#line 325 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
#line 330 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
this._ManualMode_.Click += new System.Windows.RoutedEventHandler(this.ManualMode_OnClick);
#line default
......@@ -182,7 +190,7 @@ namespace VIZ.FGOUT.Module {
case 4:
this._AutoSendIntervalTime_ = ((System.Windows.Controls.TextBox)(target));
#line 819 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
#line 824 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
this._AutoSendIntervalTime_.PreviewTextInput += new System.Windows.Input.TextCompositionEventHandler(this.AutoSendIntervalTime_OnPreviewTextInput);
#line default
......@@ -191,7 +199,7 @@ namespace VIZ.FGOUT.Module {
case 5:
this._Matting_interval_ = ((System.Windows.Controls.TextBox)(target));
#line 962 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
#line 968 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
this._Matting_interval_.PreviewTextInput += new System.Windows.Input.TextCompositionEventHandler(this.Matting_interval_OnPreviewTextInput);
#line default
......@@ -200,19 +208,28 @@ namespace VIZ.FGOUT.Module {
case 6:
this._Moving_pixel_ = ((System.Windows.Controls.TextBox)(target));
#line 991 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
#line 997 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
this._Moving_pixel_.PreviewTextInput += new System.Windows.Input.TextCompositionEventHandler(this.Moving_pixel_OnPreviewTextInput);
#line default
#line hidden
return;
case 7:
this.cam1 = ((VIZ.FGOUT.Module.NDIView)(target));
this._Remove_out_point_pixel_ = ((System.Windows.Controls.TextBox)(target));
#line 1026 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
this._Remove_out_point_pixel_.PreviewTextInput += new System.Windows.Input.TextCompositionEventHandler(this.Moving_pixel_OnPreviewTextInput);
#line default
#line hidden
return;
case 8:
this.cam2 = ((VIZ.FGOUT.Module.NDIView)(target));
this.cam1 = ((VIZ.FGOUT.Module.NDIView)(target));
return;
case 9:
this.cam2 = ((VIZ.FGOUT.Module.NDIView)(target));
return;
case 10:
this.cam3 = ((VIZ.FGOUT.Module.NDIView)(target));
return;
}
......
#pragma checksum "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "92CF01C8D1D0F6848BFA9FFB44D3C7C2403632E228021B49AD2D32C9D10449F4"
#pragma checksum "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "DF8F2E79D23947B44BD9000227F1F5DCF5F472D806DDA5CFF0D9C2107E91B291"
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
......@@ -50,7 +50,7 @@ namespace VIZ.FGOUT.Module {
public partial class NDIMainView : System.Windows.Controls.UserControl, System.Windows.Markup.IComponentConnector {
#line 57 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
#line 58 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.TextBox tbFocus;
......@@ -58,7 +58,7 @@ namespace VIZ.FGOUT.Module {
#line hidden
#line 259 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
#line 264 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.RadioButton _AutoMode_;
......@@ -66,7 +66,7 @@ namespace VIZ.FGOUT.Module {
#line hidden
#line 321 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
#line 326 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.RadioButton _ManualMode_;
......@@ -74,7 +74,7 @@ namespace VIZ.FGOUT.Module {
#line hidden
#line 813 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
#line 818 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.TextBox _AutoSendIntervalTime_;
......@@ -82,7 +82,7 @@ namespace VIZ.FGOUT.Module {
#line hidden
#line 959 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
#line 965 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.TextBox _Matting_interval_;
......@@ -90,7 +90,7 @@ namespace VIZ.FGOUT.Module {
#line hidden
#line 988 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
#line 994 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.TextBox _Moving_pixel_;
......@@ -98,7 +98,15 @@ namespace VIZ.FGOUT.Module {
#line hidden
#line 1399 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
#line 1023 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.TextBox _Remove_out_point_pixel_;
#line default
#line hidden
#line 1435 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal VIZ.FGOUT.Module.NDIView cam1;
......@@ -106,7 +114,7 @@ namespace VIZ.FGOUT.Module {
#line hidden
#line 1584 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
#line 1620 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal VIZ.FGOUT.Module.NDIView cam2;
......@@ -114,7 +122,7 @@ namespace VIZ.FGOUT.Module {
#line hidden
#line 1599 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
#line 1635 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal VIZ.FGOUT.Module.NDIView cam3;
......@@ -164,7 +172,7 @@ namespace VIZ.FGOUT.Module {
case 2:
this._AutoMode_ = ((System.Windows.Controls.RadioButton)(target));
#line 264 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
#line 269 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
this._AutoMode_.Click += new System.Windows.RoutedEventHandler(this.AutoMode_OnClick);
#line default
......@@ -173,7 +181,7 @@ namespace VIZ.FGOUT.Module {
case 3:
this._ManualMode_ = ((System.Windows.Controls.RadioButton)(target));
#line 325 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
#line 330 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
this._ManualMode_.Click += new System.Windows.RoutedEventHandler(this.ManualMode_OnClick);
#line default
......@@ -182,7 +190,7 @@ namespace VIZ.FGOUT.Module {
case 4:
this._AutoSendIntervalTime_ = ((System.Windows.Controls.TextBox)(target));
#line 819 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
#line 824 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
this._AutoSendIntervalTime_.PreviewTextInput += new System.Windows.Input.TextCompositionEventHandler(this.AutoSendIntervalTime_OnPreviewTextInput);
#line default
......@@ -191,7 +199,7 @@ namespace VIZ.FGOUT.Module {
case 5:
this._Matting_interval_ = ((System.Windows.Controls.TextBox)(target));
#line 962 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
#line 968 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
this._Matting_interval_.PreviewTextInput += new System.Windows.Input.TextCompositionEventHandler(this.Matting_interval_OnPreviewTextInput);
#line default
......@@ -200,19 +208,28 @@ namespace VIZ.FGOUT.Module {
case 6:
this._Moving_pixel_ = ((System.Windows.Controls.TextBox)(target));
#line 991 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
#line 997 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
this._Moving_pixel_.PreviewTextInput += new System.Windows.Input.TextCompositionEventHandler(this.Moving_pixel_OnPreviewTextInput);
#line default
#line hidden
return;
case 7:
this.cam1 = ((VIZ.FGOUT.Module.NDIView)(target));
this._Remove_out_point_pixel_ = ((System.Windows.Controls.TextBox)(target));
#line 1026 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
this._Remove_out_point_pixel_.PreviewTextInput += new System.Windows.Input.TextCompositionEventHandler(this.Moving_pixel_OnPreviewTextInput);
#line default
#line hidden
return;
case 8:
this.cam2 = ((VIZ.FGOUT.Module.NDIView)(target));
this.cam1 = ((VIZ.FGOUT.Module.NDIView)(target));
return;
case 9:
this.cam2 = ((VIZ.FGOUT.Module.NDIView)(target));
return;
case 10:
this.cam3 = ((VIZ.FGOUT.Module.NDIView)(target));
return;
}
......
......@@ -10,11 +10,11 @@ none
false
DEBUG;TRACE
25-1434354873
4-699044453
98-1634640143
151674092382
25-429057470
4-1529606353
98391250289
151915249285
NDIMainView\View\NDIMainView.xaml;NDIPreviewView\View\NDIPreviewView.xaml;NDISettingView\View\AlgorithmSettingPanelView.xaml;NDISettingView\View\Algorithm\AlgorithmCablewayPanelView.xaml;NDISettingView\View\Algorithm\AlgorithmNearPanelView.xaml;NDISettingView\View\Algorithm\AlgorithmSinglePanelView.xaml;NDISettingView\View\Algorithm\AlgorithmSixteenPanelView.xaml;NDISettingView\View\Algorithm\AlgorithmTacticsPanelView.xaml;NDISettingView\View\NDISettingPanelView.xaml;NDISettingView\View\NDISettingView.xaml;NDIView\View\NDIView.xaml;SystemSetting\View\AboutPanelView.xaml;SystemSetting\View\CheckDataPanelView.xaml;SystemSetting\View\HotkeySettingPanelView.xaml;SystemSetting\View\LanguagePanelView.xaml;SystemSetting\View\MattingImagePanelView.xaml;SystemSetting\View\NewWindowView.xaml;SystemSetting\View\PackageSettingPanelView.xaml;SystemSetting\View\PreviewSettingPanelView.xaml;SystemSetting\View\ReplayPanelView.xaml;SystemSetting\View\StyleSettingPanelView.xaml;SystemSetting\View\SystemSettingView.xaml;SystemSetting\View\UEControlPanelView.xaml;SystemSetting\View\UESettingPanelView.xaml;Themes\SliderArrange.xaml;
False
True

C:\Projects\FGOUT\VIZ.FGOUT\VIZ.FGOUT.Module\obj\x64\Debug\GeneratedInternalTypeHelper.g.cs
FC:\Projects\FGOUT\VIZ.FGOUT\VIZ.FGOUT.Module\NDIMainView\View\NDIMainView.xaml;;
FC:\Projects\FGOUT\VIZ.FGOUT\VIZ.FGOUT.Module\NDIPreviewView\View\NDIPreviewView.xaml;;
......
......@@ -55,5 +55,5 @@ using System.Windows;
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.10.0")]
[assembly: AssemblyFileVersion("1.0.10.0")]
[assembly: AssemblyVersion("1.0.11.0")]
[assembly: AssemblyFileVersion("1.0.11.0")]
......@@ -10,11 +10,11 @@ none
false
DEBUG;TRACE
C:\Projects\FGOUT\VIZ.FGOUT\VIZ.FGOUT\App.xaml
2-1347366880
21265083526
6968741766
43-1958993781
6-790135758
421356718200
CloseAlgorithmWindow.xaml;MainWindow.xaml;
False
True
......@@ -10,10 +10,10 @@ none
false
DEBUG;TRACE
91711917753
9-721875057
3-1719726047
201914760168
3-630027162
19-1136530284
Path\ArrowPathResource.xaml;Style\Button\Button_MessageBox.xaml;Style\Button\Button_Normal.xaml;Style\Button\Button_WindowTop.xaml;Style\GridSplitter\GridSplitter_None.xaml;Style\ListBox\ListBox_None.xaml;Style\ScrollView\ScrollView_Default.xaml;Style\TextBox\TextBox_None.xaml;Themes\Generic.xaml;
False
......

//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
namespace XamlGeneratedNamespace {
/// <summary>
/// GeneratedInternalTypeHelper
/// </summary>
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
public sealed class GeneratedInternalTypeHelper : System.Windows.Markup.InternalTypeHelper {
/// <summary>
/// CreateInstance
/// </summary>
protected override object CreateInstance(System.Type type, System.Globalization.CultureInfo culture) {
return System.Activator.CreateInstance(type, ((System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.NonPublic)
| (System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.CreateInstance)), null, null, culture);
}
/// <summary>
/// GetPropertyValue
/// </summary>
protected override object GetPropertyValue(System.Reflection.PropertyInfo propertyInfo, object target, System.Globalization.CultureInfo culture) {
return propertyInfo.GetValue(target, System.Reflection.BindingFlags.Default, null, null, culture);
}
/// <summary>
/// SetPropertyValue
/// </summary>
protected override void SetPropertyValue(System.Reflection.PropertyInfo propertyInfo, object target, object value, System.Globalization.CultureInfo culture) {
propertyInfo.SetValue(target, value, System.Reflection.BindingFlags.Default, null, null, culture);
}
/// <summary>
/// CreateDelegate
/// </summary>
protected override System.Delegate CreateDelegate(System.Type delegateType, object target, string handler) {
return ((System.Delegate)(target.GetType().InvokeMember("_CreateDelegate", (System.Reflection.BindingFlags.InvokeMethod
| (System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance)), null, target, new object[] {
delegateType,
handler}, null)));
}
/// <summary>
/// AddEventHandler
/// </summary>
protected override void AddEventHandler(System.Reflection.EventInfo eventInfo, object target, System.Delegate handler) {
eventInfo.AddEventHandler(target, handler);
}
}
}
......@@ -10,11 +10,11 @@ none
false
DEBUG;TRACE
15488264905
15-721109437
1212046750213
150843184444
121-1133520871
150238613261
MessageBox\MessageBoxEx.xaml;MessageBox\MessageBoxExWindow.xaml;Themes\Generic.xaml;VideoControl\Control\VideoControl.xaml;Widgets\ColorPickButton\ColorPickButton.xaml;Widgets\ColorPickButton\ColorPickWindow.xaml;Widgets\GPIOPinTestControl\GPIOPinTestControl.xaml;Widgets\HotkeyBox\HotkeyBox.xaml;Widgets\IconButton\IconButton.xaml;Widgets\LabelValue\LabelValue.xaml;Widgets\NavigationControl\NavigationControl.xaml;Widgets\ResizeImageControl\ResizeImageControl.xaml;Widgets\ShowMessageControl\ShowMessageControl.xaml;Widgets\VideoTimeBar\VideoTimeBar.xaml;Widgets\ViewLoader\ViewLoader.xaml;
False
True
......@@ -10,11 +10,11 @@ none
false
DEBUG;TRACE
11882902973
1-731644535
212023628146
26-1598261527
212002329545
25439653939
Themes\Generic.xaml;
False
True
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