Skip to content

Commit

Permalink
Fix cv2.imwrite
Browse files Browse the repository at this point in the history
  • Loading branch information
aliberts committed Jun 13, 2024
1 parent f906983 commit 4eb18c0
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
"""Capture video feed from a camera as raw images."""

import argparse
import datetime as dt
from pathlib import Path
Expand Down Expand Up @@ -46,7 +47,7 @@ def display_and_save_video_stream(output_dir: Path, fps: int, width: int, height
break

cv2.imshow("Video Stream", frame)
cv2.imwrite(capture_dir / f"frame_{frame_index:06d}.png", frame)
cv2.imwrite(str(capture_dir / f"frame_{frame_index:06d}.png"), frame)
frame_index += 1

# Break the loop on 'q' key press
Expand Down

0 comments on commit 4eb18c0

Please sign in to comment.