Spaces:
Sleeping
Sleeping
Update pages/Data Collection.py
Browse files- pages/Data Collection.py +20 -9
pages/Data Collection.py
CHANGED
|
@@ -269,7 +269,7 @@ elif st.session_state.current_page == "explore_images_video":
|
|
| 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
|
| 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>,
|
|
@@ -282,7 +282,7 @@ elif st.session_state.current_page == "explore_images_video":
|
|
| 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
|
| 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
|
|
@@ -296,7 +296,7 @@ elif st.session_state.current_page == "explore_images_video":
|
|
| 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
|
| 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
|
|
@@ -346,15 +346,26 @@ elif st.session_state.current_page == "explore_images_video":
|
|
| 346 |
st.pyplot(fig)
|
| 347 |
|
| 348 |
st.write("""
|
| 349 |
-
|
| 350 |
-
|
| 351 |
-
|
| 352 |
-
|
| 353 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 354 |
</div>
|
| 355 |
""", unsafe_allow_html=True)
|
| 356 |
|
| 357 |
-
|
| 358 |
|
| 359 |
|
| 360 |
|
|
|
|
| 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>,
|
|
|
|
| 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
|
|
|
|
| 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
|
|
|
|
| 346 |
st.pyplot(fig)
|
| 347 |
|
| 348 |
st.write("""
|
| 349 |
+
<div style="text-align: left; margin-top: 20px;">
|
| 350 |
+
<h3 style="color: #5b2c6f;">What are Color Spaces?</h3>
|
| 351 |
+
<p style="font-size: 16px; color: #333;">
|
| 352 |
+
A <strong>color space</strong> is a technique used to represent the colors of an image in a numerical format. It allows us to preserve the color information while converting it into a form that machines can understand. Since machines cannot "see" images as humans do, they interpret numerical values. Therefore, color spaces are crucial for converting images into a format that can be processed by a machine.
|
| 353 |
+
</p>
|
| 354 |
+
<p style="font-size: 16px; color: #333;">
|
| 355 |
+
For example, when building a machine learning model to classify images of dogs and cats, we provide the model with images. However, the machine cannot directly understand these images. To help the machine "understand," we need to convert the image data into numbers. Color spaces play a key role here by transforming the colors in the image into numerical values.
|
| 356 |
+
</p>
|
| 357 |
+
<p style="font-size: 16px; color: #333;">
|
| 358 |
+
Color spaces are essential in image processing because they enable the machine to work with pixel data. These spaces help preserve the color information while making it computationally possible for the model to learn from the images and classify them accurately.
|
| 359 |
+
</p>
|
| 360 |
+
<h4 style="color: #5b2c6f;">Common Color Spaces</h4>
|
| 361 |
+
<ul style="font-size: 16px; color: #333;">
|
| 362 |
+
<li><strong>Black and White:</strong> This color space represents an image with just two colors—black and white. It is used to simplify images by focusing on brightness or contrast, often by removing color.</li>
|
| 363 |
+
<li><strong>Grayscale:</strong> Grayscale images use various shades of gray to represent the colors in an image. It has 256 levels, ranging from black to white, with different intensities of gray in between. This is often used in tasks where color is not needed.</li>
|
| 364 |
+
<li><strong>Red, Green, Blue (RGB):</strong> RGB is one of the most common color spaces in digital imaging. It represents colors by combining red, green, and blue light, with each channel having a value between 0 and 255. Different combinations of these three colors can produce various shades and tones.</li>
|
| 365 |
+
</ul>
|
| 366 |
</div>
|
| 367 |
""", unsafe_allow_html=True)
|
| 368 |
|
|
|
|
| 369 |
|
| 370 |
|
| 371 |
|