Commit 250e174b by 马宁-艾果

 由于视频流带宽改为lowest,接收算法的坐标不变还是4K,所以ImageHelper将图片矩形区域转化为UI矩形区域图片、NDIViewModel处理算法跟踪消息将流的宽高度设置为4K And NDIViewModel.Manual_NDI缓存视频流宽高取消除以4,因为现在流是640*360
parent 5a44cbbf
//------------------------------------------------------------------------------
// <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
......@@ -10,11 +10,11 @@ none
false
DEBUG;TRACE
181380438361
1-1441241311
11-1602666439
23-2035776870
18560433975
1470602451
11-350624472
24-1321085892
Style\Button\Button_NdiView.xaml;Style\Button\Button_Setting.xaml;Style\Button\Button_WindowTop.xaml;Style\CheckBox\CheckBox_NdiView.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_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;
True
False
......@@ -407,7 +407,6 @@ namespace VIZ.FGOUT.Module
{
service.ClearVideoControl(new ClearVideoControlContext(true, true));
}
return true;
}
......
......@@ -199,16 +199,14 @@ namespace VIZ.FGOUT.Module
// 将视频帧转换为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));
//_frameBuffer.AddFrame(resizedFrame);
//// 释放视频帧资源
//mat.Dispose();
var mat = new Mat(e.Frame.Height, e.Frame.Width, MatType.CV_8UC4, e.Frame.DataStream.DataPointer);
_frameBuffer.AddFrame(mat);
// 将帧缩放到低分辨率
var resizedFrame = new Mat();
//Cv2.Resize(mat, resizedFrame, new Size(mat.Width / 4 , mat.Height / 4));
Cv2.Resize(mat, resizedFrame, new Size(mat.Width, mat.Height));
_frameBuffer.AddFrame(resizedFrame);
// 释放视频帧资源
mat.Dispose();
//原始帧直接放到队列
//var mat = new Mat(e.Frame.Height, e.Frame.Width, MatType.CV_8UC4, e.Frame.DataStream.DataPointer);
......
......@@ -5,6 +5,7 @@ using VIZ.FGOUT.Domain;
using VIZ.FGOUT.Storage;
using VIZ.Framework.Common;
using VIZ.Framework.Core;
using VIZ.Framework.Storage;
namespace VIZ.FGOUT.Module
{
......@@ -93,7 +94,12 @@ namespace VIZ.FGOUT.Module
{
foreach (RawRectangleF item in msg.bboxes)
{
RawRectangleF rect = RawRectangleFExpand.ClipInVideoFrame(item, 0, 0, renderInfo.Frame.Width, renderInfo.Frame.Height);
// 视频的宽度
int resWith = ApplicationDomainEx.IniStorage.GetValue<VideoConfig, int>(p => p.VIDEO_WIDTH);
// 视频的高度
int resHeight = ApplicationDomainEx.IniStorage.GetValue<VideoConfig, int>(p => p.VIDEO_HEIGHT);
//RawRectangleF rect = RawRectangleFExpand.ClipInVideoFrame(item, 0, 0, renderInfo.Frame.Width, renderInfo.Frame.Height);
RawRectangleF rect = RawRectangleFExpand.ClipInVideoFrame(item, 0, 0, resWith, resHeight);
if (!RawRectangleFExpand.IsEffective(rect))
continue;
......
......@@ -335,7 +335,7 @@ namespace VIZ.FGOUT.Module
private List<List<List<int>>> Coordinate(List<PointCollection> points, double srcWidth, double srcHeight)
{
// 视频的宽度
int resWith = ApplicationDomainEx.IniStorage.GetValue<VideoConfig, int>(p => p.VIDEO_WITH);
int resWith = ApplicationDomainEx.IniStorage.GetValue<VideoConfig, int>(p => p.VIDEO_WIDTH);
// 视频的高度
int resHeight = ApplicationDomainEx.IniStorage.GetValue<VideoConfig, int>(p => p.VIDEO_HEIGHT);
double xp = srcWidth / resWith;
......@@ -356,7 +356,7 @@ namespace VIZ.FGOUT.Module
private List<List<List<int>>> Coordinate(List<System.Windows.Rect> rects, double srcWidth, double srcHeight)
{
// 视频的宽度
int resWith = ApplicationDomainEx.IniStorage.GetValue<VideoConfig, int>(p => p.VIDEO_WITH);
int resWith = ApplicationDomainEx.IniStorage.GetValue<VideoConfig, int>(p => p.VIDEO_WIDTH);
// 视频的高度
int resHeight = ApplicationDomainEx.IniStorage.GetValue<VideoConfig, int>(p => p.VIDEO_HEIGHT);
......@@ -438,7 +438,7 @@ namespace VIZ.FGOUT.Module
//private List<List<int>> Coordinate(Rect rect, VideoRenderInfo renderInfo, double srcWidth, double srcHeight)
//{
// // 视频的宽度
// int resWith = ApplicationDomainEx.IniStorage.GetValue<VideoConfig, int>(p => p.VIDEO_WITH);
// 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);
......
......@@ -10,11 +10,11 @@ none
false
DEBUG;TRACE
22-1559853185
4-1529606353
90-1236168610
151915249285
22-808211288
4-699044453
90-747441034
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;
True
False
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -56,7 +56,7 @@ VIDEO_SIDE_CHECK_POLYGON_OPACITY=0.15
;视频人工校准区域透明度
VIDEO_MANUAL_CORRECTION_OPACITY=0.2
;视频宽度
VIDEO_WITH=3840
VIDEO_WIDTH=3840
;视频高度
VIDEO_HEIGHT=2160
; ============================================================
......
......@@ -56,11 +56,9 @@ VIDEO_SIDE_CHECK_POLYGON_OPACITY=0.15
;视频人工校准区域透明度
VIDEO_MANUAL_CORRECTION_OPACITY=0.2
;视频宽度
;VIDEO_WITH=3840
VIDEO_WITH=640
VIDEO_WIDTH=3840
;视频高度
;VIDEO_HEIGHT=2160
VIDEO_HEIGHT=360
VIDEO_HEIGHT=2160
; ============================================================
; === Navigation3D ===
; ============================================================
......
......@@ -10,11 +10,11 @@ none
false
DEBUG;TRACE
C:\Projects\FGOUT\VIZ.FGOUT\VIZ.FGOUT\App.xaml
21265083526
2-1347366880
6-790135758
421356718200
6968741766
43-1958993781
CloseAlgorithmWindow.xaml;MainWindow.xaml;
True
False
......@@ -10,10 +10,10 @@ none
false
DEBUG;TRACE
9-721875057
91711917753
3-630027162
19-1136530284
3-1719726047
19-82108094
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
......
......@@ -3,6 +3,7 @@ using SharpDX.Direct2D1;
using SharpDX.Mathematics.Interop;
using System.Collections.Generic;
using VIZ.Framework.Core;
using VIZ.Framework.Storage;
namespace VIZ.Framework.Common
{
......
using SharpDX.Direct2D1;
using SharpDX.Mathematics.Interop;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using VIZ.Framework.Core;
using VIZ.Framework.Storage;
using VIZ.Framework.Domain;
using VIZ.Framework.Storage;
namespace VIZ.Framework.Common
{
......
......@@ -5,6 +5,7 @@ using System;
using System.Collections.Generic;
using VIZ.Framework.Core;
using VIZ.Framework.Domain;
using VIZ.Framework.Storage;
namespace VIZ.Framework.Common
{
......
......@@ -197,7 +197,7 @@ namespace VIZ.Framework.Common
// 设置当前NDI发送源
this.CurrentRemoteSenderSource = info.Source;
// 创建NDI接收实例句柄 & NDI同步接收实例对象
NDIlib.recv_create_v3_t recvCreateDesc = new NDIlib.recv_create_v3_t();
recvCreateDesc.source_to_connect_to = info.Source;
......
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