shwetashweta05's picture
Update pages/Image.py
928e43c verified
import streamlit as st
import pandas as pd
st.subheader(":red[**Image**]")
st.write("Image- an image is a two-dimensional array of values representing visual information. These values are known as pixels, where each pixel corresponds to a small point in the image and contains data about its color and intensity.")
st.write(":blue[**Types of Images**]")
st.write("""
**1.Raster Images:** Composed of pixels, commonly used in photography and screen displays.
- Examples: JPEG, PNG, GIF.
**2.Vector Images:** Defined by mathematical equations, scalable without losing quality.
- Examples: SVG, EPS.
""")
st.write(":blue[**Properties of Images**]")
st.write("""
**1.Resolution:** The number of pixels in an image, determining its clarity (e.g., 1920x1080 pixels).
**2.Color Depth:** The number of bits used to represent the color of a single pixel, affecting the range of colors.
**3.Format:** The file type used to store the image (e.g., JPG, PNG, BMP).
**4.Dimensions:** The width and height of the image, measured in pixels.
""")
st.write(":blue[**How Images Are Represented Digitally**]")
st.write("""
**1.Grayscale Images:** Pixels are represented by a single intensity value (0–255 for 8-bit images).
**2.Color Images:** Pixels contain three intensity values for the Red, Green, and Blue (RGB) color channels.
**3.Binary Images:** Each pixel is either black or white (0 or 1).
""")
st.write(":blue[**Applications of Images**]")
st.write("""
**1.Communication:** Used in social media, advertising, and journalism to convey messages visually.
**2.Medical Imaging:** Tools like X-rays, CT scans, and MRIs rely on image processing.
**3.Computer Vision:** Enables facial recognition, autonomous vehicles, and object detection.
**4.Art and Design:** Images are central to creative industries like graphic design, animation, and film.
""")
st.subheader(":red[**What do you mean by color space explain?**]")
st.write(":blue[**Color Space-**] A color space is a specific organization of colors that allows for consistent representation and interpretation of colors in digital images, physical prints, and other mediums. It provides a mathematical model to describe colors using numerical values.Color spaces are essential in fields like digital imaging, computer vision, and graphic design, as they help standardize how colors are captured, displayed, and reproduced across different devices.")
st.write(":blue[**Types of Color Spaces**]")
st.write("""
**1.RGB (Red, Green, Blue):**
- Description: A color model used primarily in digital screens where colors are created by combining varying intensities of red, green, and blue light.
- Applications: Computer monitors, TVs, cameras.
- Range: Additive color model; black (0,0,0) and white (255,255,255).
**2.CMYK (Cyan, Magenta, Yellow, Black):**
- Description: A subtractive color model used for printing, where colors are formed by subtracting light using ink.
- Applications: Printers and publishing.
- Range: Uses percentages for each color channel (e.g., 100% cyan).
**3.HSV (Hue, Saturation, Value):**
- Description: Represents colors in terms of hue (type of color), saturation (intensity), and value (brightness).
- Applications: Image editing, color selection tools.
- Advantages: Easier for humans to interpret and adjust.
**4.HSL (Hue, Saturation, Lightness):**
- Description: Similar to HSV, but lightness replaces value to describe the brightness.
- Applications: Graphics software, web design.
**5.LAB (CIE-Lab):**
- Description: A perceptually uniform color space designed to approximate human vision. It includes:
- L: Lightness.
- a: Green-to-red spectrum.
- b: Blue-to-yellow spectrum.
- Applications: Color correction, advanced image processing.
**6.YCbCr (Luminance, Chrominance):**
- Description: Separates an image into luminance (brightness) and chrominance (color) components.
- Applications: Video compression, broadcasting (used in JPEG, MPEG).
""")
st.subheader(":red[**Why Do We Use Different Color Spaces?**]")
st.write("""
**1.Device Compatibility:** Different devices (screens, printers, cameras) require different color models to display or produce colors accurately.
**2.Efficiency:** Some color spaces are better suited for specific tasks (e.g., CMYK for printing, YCbCr for compression).
**3.Human Perception:** Models like HSV and LAB align closely with how humans perceive colors, making them useful for adjustments and analysis.
""")
st.write(":blue[**Choosing the Right Color Space**]")
st.write("""
**1.RGB:** For digital displays and web-based projects.
**2.CMYK:** For print media.
**3.HSV/HSL:** When working with color adjustments in software.
**4.LAB:** For accurate color corrections and advanced processing.
**5.YCbCr:** For video encoding and compression.
""")
if st.button("**Image augmentation**"):
st.switch_page("pages/Image augmentation")