Commit 32af1cbb by 鲁志-悦动

在手动模式绘制无效区域的时候,不给算法发送鼠标按下的坐标点 And 点击清除位置按钮加再次确认提示

parent 1acd09de
//------------------------------------------------------------------------------
// <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
2-725104376
21870986562
3947974750
17-1462717611
31364711570
17-1683084370
Themes\Generic.xaml;Widgets\FootballFieldPanel\FootballFieldPanel.xaml;
True
False

C:\Projects\FGOUT\VIZ.FGOUT\VIZ.FGOUT.Common\obj\x64\Debug\GeneratedInternalTypeHelper.g.cs
FC:\Projects\FGOUT\VIZ.FGOUT\VIZ.FGOUT.Common\Themes\Generic.xaml;;
FC:\Projects\FGOUT\VIZ.FGOUT\VIZ.FGOUT.Common\Widgets\FootballFieldPanel\FootballFieldPanel.xaml;;
......
......@@ -53,6 +53,17 @@ namespace VIZ.FGOUT.Connection
message.ignore_bboxes.Add(target);
}
}
if (package.roi_bbox != null && package.roi_bbox.Count > 0)
{
foreach (List<int> src in package.roi_bbox)
{
if (src == null || src.Count != 4)
continue;
RawRectangleF target = new RawRectangleF(src[0], src[1], src[2], src[3]);
message.roi_bbox.Add(target);
}
}
Signal = AlgorithmPackageSignal.detect;
}
else if (package.signal == "track")
......
......@@ -40,6 +40,8 @@ namespace VIZ.FGOUT.Connection
public List<List<int>> ignore_bboxes { get; set; }
public List<List<int>> roi_bbox { get; set; }
/// <summary>
/// 跟踪框的定义
/// </summary>
......
......@@ -15,6 +15,8 @@ namespace VIZ.FGOUT.Domain
public List<RawRectangleF> ignore_bboxes { get; set; } = new List<RawRectangleF>();
public List<RawRectangleF> roi_bbox { get; set; } = new List<RawRectangleF>();
/// <summary>
/// 裁切坐标
/// </summary>
......
using System.Collections.Generic;
using System;
using System.Collections.Generic;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
......@@ -339,15 +340,16 @@ namespace VIZ.FGOUT.Module
{
foreach (var info in NDIViewModel._cam3StaticInfos)
{
if (info.SrcRect.Left > 0 && info.SrcRect.Right > 0 && info.SrcRect.Top > 0 && info.SrcRect.Bottom > 0)
{
var difference = (startPoint.X - info.SrcRect.Left) + (info.SrcRect.Right - startPoint.X);
//if (info.SrcRect.Left > 0 && info.SrcRect.Right > 0 && info.SrcRect.Top > 0 && info.SrcRect.Bottom > 0)
//{
var difference = Math.Abs(startPoint.X - info.SrcRect.Left) + Math.Abs(info.SrcRect.Right - startPoint.X)
+ Math.Abs(startPoint.Y - info.SrcRect.Top) + Math.Abs(info.SrcRect.Bottom - startPoint.Y);
if (difference < minDistance)
{
saveInfo = info;
minDistance = difference;
}
}
//}
}
}
}
......
......@@ -178,6 +178,9 @@ namespace VIZ.FGOUT.Module
/// </summary>
private void TrackingBoxPlugin_TrackingBoxClick(object sender, TrackingBoxClickEventArgs e)
{
//无效位置按钮按下时,不发送坐标
if(IsDrawInvalidPlace)
return;
if (e.HitTrackingBoxInfo == null)
return;
this.AlgorithmControllerDic[this.StrategyType].Tracking(e.VideoPointCenter);
......
......@@ -23,7 +23,7 @@ namespace VIZ.FGOUT.Module
private readonly FrameBuffer _frameBuffer = new FrameBuffer(TimeSpan.FromSeconds(10));
private readonly TrackingBoxInfoBuffer _trackingBoxInfoBuffer =
new TrackingBoxInfoBuffer(TimeSpan.FromSeconds(10));
new TrackingBoxInfoBuffer(TimeSpan.FromSeconds(30));
public List<TrackingBoxInfo> _cam3Infos = new List<TrackingBoxInfo>();
......@@ -285,9 +285,12 @@ namespace VIZ.FGOUT.Module
view3.video.UpdateVideoFrame(dsExtend, true);
// 更新视频控件跟踪框信息
if (_cam3Infos.Count > 0)
{
_cam3StaticInfos = _cam3Infos;
view3.video.UpdateTrackingBox(_cam3Infos);
}
}
}
catch (Exception ex)
{
log.Error(ex);
......@@ -423,7 +426,7 @@ namespace VIZ.FGOUT.Module
{
buffer.Enqueue(frame);
// 如果缓冲区超过容量,则移除最旧的帧
if (buffer.Count > 500)
if (buffer.Count > 1500)
buffer.Dequeue();
}
......
......@@ -150,7 +150,7 @@ namespace VIZ.FGOUT.Module
// 无效区域的注册
ApplicationDomain.MessageManager.Register<InvalidPlaceModel>(this, this.InvalidPlaceModel);
// 清除开始、结束、无效位置
// (清空位置)清除开始、结束、无效位置
ApplicationDomain.MessageManager.Register<CleanPlaceModel>(this, this.CleanPlace);
// 显示无效位置
......@@ -297,7 +297,7 @@ namespace VIZ.FGOUT.Module
////延时2秒
//Thread.Sleep(2000);
manager.SendJson(replayPackage);
MessageBoxEx.ShowDialog("Replay Start OK.");
//MessageBoxEx.ShowDialog("Replay Start OK.");
}
private void CleanInPoints(CleanInPointsModel cleanInPointsModel)
......@@ -585,6 +585,11 @@ namespace VIZ.FGOUT.Module
{
if (this.ViewKey != NDIViewKeys.CAM_1)
return;
MessageBoxExResult result = MessageBoxEx.ShowDialog("提示", "确定清空位置?", MessageBoxExButtons.YES_CANCEL, this.GetWindow());
if (result != MessageBoxExResult.YES)
return;
var ndiView = this.GetView<NDIView>();
if (ndiView == null)
return;
......
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