Spaces:
Sleeping
Sleeping
File size: 446 Bytes
74d1055 |
1 2 3 4 5 6 7 8 9 10 11 |
import av
import cv2
import streamlit as st
from streamlit_webrtc import webrtc_streamer
st.title("Computer Vision Streamlit application")
class VideoProcessor:
def recv(self, frame):
image = frame.to_ndarray(format="bgr24")
image = cv2.cvtColor(cv2.Canny(image, 100, 200), cv2.COLOR_GRAY2BGR)
return av.VideoFrame.from_ndarray(image, format="bgr24")
webrtc_streamer(key="demo", video_processor_factory=VideoProcessor) |