Commit 413872d1 by 鲁志-悦动

落盘又改回由客户端向音视频发指令 And 每个体育项目对应一份开始、结束、无效位置坐标在本地 And…

落盘又改回由客户端向音视频发指令 And 每个体育项目对应一份开始、结束、无效位置坐标在本地 And 修复手动检测选中选择目标,点击小手图标发送的消息由于之前改启动客户端收到check_ok发给算法auto时改出来的缺陷 And 检测模式下在没有HitTrackingBoxInfo的时候也发送坐标 And 按使用习惯,保存和发送命令按钮位置调换
parent 7da6f244
using System.Collections.Generic; using System.Collections.Generic;
using System.Diagnostics.SymbolStore;
using VIZ.FGOUT.Storage; using VIZ.FGOUT.Storage;
using VIZ.Framework.Connection; using VIZ.Framework.Connection;
...@@ -89,7 +90,7 @@ namespace VIZ.FGOUT.Connection ...@@ -89,7 +90,7 @@ namespace VIZ.FGOUT.Connection
manager.SendJson(package); manager.SendJson(package);
} }
public static void AutoMode(UdpEndpointManager manager, AlgorithmPackage_Figout_model package, AlgorithmSenderOption option) public static void AutoMode(UdpEndpointManager manager, AlgorithmPackage_Figout_model package, AlgorithmSenderOption option, bool isAutoMode = true)
{ {
package.id = option.id; package.id = option.id;
...@@ -97,10 +98,12 @@ namespace VIZ.FGOUT.Connection ...@@ -97,10 +98,12 @@ namespace VIZ.FGOUT.Connection
//package.track_xy = option.target_bbox; //package.track_xy = option.target_bbox;
//package.signal = AlgorithmPackageSignal.track; //package.signal = AlgorithmPackageSignal.track;
//手动模式
//package.mode = AlgorithmPackageSignal.manual_mode;
//自动模式 //自动模式
package.mode = AlgorithmPackageSignal.auto_mode; package.mode = AlgorithmPackageSignal.auto_mode;
//手动模式
if(isAutoMode == false)
package.mode = AlgorithmPackageSignal.manual_mode;
package.timecode = option.timecode; package.timecode = option.timecode;
manager.SendJson(package); manager.SendJson(package);
} }
......
...@@ -5,26 +5,26 @@ ...@@ -5,26 +5,26 @@
/// <summary> /// <summary>
/// 类型 /// 类型
/// </summary> /// </summary>
public string Type { get;set; } public string type { get;set; }
/// <summary> /// <summary>
/// 开始时间戳 /// 开始时间戳
/// </summary> /// </summary>
//public long start_time { get; set; } public long start_time { get; set; }
/// <summary> /// <summary>
/// 结束时间戳 /// 结束时间戳
/// </summary> /// </summary>
//public long end_time { get; set;} public long end_time { get; set; }
/// <summary> /// <summary>
/// 项目编码 /// 项目编码
/// </summary> /// </summary>
public string SportsCode { get; set; } //public string SportsCode { get; set; }
/// <summary> /// <summary>
/// 是否落盘 /// 是否落盘
/// </summary> /// </summary>
public bool RecordResult { get; set; } //public bool RecordResult { get; set; }
} }
} }
...@@ -375,8 +375,8 @@ ...@@ -375,8 +375,8 @@
Width="100" Width="100"
Height="40" Height="40"
Margin="10" Margin="10"
Command="{Binding Path=SendPlaceCommand}" Command="{Binding Path=SavePalceCommand}"
Content="发送命令" Content="保存"
Style="{StaticResource ButtonStyle}" /> Style="{StaticResource ButtonStyle}" />
<Button <Button
...@@ -385,8 +385,8 @@ ...@@ -385,8 +385,8 @@
Width="100" Width="100"
Height="40" Height="40"
Margin="10" Margin="10"
Command="{Binding Path=SavePalceCommand}" Command="{Binding Path=SendPlaceCommand}"
Content="保存" Content="发送命令"
Style="{StaticResource ButtonStyle}" /> Style="{StaticResource ButtonStyle}" />
<!--<Button Content="UE设置" Grid.Row="2" Grid.Column="2" Margin="10" Style="{StaticResource ButtonStyle}" Command="{Binding Path=UESettingCommand}" Height="40"/>--> <!--<Button Content="UE设置" Grid.Row="2" Grid.Column="2" Margin="10" Style="{StaticResource ButtonStyle}" Command="{Binding Path=UESettingCommand}" Height="40"/>-->
......
...@@ -803,25 +803,30 @@ namespace VIZ.FGOUT.Module ...@@ -803,25 +803,30 @@ namespace VIZ.FGOUT.Module
/// </summary> /// </summary>
private void MatImageCommand() private void MatImageCommand()
{ {
//if (IsMatImage) if (IsMatImage)
//{ {
//var config = ApplicationDomainEx.LiteDbContext.AlgorithmSaveMatImage.FindAll().FirstOrDefault(); var config = ApplicationDomainEx.LiteDbContext.AlgorithmSaveMatImage.FindAll().FirstOrDefault();
if (config == null)
return;
SaveMatImagePackage package = new SaveMatImagePackage(); SaveMatImagePackage package = new SaveMatImagePackage();
package.Type = "LOADMASK"; package.type = "LOADMASK";
//package.start_time = config.start; package.start_time = config.start;
//package.end_time = config.end; package.end_time = config.end;
//// 发送UDP命令给音视频 // 发送UDP命令给音视频
//UdpEndpointManager manager = ConnectionManager.UdpConnection.GetEndpointManager(NDIViewKeys.CAM_1__CLIP); UdpEndpointManager manager = ConnectionManager.UdpConnection.GetEndpointManager(NDIViewKeys.CAM_1__CLIP);
var ndiViewConfig = //var ndiViewConfig =
ApplicationDomainEx.LiteDbContext.ViewConfig.FindOne(p => p.ViewKey == NDIViewKeys.CAM_1); // ApplicationDomainEx.LiteDbContext.ViewConfig.FindOne(p => p.ViewKey == NDIViewKeys.CAM_1);
package.SportsCode = ndiViewConfig.GameName; //package.SportsCode = ndiViewConfig.GameName;
package.RecordResult = IsMatImage; //package.RecordResult = IsMatImage;
// 发送UDP命令给算法 //// 发送UDP命令给算法
UdpEndpointManager manager = ConnectionManager.UdpConnection.GetEndpointManager(NDIViewKeys.CAM_1); //UdpEndpointManager manager = ConnectionManager.UdpConnection.GetEndpointManager(NDIViewKeys.CAM_1);
if (manager == null) return; if (manager == null) return;
manager.SendJson(package); manager.SendJson(package);
//}
}
//ReplayPackage replayPackage = new ReplayPackage(); //ReplayPackage replayPackage = new ReplayPackage();
// data.loadFlag = 1; // data.loadFlag = 1;
......
...@@ -61,7 +61,14 @@ namespace VIZ.FGOUT.Module ...@@ -61,7 +61,14 @@ namespace VIZ.FGOUT.Module
public override void CheckOk() public override void CheckOk()
{ {
this.Detect(); //this.Detect();
UdpEndpointManager manager = ConnectionManager.UdpConnection.GetEndpointManager(NDIViewKeys.CAM_1);
//算法重启后,向算法发送保存在数据库的相关体育项目的算法数据
var ndiViewConfig =
ApplicationDomainEx.LiteDbContext.ViewConfig.FindOne(p => p.ViewKey == NDIViewKeys.CAM_1);
var config = ApplicationDomainEx.LiteDbContext.JavelinThrowConfig.FindOne(p => p.Number == ndiViewConfig.GameName);
AlgorithmSender.AutoMode(manager, config.AlgorithmData);
} }
public override void Detect() public override void Detect()
...@@ -70,15 +77,9 @@ namespace VIZ.FGOUT.Module ...@@ -70,15 +77,9 @@ namespace VIZ.FGOUT.Module
this.Support.ViewStatus= NDIViewStatus.Detect; this.Support.ViewStatus= NDIViewStatus.Detect;
UdpEndpointManager manager = ConnectionManager.UdpConnection.GetEndpointManager(NDIViewKeys.CAM_1); UdpEndpointManager manager = ConnectionManager.UdpConnection.GetEndpointManager(NDIViewKeys.CAM_1);
//AlgorithmSenderOption option = new AlgorithmSenderOption(); AlgorithmSenderOption option = new AlgorithmSenderOption();
//option.id = this.Support.ID; option.id = this.Support.ID;
//AlgorithmSender.AutoMode(manager, this.bulidPackage(AlgorithmAutoModeCmd.detect, null), option); AlgorithmSender.AutoMode(manager, this.bulidPackage(AlgorithmAutoModeCmd.detect, null), option, false);
//算法重启后,向算法发送保存在数据库的相关体育项目的算法数据
var ndiViewConfig =
ApplicationDomainEx.LiteDbContext.ViewConfig.FindOne(p => p.ViewKey == NDIViewKeys.CAM_1);
var config = ApplicationDomainEx.LiteDbContext.JavelinThrowConfig.FindOne(p => p.Number == ndiViewConfig.GameName);
AlgorithmSender.AutoMode(manager, config.AlgorithmData);
} }
/// <summary> /// <summary>
......
...@@ -174,8 +174,9 @@ namespace VIZ.FGOUT.Module ...@@ -174,8 +174,9 @@ namespace VIZ.FGOUT.Module
/// </summary> /// </summary>
private void TrackingBoxPlugin_TrackingBoxClick(object sender, TrackingBoxClickEventArgs e) private void TrackingBoxPlugin_TrackingBoxClick(object sender, TrackingBoxClickEventArgs e)
{ {
if (e.HitTrackingBoxInfo == null) //在没有HitTrackingBoxInfo信息的时候也发送坐标
return; //if (e.HitTrackingBoxInfo == null)
// return;
this.AlgorithmControllerDic[this.StrategyType].Tracking(e.VideoPointCenter); this.AlgorithmControllerDic[this.StrategyType].Tracking(e.VideoPointCenter);
} }
......
...@@ -15,7 +15,6 @@ namespace VIZ.FGOUT.Module ...@@ -15,7 +15,6 @@ namespace VIZ.FGOUT.Module
/// </summary> /// </summary>
public partial class NDIViewModel public partial class NDIViewModel
{ {
private void OnAlgorithmMessage__start_end(AlgorithmMessage__start_end msg) private void OnAlgorithmMessage__start_end(AlgorithmMessage__start_end msg)
{ {
var config = ApplicationDomainEx.LiteDbContext.AlgorithmSaveMatImage.FindAll().FirstOrDefault(); var config = ApplicationDomainEx.LiteDbContext.AlgorithmSaveMatImage.FindAll().FirstOrDefault();
......
...@@ -119,24 +119,32 @@ namespace VIZ.FGOUT.Module ...@@ -119,24 +119,32 @@ namespace VIZ.FGOUT.Module
{ {
// 算法初始化完成消息 // 算法初始化完成消息
ApplicationDomainEx.MessageManager.Register<AlgorithmMessage__checked_ok>(this, this.OnAlgorithmMessage__checked_ok); ApplicationDomainEx.MessageManager.Register<AlgorithmMessage__checked_ok>(this, this.OnAlgorithmMessage__checked_ok);
// 算法跟踪消息--检测 // 算法跟踪消息--检测
ApplicationDomainEx.MessageManager.Register<AlgorithmMessage__detect>(this, this.OnAlgorithmMessage__detect); ApplicationDomainEx.MessageManager.Register<AlgorithmMessage__detect>(this, this.OnAlgorithmMessage__detect);
// 算法跟踪消息--裁切 // 算法跟踪消息--裁切
ApplicationDomainEx.MessageManager.Register<AlgorithmMessage__crop_roi>(this, this.OnAlgorithmMessage__crop_roi); ApplicationDomainEx.MessageManager.Register<AlgorithmMessage__crop_roi>(this, this.OnAlgorithmMessage__crop_roi);
// 算法落盘开始、结束时间戳消息 // 算法落盘开始、结束时间戳消息
//ApplicationDomainEx.MessageManager.Register<AlgorithmMessage__start_end>(this, this.OnAlgorithmMessage__start_end); ApplicationDomainEx.MessageManager.Register<AlgorithmMessage__start_end>(this, this.OnAlgorithmMessage__start_end);
NDIView nDIView = this.GetView<NDIView>(); NDIView nDIView = this.GetView<NDIView>();
// 开始的位置 // 开始的位置
ApplicationDomainEx.MessageManager.Register<StartPlaceModel>(this, this.StartPlace); ApplicationDomainEx.MessageManager.Register<StartPlaceModel>(this, this.StartPlace);
// 结束位置的 // 结束位置的
ApplicationDomainEx.MessageManager.Register<EndPlaceModel>(this, this.EndPlace); ApplicationDomainEx.MessageManager.Register<EndPlaceModel>(this, this.EndPlace);
// 无效区域的注册 // 无效区域的注册
ApplicationDomainEx.MessageManager.Register<InvalidPlaceModel>(this, this.InvalidPlaceModel); ApplicationDomainEx.MessageManager.Register<InvalidPlaceModel>(this, this.InvalidPlaceModel);
// 清除位置 // 清除位置
ApplicationDomainEx.MessageManager.Register<CleanPlaceModel>(this, this.CleanPlace); ApplicationDomainEx.MessageManager.Register<CleanPlaceModel>(this, this.CleanPlace);
// 算法发送命令 // 算法发送命令
ApplicationDomainEx.MessageManager.Register<SendPlaceModel>(this, this.SendPlace); ApplicationDomainEx.MessageManager.Register<SendPlaceModel>(this, this.SendPlace);
// 保存按钮发送命令 // 保存按钮发送命令
ApplicationDomainEx.MessageManager.Register<SavePlaceModel>(this, this.SavePlace); ApplicationDomainEx.MessageManager.Register<SavePlaceModel>(this, this.SavePlace);
...@@ -145,11 +153,13 @@ namespace VIZ.FGOUT.Module ...@@ -145,11 +153,13 @@ namespace VIZ.FGOUT.Module
//调用UESetting发送命令 //调用UESetting发送命令
ApplicationDomainEx.MessageManager.Register<UESettingModel>(this,this.UESetting); ApplicationDomainEx.MessageManager.Register<UESettingModel>(this,this.UESetting);
//调用UEControl发送命令 //调用UEControl发送命令
ApplicationDomainEx.MessageManager.Register<UEControlModel>(this, this.UEControl); ApplicationDomainEx.MessageManager.Register<UEControlModel>(this, this.UEControl);
//重启算法发送命令 //重启算法发送命令
ApplicationDomainEx.MessageManager.Register<RestartAlgorithmModel>(this, this.RestartAlgorithm); ApplicationDomainEx.MessageManager.Register<RestartAlgorithmModel>(this, this.RestartAlgorithm);
//关闭算法发送命令 //关闭算法发送命令
ApplicationDomainEx.MessageManager.Register<StopAlgorithmModel>(this, this.CloseAlgorithm); ApplicationDomainEx.MessageManager.Register<StopAlgorithmModel>(this, this.CloseAlgorithm);
} }
...@@ -404,7 +414,8 @@ namespace VIZ.FGOUT.Module ...@@ -404,7 +414,8 @@ namespace VIZ.FGOUT.Module
return; return;
//this.setPlaceConfig = ApplicationDomainEx.LiteDbContext.SetPlaceConfig.FindAll().FirstOrDefault(); //this.setPlaceConfig = ApplicationDomainEx.LiteDbContext.SetPlaceConfig.FindAll().FirstOrDefault();
this.setPlaceNewConfig = ApplicationDomainEx.LiteDbContext.SetPlaceNewConfig.FindAll().FirstOrDefault(); //this.setPlaceNewConfig = ApplicationDomainEx.LiteDbContext.SetPlaceNewConfig.FindAll().FirstOrDefault();
this.setPlaceNewConfig = ApplicationDomainEx.LiteDbContext.SetPlaceNewConfig.FindOne(p => p.SportCode == this.viewConfig.GameName);
if (setPlaceNewConfig == null) if (setPlaceNewConfig == null)
setPlaceNewConfig = new SetPlaceNewConfig(); setPlaceNewConfig = new SetPlaceNewConfig();
...@@ -420,6 +431,7 @@ namespace VIZ.FGOUT.Module ...@@ -420,6 +431,7 @@ namespace VIZ.FGOUT.Module
//setPlaceConfig.EndPlace = endPlace; //setPlaceConfig.EndPlace = endPlace;
//setPlaceConfig.InvlidPlace = invalid; //setPlaceConfig.InvlidPlace = invalid;
setPlaceNewConfig.SportCode = this.viewConfig.GameName;
setPlaceNewConfig.StartPlace = nDIView.polygonsStart; setPlaceNewConfig.StartPlace = nDIView.polygonsStart;
setPlaceNewConfig.EndPlace = nDIView.polygonsEnd; setPlaceNewConfig.EndPlace = nDIView.polygonsEnd;
//setPlaceNewConfig.InvlidPlace = nDIView.polygonsInvalid; //setPlaceNewConfig.InvlidPlace = nDIView.polygonsInvalid;
...@@ -680,7 +692,10 @@ namespace VIZ.FGOUT.Module ...@@ -680,7 +692,10 @@ namespace VIZ.FGOUT.Module
this.IsShowAlgorithmTargetBox = config.IsShowAlgorithmTargetBox; this.IsShowAlgorithmTargetBox = config.IsShowAlgorithmTargetBox;
//SetPlaceConfig setPlaceConfig = ApplicationDomainEx.LiteDbContext.SetPlaceConfig.FindAll().FirstOrDefault(); //SetPlaceConfig setPlaceConfig = ApplicationDomainEx.LiteDbContext.SetPlaceConfig.FindAll().FirstOrDefault();
SetPlaceNewConfig setPlaceNewConfig = ApplicationDomainEx.LiteDbContext.SetPlaceNewConfig.FindAll().FirstOrDefault(); //SetPlaceNewConfig setPlaceNewConfig = ApplicationDomainEx.LiteDbContext.SetPlaceNewConfig.FindAll().FirstOrDefault();
SetPlaceNewConfig setPlaceNewConfig =
ApplicationDomainEx.LiteDbContext.SetPlaceNewConfig.FindOne(p =>
p.SportCode == this.viewConfig.GameName);
//if (setPlaceConfig == null) return; //if (setPlaceConfig == null) return;
if (setPlaceNewConfig == null) return; if (setPlaceNewConfig == null) return;
......
#pragma checksum "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "4AE5D405ECDA6991E1C8C36C771B608532832E87D67F619AB963B418F4374738" #pragma checksum "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "8DF38DA67C14C333B3C04ED7B4E10F4CFC79EF5C2171AC26520812DD04450C6A"
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// 此代码由工具生成。 // 此代码由工具生成。
......
#pragma checksum "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "4AE5D405ECDA6991E1C8C36C771B608532832E87D67F619AB963B418F4374738" #pragma checksum "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "8DF38DA67C14C333B3C04ED7B4E10F4CFC79EF5C2171AC26520812DD04450C6A"
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// 此代码由工具生成。 // 此代码由工具生成。
......
...@@ -10,11 +10,11 @@ none ...@@ -10,11 +10,11 @@ none
false false
DEBUG;TRACE DEBUG;TRACE
22-1559853185 22-808211288
4-1529606353 4-699044453
90-1236168610 90-747441034
151915249285 151674092382
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\MattingImagePanelView.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; 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\MattingImagePanelView.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;
True False
 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\NDIMainView\View\NDIMainView.xaml;;
FC:\Projects\FGOUT\VIZ.FGOUT\VIZ.FGOUT.Module\NDIPreviewView\View\NDIPreviewView.xaml;; FC:\Projects\FGOUT\VIZ.FGOUT\VIZ.FGOUT.Module\NDIPreviewView\View\NDIPreviewView.xaml;;
......
...@@ -13,6 +13,11 @@ namespace VIZ.FGOUT.Storage ...@@ -13,6 +13,11 @@ namespace VIZ.FGOUT.Storage
public int Id { get; set; } public int Id { get; set; }
/// <summary> /// <summary>
/// 体育项目编码,分项目保存三个位置
/// </summary>
public string SportCode { get; set; }
/// <summary>
/// 开始位置 /// 开始位置
/// </summary> /// </summary>
public List<PointCollection> StartPlace { get; set; } = new List<PointCollection>(); public List<PointCollection> StartPlace { get; set; } = new List<PointCollection>();
......
This source diff could not be displayed because it is too large. You can view the blob instead.
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