File size: 411 Bytes
9f77b8d
562f13d
e198f1a
9f77b8d
e198f1a
9f77b8d
e198f1a
 
9f77b8d
e198f1a
 
9f77b8d
e198f1a
 
9f77b8d
e198f1a
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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)