public override Status StartRun()
        {
            handLandmarksStreamPoller = graph.AddOutputStreamPoller <List <NormalizedLandmarkList> >(handLandmarksStream).Value();
            handLandmarksPacket       = new NormalizedLandmarkListVectorPacket();

            handednessStreamPoller = graph.AddOutputStreamPoller <List <ClassificationList> >(handednessStream).Value();
            handednessPacket       = new ClassificationListVectorPacket();

            palmDetectionsStreamPoller = graph.AddOutputStreamPoller <List <Detection> >(palmDetectionsStream).Value();
            palmDetectionsPacket       = new DetectionVectorPacket();

            palmRectsStreamPoller = graph.AddOutputStreamPoller <List <NormalizedRect> >(palmRectsStream).Value();
            palmRectsPacket       = new NormalizedRectVectorPacket();

            handLandmarksPresenceStreamPoller = graph.AddOutputStreamPoller <bool>(handLandmarksPresenceStream).Value();
            handLandmarksPresencePacket       = new BoolPacket();

            palmDetectionsPresenceStreamPoller = graph.AddOutputStreamPoller <bool>(palmDetectionsPresenceStream).Value();
            palmDetectionsPresencePacket       = new BoolPacket();

            sidePacket = new SidePacket();
            sidePacket.Emplace("num_hands", new IntPacket(2));

            return(graph.StartRun(sidePacket));
        }
Exemplo n.º 2
0
        public Status Initialize(CalculatorGraphConfig config, SidePacket sidePacket)
        {
            UnsafeNativeMethods.mp_CalculatorGraph__Initialize__Rconfig_Rsp(mpPtr, config.mpPtr, sidePacket.mpPtr, out var statusPtr).Assert();

            GC.KeepAlive(this);
            return(new Status(statusPtr));
        }
Exemplo n.º 3
0
        public Status StartRun(SidePacket sidePacket)
        {
            UnsafeNativeMethods.mp_CalculatorGraph__StartRun__Rsp(mpPtr, sidePacket.mpPtr, out var statusPtr).Assert();

            GC.KeepAlive(sidePacket);
            GC.KeepAlive(this);
            return(new Status(statusPtr));
        }
        public Status ValidateRequiredSidePackets(SidePacket sidePacket)
        {
            UnsafeNativeMethods.mp_ValidatedGraphConfig__ValidateRequiredSidePackets__Rsp(mpPtr, sidePacket.mpPtr, out var statusPtr).Assert();

            GC.KeepAlive(sidePacket);
            GC.KeepAlive(this);
            return(new Status(statusPtr));
        }
Exemplo n.º 5
0
        public Status Initialize(CalculatorGraphConfig config, SidePacket sidePacket)
        {
            var bytes = config.ToByteArray();

            UnsafeNativeMethods.mp_CalculatorGraph__Initialize__PKc_i_Rsp(mpPtr, bytes, bytes.Length, sidePacket.mpPtr, out var statusPtr).Assert();

            GC.KeepAlive(this);
            return(new Status(statusPtr));
        }
 public Status StartRun(SidePacket sidePacket)
 {
     return(new Status(UnsafeNativeMethods.MpCalculatorGraphStartRun(ptr, sidePacket.GetPtr())));
 }
Exemplo n.º 7
0
 public Status StartRun(SidePacket sidePacket)
 {
     return(new Status(MpCalculatorGraphStartRun(mpCalculatorGraph, sidePacket.GetPtr())));
 }