Esempio n. 1
0
        public override NormalizedRect GetValue()
        {
            var rectPtr = UnsafeNativeMethods.MpPacketGetNormalizedRect(ptr);
            var rect    = SerializedProto.FromPtr <NormalizedRect>(rectPtr, NormalizedRect.Parser);

            UnsafeNativeMethods.MpSerializedProtoDestroy(rectPtr);

            return(rect);
        }
        public override Detection GetValue()
        {
            var detectionPtr = UnsafeNativeMethods.MpPacketGetDetection(ptr);
            var detection    = SerializedProto.FromPtr <Detection>(detectionPtr, Detection.Parser);

            UnsafeNativeMethods.MpSerializedProtoDestroy(detectionPtr);

            return(detection);
        }
        public override ClassificationList GetValue()
        {
            var classificationListPtr = UnsafeNativeMethods.MpPacketGetClassificationList(ptr);
            var rect = SerializedProto.FromPtr <ClassificationList>(classificationListPtr, ClassificationList.Parser);

            UnsafeNativeMethods.MpSerializedProtoDestroy(classificationListPtr);

            return(rect);
        }
Esempio n. 4
0
        public static List <T> FromPtr <T>(IntPtr ptr, pb::MessageParser <T> parser) where T : pb::IMessage <T>
        {
            var inner  = Marshal.PtrToStructure <SerializedProtoVectorInner>(ptr);
            var protos = new List <T>(inner.size);

            unsafe {
                var arr = inner.data;

                for (var i = 0; i < inner.size; i++)
                {
                    protos.Add(SerializedProto.FromPtr <T>((IntPtr)(*arr++), parser));
                }
            }

            return(protos);
        }
 public static extern MpReturnCode mp_ValidatedGraphConfig__Config(IntPtr config, out SerializedProto serializedProto);
Esempio n. 6
0
 public static extern bool mp_api__ConvertFromCalculatorGraphConfigTextFormat(string configText, out SerializedProto serializedProto);
 public static extern MpReturnCode mp_CalculatorGraph__Config(IntPtr graph, out SerializedProto serializedProto);
Esempio n. 8
0
 public static extern MpReturnCode mp_Packet__GetTimedModelMatrixProtoList(IntPtr packet, out SerializedProto serializedProto);
Esempio n. 9
0
 public static extern MpReturnCode mp_Packet__GetRect(IntPtr packet, out SerializedProto serializedProto);
Esempio n. 10
0
 public static extern MpReturnCode mp_Packet__GetNormalizedLandmarkList(IntPtr packet, out SerializedProto serializedProto);
Esempio n. 11
0
 public static extern MpReturnCode mp_Packet__GetFrameAnnotation(IntPtr packet, out SerializedProto serializedProto);
Esempio n. 12
0
 public static extern MpReturnCode mp_Packet__GetFaceGeometry(IntPtr packet, out SerializedProto serializedProto);
Esempio n. 13
0
 public static extern MpReturnCode mp_Packet__GetClassificationList(IntPtr packet, out SerializedProto serializedProto);