exports all frames from a given video file
This commit is contained in:
parent
a9bb0b72a5
commit
d0f76a60e2
|
|
@ -57,7 +57,7 @@ def get_frames(vid):
|
||||||
|
|
||||||
#To draw a rectangle in eyes
|
#To draw a rectangle in eyes
|
||||||
for (ex,ey,ew,eh) in eyes:
|
for (ex,ey,ew,eh) in eyes:
|
||||||
if ew >= 80 and eh >= 80:
|
if ew >= 82 and eh >= 82:
|
||||||
#cv2.rectangle(roi_color,(ex,ey),(ex+ew,ey+eh),(0,127,255),2)
|
#cv2.rectangle(roi_color,(ex,ey),(ex+ew,ey+eh),(0,127,255),2)
|
||||||
list_ex.append(ex)
|
list_ex.append(ex)
|
||||||
list_ey.append(ey)
|
list_ey.append(ey)
|
||||||
|
|
@ -80,6 +80,8 @@ def get_frames(vid):
|
||||||
except:
|
except:
|
||||||
print('error on min value of ex')
|
print('error on min value of ex')
|
||||||
#cv2.rectangle(roi_color, (fx,fy-150),(fx+100,fy-20),(0,127,255),2) #for testing purposes
|
#cv2.rectangle(roi_color, (fx,fy-150),(fx+100,fy-20),(0,127,255),2) #for testing purposes
|
||||||
|
#cv2.imshow('img',roi_color)
|
||||||
|
#cv2.waitKey(0)
|
||||||
|
|
||||||
cap.release()
|
cap.release()
|
||||||
cv2.destroyAllWindows()
|
cv2.destroyAllWindows()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue