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 29dbd01 commit 9b4c5d3
Show file tree
Hide file tree
Showing 2 changed files with 3 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
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# TODO

0 comments on commit 9b4c5d3

Please sign in to comment.