Browse Source

Merge branch 'master' of judy.zhu/RUS into master

lilith.lu 1 year ago
parent
commit
fcc59a8334

+ 18 - 0
SourceCode/OnGoingTasks/TrajectoryPlanning/Demo/EnumHumanParts.cs

@@ -0,0 +1,18 @@
+namespace HumanOrganSegDemo
+{
+    /// <summary>
+    /// 人体部位
+    /// </summary>
+    public enum EnumHumanParts
+    {
+        /// <summary>
+        /// 躯干
+        /// </summary>
+        Body = 1,
+
+        /// <summary>
+        /// 头
+        /// </summary>
+        Head = 2,
+    }
+}

+ 24 - 0
SourceCode/OnGoingTasks/TrajectoryPlanning/Demo/EnumOrgans.cs

@@ -0,0 +1,24 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace HumanOrganSegDemo
+{
+    /// <summary>
+    /// 脏器名称
+    /// </summary>
+    public enum EnumOrgans
+    {
+        /// <summary>
+        /// 肝脏
+        /// </summary>
+        Liver = 1,
+        /// <summary>
+        /// 心脏
+        /// </summary>
+        Heart = 2,
+
+    }
+}

+ 63 - 0
SourceCode/OnGoingTasks/TrajectoryPlanning/Demo/HumanDetectResultPerImage.cs

@@ -0,0 +1,63 @@
+using RUSInferNet;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using AI.Common;
+using Rect = AI.Common.Rect;
+
+namespace HumanOrganSegDemo
+{
+    public class HumanDetectResultPerImage
+    {
+        /// <summary>
+        /// 一张图有多个部位检测,包括人体、人脸等
+        /// </summary>
+        public Dictionary<EnumHumanParts, Rect[]> BodyPartBoundBoxesAll;
+
+        /// <summary>
+        /// 目标对象的矩形框
+        /// </summary>
+        public Rect ObjectBoundingBox;
+
+        /// <summary>
+        /// 目标对象的关键点
+        /// </summary>
+        public BodyKeyPoints ObjectKeyPoints;
+
+        /// <summary>
+        /// 目标对象人体朝向向量(像素坐标系)
+        /// </summary>
+        public Point2D ObjectOrientationInPCS;
+
+        /// <summary>
+        /// 目标脏器的轮廓信息
+        /// </summary>
+        public ContourPoints ObjectOrganContours;
+
+        /// <summary>
+        /// 耗时统计
+        /// </summary>
+        public int TimeElapsed;
+
+        /// <summary>
+        /// 人体朝向(标志位)
+        /// </summary>
+        public int ObjectOrientationFlagX;
+        public int ObjectOrientationFlagY;
+        public HumanDetectResultPerImage(Dictionary<EnumHumanParts, Rect[]> bodyPartBoundBoxes, Rect objectBoundingBox, BodyKeyPoints bodyKeyPoints, Point2D orientation, ContourPoints organContours, int timeElapsed, int flagX, int flagY)
+        {
+            BodyPartBoundBoxesAll = bodyPartBoundBoxes;
+            ObjectBoundingBox = objectBoundingBox;
+            ObjectKeyPoints = bodyKeyPoints;
+            ObjectOrientationInPCS = orientation;
+            ObjectOrganContours = organContours;
+            TimeElapsed = timeElapsed;
+            ObjectOrientationFlagX = flagX;
+            ObjectOrientationFlagY = flagY;
+        }
+
+    }
+}