faultdetection3 / src /streamlit_app.py
Sanjayraju30's picture
Update src/streamlit_app.py
e198f1a verified
raw
history blame
411 Bytes
import streamlit as st
import cv2
import numpy as np
st.title("OpenCV Image Display Example")
# Create a black image
image = np.zeros((200, 200, 3), dtype=np.uint8)
# Draw a red circle
cv2.circle(image, (100, 100), 50, (0, 0, 255), -1)
# Convert BGR to RGB
image_rgb = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)
# Display the image in Streamlit
st.image(image_rgb, caption="Red Circle", use_column_width=True)