Change default values

This commit is contained in:
Endre Simo
2019-02-03 14:18:28 +02:00
parent 0d6909e6b2
commit e211d446ef
2 changed files with 4 additions and 3 deletions

View File

@@ -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

View File

@@ -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,