mirror of
https://github.com/esimov/pigo.git
synced 2025-10-09 18:10:35 +08:00
Change default values
This commit is contained in:
@@ -39,7 +39,7 @@ def process_frame(pixs):
|
|||||||
|
|
||||||
# The first value of the buffer aray represents the buffer length.
|
# The first value of the buffer aray represents the buffer length.
|
||||||
dets_len = res[0][0]
|
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]
|
dets = list(res.reshape(-1, 3))[0:dets_len]
|
||||||
|
|
||||||
return dets
|
return dets
|
||||||
@@ -52,6 +52,7 @@ while(True):
|
|||||||
ret, frame = cap.read()
|
ret, frame = cap.read()
|
||||||
pixs = numpy.ascontiguousarray(frame[:, :, 1].reshape((frame.shape[0], frame.shape[1])))
|
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):
|
if not numpy.any(pixs):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
@@ -62,9 +62,9 @@ func FindFaces(pixels []uint8) uintptr {
|
|||||||
// and returns a cluster with the detected faces coordinates.
|
// and returns a cluster with the detected faces coordinates.
|
||||||
func clusterDetection(pixels []uint8, rows, cols int) []pigo.Detection {
|
func clusterDetection(pixels []uint8, rows, cols int) []pigo.Detection {
|
||||||
cParams := pigo.CascadeParams{
|
cParams := pigo.CascadeParams{
|
||||||
MinSize: 20,
|
MinSize: 100,
|
||||||
MaxSize: 1000,
|
MaxSize: 1000,
|
||||||
ShiftFactor: 0.22,
|
ShiftFactor: 0.15,
|
||||||
ScaleFactor: 1.1,
|
ScaleFactor: 1.1,
|
||||||
ImageParams: pigo.ImageParams{
|
ImageParams: pigo.ImageParams{
|
||||||
Pixels: pixels,
|
Pixels: pixels,
|
||||||
|
Reference in New Issue
Block a user