Spaces:
Sleeping
Sleeping
Update pages/Data Collection.py
Browse files525 unmodified lines5265275285295305315325331 unmodified line535536537538539540541542543544545546547548549550551552553554555556557558559560561562563525 unmodified linesst.write("""- Represents only two colors: **Black (0)** and **White (255)**.- Used for simple image processing tasks where color isn't essential.- **Disadvantage**: It only preserves black and white, so other colors (like red, green, or brown) are completely lost.- 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).""")1 unmodified linest.markdown("<h3 style='text-align:; color: #4169E1;'>2. Grayscale</h3>", unsafe_allow_html=True)st.write("""- Extends black and white to include **256 shades of gray**.- Preserves brightness details but loses color information.- **Disadvantage**: If the image has colors like red, green, or brown, it cannot preserve those since grayscale only represents shades of gray.- 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.""")# Subheading for RGB color spacest.markdown("<h3 style='text-align:; color: #483D8B;'>3. RGB (Red, Green, Blue)</h3>", unsafe_allow_html=True)st.write("""- Combines three color channels: **Red**, **Green**, and **Blue**.- Each channel can represent **256 shades** (0-255).- By mixing different intensities of red, green, and blue, you can create over **16 million possible colors**.- This is the most commonly used color space for colored images and is widely used in digital displays, cameras, and image processing tasks.- 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).""")# Connecting the conceptsst.subheader("Key Differences Between 2D and 3D Arrays in Color Spaces")st.write("""- **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).- **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.""")# Basic Operations Sectionelif page =="Basic Operations":525 unmodified lines5265275285295305315321 unmodified line534535536537538539540541542543544545546547548549550551552553554525 unmodified linesst.write("""- Represents only two colors: **Black (0)** and **White (255)**.- **Limitation**: It only preserves black and white.- 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).""")1 unmodified linest.markdown("<h3 style='text-align:; color: #4169E1;'>2. Grayscale</h3>", unsafe_allow_html=True)st.write("""- 0 means **black** 1 means **white**- Values between 1-254 represent various shades of gray.- **Limitation**:- Gray Scale images cannot preserve coloured images as it is having only gray shades""")# Subheading for RGB color spacest.markdown("<h3 style='text-align:; color: #483D8B;'>3. RGB </h3>", unsafe_allow_html=True)st.write("""- To represent coloured image we have to convert image in 3D array , Mixture of three 2D arrays is **RGB**.- The value in each array ranges from R(0,255) ,G(0,255) ,B(0,255)- By mixing different intensities of red, green, and blue,we can create over **16 million possible colors**.""")# Basic Operations Sectionelif page =="Basic Operations":
pages/Data Collection.py+9-18