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