public static ChipDetails GetFaceChipDetails(FullObjectDetection det, uint size = 200, double padding = 0.2d) { if (det == null) { throw new ArgumentNullException(nameof(det)); } if (size <= 0) { throw new ArgumentException(); } if (padding < 0) { throw new ArgumentException(); } det.ThrowIfDisposed(); if (det.Parts != 68 && det.Parts != 5) { throw new ArgumentException($"{nameof(det)} is invalid item."); } NativeMethods.get_face_chip_details2(det.NativePtr, size, padding, out var ret); return(new ChipDetails(ret)); }
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 StdVector <ImageWindow.OverlayLine>()) { Native.render_face_detections(detection.NativePtr, ref color, vector.NativePtr); return(vector.ToArray()); } }