Beispiel #1
0
        public void SetWorker <U>(WorkerType workerType, StdSharedPtr <U> worker, bool workerOnNewThread = true)
            where U : Worker <T>
        {
            this.ThrowIfDisposed();

            NativeMethods.op_wrapper_setWorker(this._DataType, this.NativePtr, workerType, worker.NativePtr, workerOnNewThread);
        }
Beispiel #2
0
        public bool WaitAndPop(out StdSharedPtr <StdVector <T> > datums)
        {
            this.ThrowIfDisposed();

            var ret = NativeMethods.op_wrapper_waitAndPop(this._DataType, this.NativePtr, out var tDatums);

            datums = ret ? new StdSharedPtr <StdVector <T> >(tDatums) : null;
            return(ret);
        }
Beispiel #3
0
        public bool WaitAndEmplace(StdSharedPtr <StdVector <T> > datums)
        {
            if (datums == null)
            {
                throw new ArgumentNullException(nameof(datums));
            }

            datums.ThrowIfDisposed();
            this.ThrowIfDisposed();

            return(NativeMethods.op_wrapper_waitAndEmplace(this._DataType, this.NativePtr, datums.NativePtr));
        }
Beispiel #4
0
        public WGui(StdSharedPtr <Gui> gui)
        {
            if (gui == null)
            {
                throw new ArgumentNullException(nameof(gui));
            }

            gui.ThrowIfDisposed();

            this._DataType = GenericHelpers.CheckDatumSupportTypes <T>();
            this.NativePtr = NativeMethods.op_WGui_new(this._DataType, gui.NativePtr);
        }
        public WDatumProducer(StdSharedPtr <DatumProducer <T> > datumProducer)
        {
            if (datumProducer == null)
            {
                throw new ArgumentNullException(nameof(datumProducer));
            }

            datumProducer.ThrowIfDisposed();

            this._DataType = GenericHelpers.CheckDatumSupportTypes <T>();
            this.NativePtr = OpenPose.Native.op_WDatumProducer_new(this._DataType,
                                                                   datumProducer.NativePtr);
        }
 public PoseGpuRenderer(PoseModel poseModel,
                        StdSharedPtr <PoseExtractorCaffe> poseExtractorNet,
                        float renderThreshold,
                        bool blendOriginalFrame = true,
                        float alphaKeyPoint     = OpenPose.PoseDefaultAlphaKeyPoint,
                        float alphaHeatMap      = OpenPose.PoseDefaultAlphaHeatMap,
                        uint elementToRender    = 0u)
 {
     this.NativePtr = NativeMethods.op_PoseGpuRenderer_new(poseModel,
                                                           poseExtractorNet.NativePtr,
                                                           renderThreshold,
                                                           blendOriginalFrame,
                                                           alphaKeyPoint,
                                                           alphaHeatMap,
                                                           elementToRender);
 }
Beispiel #7
0
        public DatumProducer(StdSharedPtr <Producer> producerSharedPtr,
                             ulong frameFirst = 0,
                             ulong frameStep  = 1,
                             ulong frameLast  = ulong.MaxValue)
        {
            if (producerSharedPtr == null)
            {
                throw new ArgumentNullException(nameof(producerSharedPtr));
            }

            producerSharedPtr.ThrowIfDisposed();

            this._DataType = GenericHelpers.CheckDatumSupportTypes <T>();
            this.NativePtr = NativeMethods.op_DatumProducer_new(this._DataType,
                                                                producerSharedPtr.NativePtr,
                                                                frameFirst,
                                                                frameStep,
                                                                frameLast,
                                                                IntPtr.Zero);
        }
Beispiel #8
0
 public void Add <W>(ulong threadId, StdSharedPtr <W> tWorker, ulong queueInId, ulong queueOutId)
     where W : Worker <T>
 {
     this.ThrowIfDisposed();
     OpenPose.Native.op_ThreadManager_add(this._DataType, this.NativePtr, threadId, tWorker.NativePtr, queueInId, queueOutId);
 }