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 ...@@ -10,11 +10,11 @@ none
false false
2-725104376 21870986562
3947974750 31364711570
17-1462717611 17-1683084370
Themes\Generic.xaml;Widgets\FootballFieldPanel\FootballFieldPanel.xaml; Themes\Generic.xaml;Widgets\FootballFieldPanel\FootballFieldPanel.xaml;
True False
...@@ -10,11 +10,11 @@ none ...@@ -10,11 +10,11 @@ none
false false
DEBUG;TRACE DEBUG;TRACE
181380438361 18560433975
1-1441241311 1470602451
11-1602666439 11-350624472
23-2035776870 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; 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 ...@@ -407,7 +407,6 @@ namespace VIZ.FGOUT.Module
{ {
service.ClearVideoControl(new ClearVideoControlContext(true, true)); service.ClearVideoControl(new ClearVideoControlContext(true, true));
} }
return true; return true;
} }
......
...@@ -199,16 +199,14 @@ namespace VIZ.FGOUT.Module ...@@ -199,16 +199,14 @@ namespace VIZ.FGOUT.Module
// 将视频帧转换为Mat对象 // 将视频帧转换为Mat对象
//var t1 = DateTime.Now; //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); 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); //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; ...@@ -5,6 +5,7 @@ using VIZ.FGOUT.Domain;
using VIZ.FGOUT.Storage; using VIZ.FGOUT.Storage;
using VIZ.Framework.Common; using VIZ.Framework.Common;
using VIZ.Framework.Core; using VIZ.Framework.Core;
using VIZ.Framework.Storage;
namespace VIZ.FGOUT.Module namespace VIZ.FGOUT.Module
{ {
...@@ -93,7 +94,12 @@ namespace VIZ.FGOUT.Module ...@@ -93,7 +94,12 @@ namespace VIZ.FGOUT.Module
{ {
foreach (RawRectangleF item in msg.bboxes) 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)) if (!RawRectangleFExpand.IsEffective(rect))
continue; continue;
......
...@@ -335,7 +335,7 @@ namespace VIZ.FGOUT.Module ...@@ -335,7 +335,7 @@ namespace VIZ.FGOUT.Module
private List<List<List<int>>> Coordinate(List<PointCollection> points, double srcWidth, double srcHeight) 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); int resHeight = ApplicationDomainEx.IniStorage.GetValue<VideoConfig, int>(p => p.VIDEO_HEIGHT);
double xp = srcWidth / resWith; double xp = srcWidth / resWith;
...@@ -356,7 +356,7 @@ namespace VIZ.FGOUT.Module ...@@ -356,7 +356,7 @@ namespace VIZ.FGOUT.Module
private List<List<List<int>>> Coordinate(List<System.Windows.Rect> rects, double srcWidth, double srcHeight) 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); int resHeight = ApplicationDomainEx.IniStorage.GetValue<VideoConfig, int>(p => p.VIDEO_HEIGHT);
...@@ -438,7 +438,7 @@ namespace VIZ.FGOUT.Module ...@@ -438,7 +438,7 @@ namespace VIZ.FGOUT.Module
//private List<List<int>> Coordinate(Rect rect, VideoRenderInfo renderInfo, double srcWidth, double srcHeight) //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<VideoConfig, int>(p => p.VIDEO_HEIGHT);
// //int resHeight= ApplicationDomainEx.IniStorage.GetValue<ResConfig, int>(p => p.RES_HIEGHT); // //int resHeight= ApplicationDomainEx.IniStorage.GetValue<ResConfig, int>(p => p.RES_HIEGHT);
......
...@@ -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
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 ...@@ -56,7 +56,7 @@ VIDEO_SIDE_CHECK_POLYGON_OPACITY=0.15
;视频人工校准区域透明度 ;视频人工校准区域透明度
VIDEO_MANUAL_CORRECTION_OPACITY=0.2 VIDEO_MANUAL_CORRECTION_OPACITY=0.2
;视频宽度 ;视频宽度
VIDEO_WITH=3840 VIDEO_WIDTH=3840
;视频高度 ;视频高度
VIDEO_HEIGHT=2160 VIDEO_HEIGHT=2160
; ============================================================ ; ============================================================
......
...@@ -56,11 +56,9 @@ VIDEO_SIDE_CHECK_POLYGON_OPACITY=0.15 ...@@ -56,11 +56,9 @@ VIDEO_SIDE_CHECK_POLYGON_OPACITY=0.15
;视频人工校准区域透明度 ;视频人工校准区域透明度
VIDEO_MANUAL_CORRECTION_OPACITY=0.2 VIDEO_MANUAL_CORRECTION_OPACITY=0.2
;视频宽度 ;视频宽度
;VIDEO_WITH=3840 VIDEO_WIDTH=3840
VIDEO_WITH=640
;视频高度 ;视频高度
;VIDEO_HEIGHT=2160 VIDEO_HEIGHT=2160
VIDEO_HEIGHT=360
; ============================================================ ; ============================================================
; === Navigation3D === ; === Navigation3D ===
; ============================================================ ; ============================================================
......
...@@ -10,11 +10,11 @@ none ...@@ -10,11 +10,11 @@ none
false false
DEBUG;TRACE DEBUG;TRACE
C:\Projects\FGOUT\VIZ.FGOUT\VIZ.FGOUT\App.xaml C:\Projects\FGOUT\VIZ.FGOUT\VIZ.FGOUT\App.xaml
21265083526 2-1347366880
6-790135758 6968741766
421356718200 43-1958993781
CloseAlgorithmWindow.xaml;MainWindow.xaml; CloseAlgorithmWindow.xaml;MainWindow.xaml;
True False
...@@ -10,10 +10,10 @@ none ...@@ -10,10 +10,10 @@ none
false false
DEBUG;TRACE DEBUG;TRACE
9-721875057 91711917753
3-630027162 3-1719726047
19-1136530284 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; 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 False
......
...@@ -3,6 +3,7 @@ using SharpDX.Direct2D1; ...@@ -3,6 +3,7 @@ using SharpDX.Direct2D1;
using SharpDX.Mathematics.Interop; using SharpDX.Mathematics.Interop;
using System.Collections.Generic; using System.Collections.Generic;
using VIZ.Framework.Core; using VIZ.Framework.Core;
using VIZ.Framework.Storage;
namespace VIZ.Framework.Common namespace VIZ.Framework.Common
{ {
......
using SharpDX.Direct2D1; using SharpDX.Direct2D1;
using SharpDX.Mathematics.Interop; using SharpDX.Mathematics.Interop;
using System; using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows; using System.Windows;
using VIZ.Framework.Core; using VIZ.Framework.Core;
using VIZ.Framework.Storage;
using VIZ.Framework.Domain; using VIZ.Framework.Domain;
using VIZ.Framework.Storage;
namespace VIZ.Framework.Common namespace VIZ.Framework.Common
{ {
......
...@@ -5,6 +5,7 @@ using System; ...@@ -5,6 +5,7 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using VIZ.Framework.Core; using VIZ.Framework.Core;
using VIZ.Framework.Domain; using VIZ.Framework.Domain;
using VIZ.Framework.Storage;
namespace VIZ.Framework.Common namespace VIZ.Framework.Common
{ {
......
...@@ -197,7 +197,7 @@ namespace VIZ.Framework.Common ...@@ -197,7 +197,7 @@ namespace VIZ.Framework.Common
// 设置当前NDI发送源 // 设置当前NDI发送源
this.CurrentRemoteSenderSource = info.Source; this.CurrentRemoteSenderSource = info.Source;
// 创建NDI接收实例句柄 & NDI同步接收实例对象 // 创建NDI接收实例句柄 & NDI同步接收实例对象
NDIlib.recv_create_v3_t recvCreateDesc = new NDIlib.recv_create_v3_t(); NDIlib.recv_create_v3_t recvCreateDesc = new NDIlib.recv_create_v3_t();
recvCreateDesc.source_to_connect_to = info.Source; 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