hari3485 commited on
Commit
783fb2f
·
verified ·
1 Parent(s): 69b5222

Update pages/Data Collection.py

Browse files
Files changed (1) hide show
  1. pages/Data Collection.py +9 -18
pages/Data Collection.py CHANGED
@@ -526,8 +526,7 @@ def image_details_page():
526
 
527
  st.write("""
528
  - Represents only two colors: **Black (0)** and **White (255)**.
529
- - Used for simple image processing tasks where color isn't essential.
530
- - **Disadvantage**: It only preserves black and white, so other colors (like red, green, or brown) are completely lost.
531
  - For example, by using the image's width and height (rows and columns), we can create a **2D array** where each pixel is represented by either 0 (black) or 255 (white).
532
  """)
533
 
@@ -535,29 +534,21 @@ def image_details_page():
535
  st.markdown("<h3 style='text-align:; color: #4169E1;'>2. Grayscale</h3>", unsafe_allow_html=True)
536
 
537
  st.write("""
538
- - Extends black and white to include **256 shades of gray**.
539
- - Preserves brightness details but loses color information.
540
- - **Disadvantage**: If the image has colors like red, green, or brown, it cannot preserve those since grayscale only represents shades of gray.
541
- - After converting an image to grayscale, each pixel can take values from 0 (black) to 255 (white), with every intermediate value representing a shade of gray.
542
  """)
543
 
544
  # Subheading for RGB color space
545
- st.markdown("<h3 style='text-align:; color: #483D8B;'>3. RGB (Red, Green, Blue)</h3>", unsafe_allow_html=True)
546
 
547
  st.write("""
548
- - Combines three color channels: **Red**, **Green**, and **Blue**.
549
- - Each channel can represent **256 shades** (0-255).
550
- - By mixing different intensities of red, green, and blue, you can create over **16 million possible colors**.
551
- - This is the most commonly used color space for colored images and is widely used in digital displays, cameras, and image processing tasks.
552
- - In RGB color space, each pixel is represented by three values, one for each channel (Red, Green, Blue). The image is represented as a **3D array** where each pixel has three values (R, G, B).
553
  """)
554
 
555
- # Connecting the concepts
556
- st.subheader("Key Differences Between 2D and 3D Arrays in Color Spaces")
557
- st.write("""
558
- - **2D Arrays**: Used in Black and White or Grayscale color spaces. Each pixel is represented by a single value (black/white or a shade of gray).
559
- - **3D Arrays**: Used in RGB color space, where each pixel is represented by three values (Red, Green, Blue), forming a 3D structure of the image.
560
- """)
561
 
562
  # Basic Operations Section
563
  elif page =="Basic Operations":
 
526
 
527
  st.write("""
528
  - Represents only two colors: **Black (0)** and **White (255)**.
529
+ - **Limitation**: It only preserves black and white.
 
530
  - For example, by using the image's width and height (rows and columns), we can create a **2D array** where each pixel is represented by either 0 (black) or 255 (white).
531
  """)
532
 
 
534
  st.markdown("<h3 style='text-align:; color: #4169E1;'>2. Grayscale</h3>", unsafe_allow_html=True)
535
 
536
  st.write("""
537
+ - 0 means **black** 1 means **white**
538
+ - Values between 1-254 represent various shades of gray.
539
+ - **Limitation**:
540
+ - Gray Scale images cannot preserve coloured images as it is having only gray shades
541
  """)
542
 
543
  # Subheading for RGB color space
544
+ st.markdown("<h3 style='text-align:; color: #483D8B;'>3. RGB </h3>", unsafe_allow_html=True)
545
 
546
  st.write("""
547
+ - To represent coloured image we have to convert image in 3D array , Mixture of three 2D arrays is **RGB**.
548
+ - The value in each array ranges from R(0,255) ,G(0,255) ,B(0,255)
549
+ - By mixing different intensities of red, green, and blue,we can create over **16 million possible colors**.
 
 
550
  """)
551
 
 
 
 
 
 
 
552
 
553
  # Basic Operations Section
554
  elif page =="Basic Operations":