Pre Pt.1
Introduction to Image Processing
- Importance of learning image processing in engineering
- Practical applications: advertising, movies, social media
Historical Context
- First digital image captured: 1896 by Wilhelm Röntgen
- Subject: X-ray image of his wife's hand
- Use of high-energy X-rays to capture images
Digital Images as Mathematical Matrices
- Digital images are composed of pixels, which encode light intensity
- Matrices represent these pixels mathematically
- Grayscale Images:
- Represented as 2D matrices
- Minimum pixel value: 0 (black), Maximum pixel value: 1 (white)
- Values between 0 and 1 represent varying shades of gray
- Each pixel specified by row (i) and column (j) indices
Color Images and RGB Representation
- Color images more complex than grayscale images
- RGB color model: Red, Green, Blue
- Color mixing:
- Red + Green = Yellow
- Blue + Green = Cyan
- Red + Blue = Magenta
- Red + Green + Blue = White
- Mathematics of Color Images:
- Color images represented as 3D matrices
- Three values needed for each pixel: Red intensity, Green intensity, Blue intensity
- Each pixel specified by indices (i, j) and additional color layer index (k)
- k = 1 (Red), k = 2 (Green), k = 3 (Blue)
Color Depth and Number of Colors
- Digital data stored in binary format (base 2)
- Bits = 0 or 1; 8 bits = 1 byte
- A byte allows storage of 256 distinct values (0-255)
- For a color pixel, each RGB component is stored in 1 byte
- Therefore, total possible colors = 256 (Red) x 256 (Green) x 256 (Blue) = 16,777,216 possible colors
Image Manipulation Example
- Converting color images to grayscale
- Average red, green, and blue intensities to collapse a 3D matrix into a 2D matrix
- Example of swapping colors in images: Mario (Red) and Luigi (Green)
- Objective: Program to swap clothes using color image matrix manipulation techniques
Conclusion and Next Steps
- A review of how digital images are represented in matrices
- Future classes will focus on image manipulation techniques in MATLAB
- Practical exercises to reinforce understanding of image processing concepts.