Spaces:
Sleeping
Sleeping
Update pages/Data Collection.py
Browse files- pages/Data Collection.py +11 -9
pages/Data Collection.py
CHANGED
|
@@ -266,43 +266,45 @@ elif st.session_state.current_page == "explore_images_video":
|
|
| 266 |
<h2 style="color: #BB3385;">Introduction to Images and Videos📸🖼️</h2>
|
| 267 |
""", unsafe_allow_html=True)
|
| 268 |
|
|
|
|
| 269 |
st.write("""
|
| 270 |
<div style="text-align: left; margin-top: 20px;">
|
| 271 |
<h3 style="color: #5b2c6f;">What is an Image?📊✨</h3>
|
| 272 |
<p style="font-size: 16px; color: #333;">
|
| 273 |
An image is a two-dimensional representation of the visible light spectrum, often captured
|
| 274 |
-
using devices like cameras or scanners. It can store details such as
|
| 275 |
enabling us to visually interpret and analyze information.
|
| 276 |
Common formats include JPEG, PNG, and BMP.
|
| 277 |
</p>
|
| 278 |
</div>
|
| 279 |
""", unsafe_allow_html=True)
|
| 280 |
|
|
|
|
| 281 |
st.write("""
|
| 282 |
<div style="text-align: left; margin-top: 20px;">
|
| 283 |
<h3 style="color: #5b2c6f;">What is a Video?🎥✨</h3>
|
| 284 |
<p style="font-size: 16px; color: #333;">
|
| 285 |
A video is a collection of images, often referred to as frames, displayed one after another quickly
|
| 286 |
to show continuous movement. Each frame captures a moment in time, and when these frames are played
|
| 287 |
-
sequentially, they show continuous movement.
|
| 288 |
-
Videos typically have a frame rate (e.g., 30 frames
|
| 289 |
per second or 60 frames per second), which determines how many frames are displayed per second.
|
| 290 |
Common video formats include MP4, AVI, and MOV.
|
| 291 |
</p>
|
| 292 |
</div>
|
| 293 |
""", unsafe_allow_html=True)
|
| 294 |
|
|
|
|
| 295 |
st.write("""
|
| 296 |
<div style="text-align: left; margin-top: 20px;">
|
| 297 |
-
<h3 style="color: #5b2c6f;">Why is an Image Called a Grid-Like Structure
|
| 298 |
<p style="font-size: 16px; color: #333;">
|
| 299 |
-
Images are called
|
| 300 |
-
forming a rectangular grid. Each
|
| 301 |
together define the image's content.
|
| 302 |
-
The total number of
|
| 303 |
</p>
|
| 304 |
<p style="font-size: 16px; color: #333;">
|
| 305 |
-
In images,
|
| 306 |
of features and data points gives images their grid-like nature.
|
| 307 |
</p>
|
| 308 |
<p style="font-size: 16px; color: #333;">
|
|
@@ -324,7 +326,7 @@ elif st.session_state.current_page == "explore_images_video":
|
|
| 324 |
# Annotate the grid with pixel labels
|
| 325 |
for i in range(height):
|
| 326 |
for j in range(width):
|
| 327 |
-
ax.text(j, i, f'{grid[i, j]:.2f}', ha='center', va='center',
|
| 328 |
|
| 329 |
# Set axis labels and title
|
| 330 |
ax.set_title("Image as a Grid-Like Structure", fontsize=5) # Smaller title size
|
|
|
|
| 266 |
<h2 style="color: #BB3385;">Introduction to Images and Videos📸🖼️</h2>
|
| 267 |
""", unsafe_allow_html=True)
|
| 268 |
|
| 269 |
+
# Subheading 1: What is an Image?
|
| 270 |
st.write("""
|
| 271 |
<div style="text-align: left; margin-top: 20px;">
|
| 272 |
<h3 style="color: #5b2c6f;">What is an Image?📊✨</h3>
|
| 273 |
<p style="font-size: 16px; color: #333;">
|
| 274 |
An image is a two-dimensional representation of the visible light spectrum, often captured
|
| 275 |
+
using devices like cameras or scanners. It can store details such as <strong>colors</strong>, <strong>shapes</strong>, and <strong>textures</strong>,
|
| 276 |
enabling us to visually interpret and analyze information.
|
| 277 |
Common formats include JPEG, PNG, and BMP.
|
| 278 |
</p>
|
| 279 |
</div>
|
| 280 |
""", unsafe_allow_html=True)
|
| 281 |
|
| 282 |
+
# Subheading 2: What is a Video?
|
| 283 |
st.write("""
|
| 284 |
<div style="text-align: left; margin-top: 20px;">
|
| 285 |
<h3 style="color: #5b2c6f;">What is a Video?🎥✨</h3>
|
| 286 |
<p style="font-size: 16px; color: #333;">
|
| 287 |
A video is a collection of images, often referred to as frames, displayed one after another quickly
|
| 288 |
to show continuous movement. Each frame captures a moment in time, and when these frames are played
|
| 289 |
+
sequentially, they show continuous movement. Videos typically have a frame rate (e.g., 30 frames
|
|
|
|
| 290 |
per second or 60 frames per second), which determines how many frames are displayed per second.
|
| 291 |
Common video formats include MP4, AVI, and MOV.
|
| 292 |
</p>
|
| 293 |
</div>
|
| 294 |
""", unsafe_allow_html=True)
|
| 295 |
|
| 296 |
+
# Subheading 3: Why is an Image Called a Grid-Like Structure?
|
| 297 |
st.write("""
|
| 298 |
<div style="text-align: left; margin-top: 20px;">
|
| 299 |
+
<h3 style="color: #5b2c6f;">Why is an Image Called a Grid-Like Structure?🔲✨</h3>
|
| 300 |
<p style="font-size: 16px; color: #333;">
|
| 301 |
+
Images are called <strong>grid-like structures</strong> because they are composed of <strong>pixels</strong> arranged in rows and columns,
|
| 302 |
+
forming a rectangular grid. Each <strong>pixel</strong> contains information about <strong>shape</strong>, <strong>color</strong>, and <strong>patterns</strong>, which
|
| 303 |
together define the image's content.
|
| 304 |
+
The total number of <strong>pixels</strong> is determined by the image's height and width (resolution), and a higher resolution provides better clarity.
|
| 305 |
</p>
|
| 306 |
<p style="font-size: 16px; color: #333;">
|
| 307 |
+
In images, <strong>pixels</strong> act as features, and the entire grid represents a single data point. This combination
|
| 308 |
of features and data points gives images their grid-like nature.
|
| 309 |
</p>
|
| 310 |
<p style="font-size: 16px; color: #333;">
|
|
|
|
| 326 |
# Annotate the grid with pixel labels
|
| 327 |
for i in range(height):
|
| 328 |
for j in range(width):
|
| 329 |
+
ax.text(j, i, f'{grid[i, j]:.2f}', ha='center', va='center', fontsize=4) # Smaller fontsize
|
| 330 |
|
| 331 |
# Set axis labels and title
|
| 332 |
ax.set_title("Image as a Grid-Like Structure", fontsize=5) # Smaller title size
|