mirror of
https://github.com/esimov/pigo.git
synced 2025-11-02 12:14:08 +08:00
Fixing index out of range
This commit is contained in:
@@ -52,10 +52,8 @@ 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
|
||||
|
||||
# Verify if camera is intialized by checking if pixel array is not empty.
|
||||
if numpy.any(pixs):
|
||||
dets = process_frame(pixs) # pixs needs to be numpy.uint8 array
|
||||
if dets is not None:
|
||||
for det in dets:
|
||||
|
||||
Reference in New Issue
Block a user