Simplify facemask example

This commit is contained in:
Endre Simo
2019-05-05 15:45:46 +03:00
parent 160b21b630
commit 9a0192b4e5

View File

@@ -56,8 +56,7 @@ time.sleep(0.4)
while(True):
ret, frame = cap.read()
pixs = np.ascontiguousarray(frame[:, :, 1].reshape((frame.shape[0], frame.shape[1])))
pixs = pixs.flatten()
pixs = np.ascontiguousarray(frame[:, :, 1]).flatten()
# Verify if camera is intialized by checking if pixel array is not empty.
if np.any(pixs):