This device is not compatible.
You will learn to:
Implement a basic image compression algorithm.
Learn file handling for image data.
Manipulate image data using matrices.
Visualize image data using Python libraries.
Skills
Manipulating Colored Images
Image Compression
Image Visualisation
Prerequisites
Hands-on experience with Python
Basic understanding of file handling
Basic understanding of matrix operations
Basic understanding of compression algorithms
Technologies
NumPy
Python
Matplotlib
Project Description
We represent colored image data in the RGB format, in which we stack layers of red, green, and blue components of the image pixels to produce a colored image.
In the human eye, cones perceive chrominance, and rods perceive luminance. The human eye has more rods (about 91 million) than cones (about 4.5 million). Therefore, it is more sensitive to changes in brightness than chrominance. This allows the subsampling of the color component of the image by retaining the luminance and keeping the perceived quality of the image unchanged.
The RGB color space can be transformed to the YCbCr space, where the principal component Y is along the main diagonal of the RGB space, and the Cb and Cr components are orthogonal to it. This transformation separates the luminance and chrominance components of the image.
In this project, we will learn to compress image data by compromising the chrominance details since the human eye is less sensitive to it. This is achieved by transforming the RGB image to YCbCr and then subsampling the Cb and Cr components. We will use interpolation to reconstruct the compressed image. We will also examine the compression ratio achieved by this algorithm in terms of file size.
Project Tasks
Task 1: Import Libraries
Task 2: Read the Image File
Task 3: Pad the Image
Task 4: Transform the Image to YCbCr
Task 5: Subsample the Image Chrominance
Task 6: Write Image Data on a File
Task 7: Read and Adjust Image Dimensions from Encoded File
Task 8: Read File Data
Task 9: Interpolate the Chrominance Component
Task 10: Inverse-Transform the Image
Task 11: Evaluate Compression Ratio
Congratulations!
Relevant Courses
Use the following content to review prerequisites or explore specific concepts in detail.