From e211d446efc17b7916b58c2de201c68a2b2a4bc4 Mon Sep 17 00:00:00 2001 From: Endre Simo Date: Sun, 3 Feb 2019 14:18:28 +0200 Subject: [PATCH] Change default values --- examples/python/demo.py | 3 ++- examples/python/pigo.go | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/examples/python/demo.py b/examples/python/demo.py index ef632c3..0f325f9 100644 --- a/examples/python/demo.py +++ b/examples/python/demo.py @@ -39,7 +39,7 @@ def process_frame(pixs): # The first value of the buffer aray represents the buffer length. dets_len = res[0][0] - res = numpy.delete(res, 0, 0) # delete zero values from the buffer array + res = numpy.delete(res, 0, 0) # delete the first element from the array dets = list(res.reshape(-1, 3))[0:dets_len] return dets @@ -52,6 +52,7 @@ while(True): ret, frame = cap.read() pixs = numpy.ascontiguousarray(frame[:, :, 1].reshape((frame.shape[0], frame.shape[1]))) + # Check if camera is intialized by checking if pixel array is not empty. if not numpy.any(pixs): continue diff --git a/examples/python/pigo.go b/examples/python/pigo.go index bf74e8a..e851191 100644 --- a/examples/python/pigo.go +++ b/examples/python/pigo.go @@ -62,9 +62,9 @@ func FindFaces(pixels []uint8) uintptr { // and returns a cluster with the detected faces coordinates. func clusterDetection(pixels []uint8, rows, cols int) []pigo.Detection { cParams := pigo.CascadeParams{ - MinSize: 20, + MinSize: 100, MaxSize: 1000, - ShiftFactor: 0.22, + ShiftFactor: 0.15, ScaleFactor: 1.1, ImageParams: pigo.ImageParams{ Pixels: pixels,