Small changes

This commit is contained in:
Endre Simo
2019-02-06 13:43:07 +02:00
parent fc0d845689
commit 57f26c8d4a
2 changed files with 2 additions and 2 deletions

View File

@@ -51,7 +51,7 @@ cap.set(cv2.CAP_PROP_FRAME_HEIGHT, 480)
# Changing the camera resolution introduce a short delay in the camera initialization. # Changing the camera resolution introduce a short delay in the camera initialization.
# For this reason we should delay the object detection process with a few milliseconds. # For this reason we should delay the object detection process with a few milliseconds.
time.sleep(0.2) time.sleep(0.4)
while(True): while(True):
ret, frame = cap.read() ret, frame = cap.read()

View File

@@ -51,7 +51,7 @@ func FindFaces(pixels []uint8) uintptr {
s := *(*[]int)(unsafe.Pointer(&det)) s := *(*[]int)(unsafe.Pointer(&det))
p := uintptr(unsafe.Pointer(&s[0])) p := uintptr(unsafe.Pointer(&s[0]))
// Ensure `det` is not freed by GC. // Ensure `det` is not freed up by GC prematurely.
runtime.KeepAlive(det) runtime.KeepAlive(det)
// return the pointer address // return the pointer address
pointCh <- p pointCh <- p