Created
June 27, 2022 01:18
-
-
Save shubham0204/ffd3c0bffd2b517d34754fe52913b79b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import streamlit as st | |
import cv2 | |
vid = cv2.VideoCapture( 'http://<network_ip_Address>:8080/video' ) | |
st.title( 'Using Mobile Camera with Streamlit' ) | |
frame_window = st.image( [] ) | |
take_picture_button = st.button( 'Take Picture' ) | |
while True: | |
got_frame , frame = vid.read() | |
frame = cv2.cvtColor( frame , cv2.COLOR_BGR2RGB ) | |
if got_frame: | |
frame_window.image(frame) | |
if take_picture_button: | |
# Pass the frame to a model | |
# And show the output here... | |
break | |
vid.release() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment