deface icon indicating copy to clipboard operation
deface copied to clipboard

"deface cam" on Mac with 1920x1080 webcam would freeze on first frame

Open chienlim opened this issue 3 years ago • 1 comments
trafficstars

On Mac with 1920x1080 webcam, "deface cam" will freeze on first frame. When using an older Mac with 1280x720 webcam no issue there.

There is a fix for frame grabbing using imageio.imiter, but I am not sure how to fix for the case of imageio.imread:

For example, this line will fail on 1920x1080 webcam:

for idx, frame in enumerate(iio.imiter("<%video0%>")):

This will pass on 1920x1080 webcam:

for idx, frame in enumerate(iio.imiter("<%video0%>", size=(1280, 720))):

Please help.

chienlim avatar Sep 04 '22 07:09 chienlim

Found a workaround:

Instead of this:

for frame in read_iter:

Use this:

for frame in imageio.imiter(ipath, size=(1280, 720)):

chienlim avatar Sep 04 '22 20:09 chienlim