mirror of
https://github.com/esimov/pigo.git
synced 2025-10-08 17:40:09 +08:00
Simplify facemask example
This commit is contained in:
@@ -56,8 +56,7 @@ time.sleep(0.4)
|
|||||||
|
|
||||||
while(True):
|
while(True):
|
||||||
ret, frame = cap.read()
|
ret, frame = cap.read()
|
||||||
pixs = np.ascontiguousarray(frame[:, :, 1].reshape((frame.shape[0], frame.shape[1])))
|
pixs = np.ascontiguousarray(frame[:, :, 1]).flatten()
|
||||||
pixs = pixs.flatten()
|
|
||||||
|
|
||||||
# Verify if camera is intialized by checking if pixel array is not empty.
|
# Verify if camera is intialized by checking if pixel array is not empty.
|
||||||
if np.any(pixs):
|
if np.any(pixs):
|
||||||
|
Reference in New Issue
Block a user