Пример #1
0
        public void AddOverlay(IEnumerable <OverlayLine> lines)
        {
            this.ThrowIfDisposed();

            if (lines == null)
            {
                throw new ArgumentNullException(nameof(lines));
            }

            using (var vector = new VectorOfImageWindowOverlayLine(lines))
                Native.image_window_add_overlay5(this.NativePtr, vector.NativePtr);
        }
Пример #2
0
        public static ImageWindow.OverlayLine[] RenderFaceDetections(IEnumerable <FullObjectDetection> detection, RgbPixel color)
        {
            if (detection == null)
            {
                throw new ArgumentNullException(nameof(detection));
            }

            using (var vectorIn = new VectorOfFullObjectDetection(detection))
                using (var vectorOut = new VectorOfImageWindowOverlayLine())
                {
                    Native.render_face_detections(vectorIn.NativePtr, ref color, vectorOut.NativePtr);
                    return(vectorOut.ToArray());
                }
        }
Пример #3
0
        public static ImageWindow.OverlayLine[] RenderFaceDetections(FullObjectDetection detection, RgbPixel color)
        {
            if (detection == null)
            {
                throw new ArgumentNullException(nameof(detection));
            }

            detection.ThrowIfDisposed(nameof(detection));

            using (var vector = new VectorOfImageWindowOverlayLine())
            {
                Native.render_face_detections(detection.NativePtr, ref color, vector.NativePtr);
                return(vector.ToArray());
            }
        }