👁️Computer Vision and Image Processing Unit 1 – Image Formation and Representation
Image formation and representation are foundational concepts in computer vision. They involve capturing light from a scene and converting it into a digital format, represented as a 2D matrix of pixels with specific color or intensity values.
Key aspects include color models, image sampling, quantization, and file formats. Understanding these concepts is crucial for various applications, from medical imaging to computer vision tasks, enabling the manipulation and analysis of visual information in digital form.
Image formation involves capturing light from a scene and converting it into a digital representation
Digital images are represented as a 2D matrix of pixels, each with a specific color or intensity value
Color models (RGB, CMYK, HSV) define how colors are represented and combined in digital images
Image sampling determines the spatial resolution of an image by measuring the number of pixels per unit area
Quantization assigns discrete intensity values to each pixel, affecting the image's color depth and file size
Image file formats (JPEG, PNG, TIFF) specify how image data is stored, compressed, and exchanged
Image enhancement techniques (contrast adjustment, noise reduction, sharpening) improve visual quality and highlight features
Practical applications of image processing include medical imaging, surveillance, remote sensing, and computer vision tasks
Image Formation Process
Image formation captures light from a 3D scene and projects it onto a 2D plane
The process involves a camera or imaging device with a lens and an image sensor (CCD or CMOS)
Light rays from the scene pass through the lens and are focused onto the image sensor
The lens controls the amount of light entering the camera through its aperture and focal length settings
Aperture size affects depth of field and exposure
Focal length determines the angle of view and magnification
The image sensor consists of a grid of light-sensitive elements called photosites or pixels
Each photosite converts the incoming light into an electrical signal proportional to the light intensity
The electrical signals are then processed by the camera's image processing unit to generate a digital image
Digital Image Representation
A digital image is a 2D matrix of picture elements called pixels
Each pixel represents a small area of the image and has a specific color or intensity value
The spatial resolution of an image is determined by the number of pixels in the matrix (width × height)
Higher resolution images have more pixels and can capture finer details
Lower resolution images have fewer pixels and may appear pixelated or blurry
The color depth or bit depth of an image determines the number of possible color or intensity values for each pixel
Common color depths include 8-bit (256 values), 16-bit (65,536 values), and 24-bit (16.7 million values)
Grayscale images have pixels with intensity values ranging from black (lowest) to white (highest)
Color images have pixels with a combination of color components (red, green, blue) or color channels
Color Models and Spaces
Color models define how colors are represented and combined in digital images
The RGB (Red, Green, Blue) model is commonly used for display devices and digital cameras
Each pixel has three color components (red, green, blue) with values ranging from 0 to 255
Colors are created by combining different intensities of red, green, and blue light
The CMYK (Cyan, Magenta, Yellow, Key/Black) model is used for printing and subtractive color mixing
The HSV (Hue, Saturation, Value) model represents colors based on their hue, saturation, and brightness
Hue describes the dominant wavelength of the color (0-360 degrees on a color wheel)
Saturation indicates the purity or intensity of the color (0-100%)
Value represents the brightness or lightness of the color (0-100%)
Other color spaces include Lab, YCbCr, and XYZ, which are used for specific applications or color management systems
Image Sampling and Quantization
Image sampling is the process of measuring the spatial resolution of an image
It determines the number of pixels per unit area (pixels per inch or dots per inch)
Higher sampling rates result in higher spatial resolution and more detailed images
Lower sampling rates lead to lower spatial resolution and potential loss of information
Quantization is the process of assigning discrete intensity or color values to each pixel
It maps the continuous range of light intensities to a finite set of discrete values
The number of quantization levels determines the color depth or bit depth of the image
More quantization levels allow for a wider range of colors or intensities
Fewer quantization levels result in a smaller color palette and potential banding artifacts
The trade-off between sampling rate and quantization levels affects image quality, file size, and processing requirements
Image File Formats
Image file formats specify how image data is stored, compressed, and exchanged
JPEG (Joint Photographic Experts Group) is a lossy compression format widely used for photographs
It achieves high compression ratios by discarding high-frequency information and using DCT-based compression
JPEG is suitable for images with smooth color transitions but may introduce compression artifacts at high compression levels
PNG (Portable Network Graphics) is a lossless compression format that supports transparency
It uses a combination of filtering and DEFLATE compression to reduce file size without losing quality
PNG is suitable for images with sharp edges, text, or graphics but may result in larger file sizes compared to JPEG
TIFF (Tagged Image File Format) is a flexible format that supports both lossy and lossless compression
It can store multiple images, layers, and metadata within a single file
TIFF is commonly used in professional photography and publishing workflows
Other formats include GIF (Graphics Interchange Format), BMP (Bitmap Image File), and RAW (camera-specific formats)
Image Enhancement Techniques
Image enhancement techniques improve the visual quality and interpretability of digital images
Contrast enhancement adjusts the distribution of pixel intensities to increase the dynamic range and visibility of details
Histogram equalization redistributes pixel intensities to achieve a more uniform distribution
Contrast stretching expands the range of intensities to occupy the full available range
Noise reduction techniques remove or suppress unwanted distortions and artifacts in the image
Gaussian filtering applies a weighted average to neighboring pixels to smooth out noise
Median filtering replaces each pixel with the median value of its local neighborhood
Sharpening techniques emphasize edges and fine details in the image
Unsharp masking subtracts a blurred version of the image from the original to highlight edges
High-pass filtering accentuates high-frequency components and suppresses low-frequency components
Color correction methods adjust the color balance, saturation, and hue of an image to achieve a desired appearance
Image enhancement techniques can be applied globally to the entire image or locally to specific regions of interest
Practical Applications
Medical imaging uses image processing techniques to visualize and analyze anatomical structures and pathologies
X-ray, CT, MRI, and ultrasound images are enhanced to improve diagnostic accuracy and treatment planning
Surveillance and security systems rely on image processing for object detection, tracking, and recognition
Facial recognition, license plate detection, and anomaly detection are common applications
Remote sensing and satellite imagery employ image processing for Earth observation and environmental monitoring
Multispectral and hyperspectral imaging techniques are used for land cover classification, vegetation analysis, and change detection
Computer vision tasks such as object recognition, segmentation, and depth estimation heavily rely on image processing algorithms
Convolutional neural networks (CNNs) and deep learning models are trained on large datasets of images to learn hierarchical features and patterns
Image processing is also applied in fields like astronomy (image stacking, artifact removal), forensics (image enhancement, forgery detection), and industrial inspection (defect detection, quality control)