TDM 30100: Project 8 — 2023
Motivation: Images are everywhere, and images are data! We will take some time to dig more into working with images as data in this series of projects.
Context: In the previous projects, we worked with images and implemented image Histogram Equalization, with some pretty cool results! In this project, we will continue to work with images key features, introduce YCbCr color space, and perform enhancing the image’s visual quality by histogram equalization technique with colors
Scope: Python, images, openCV, Histogram equalization, YCbCr, image digital fingerprint
Dataset(s)
The following questions will use the following dataset(s):
-
/anvil/projects/tdm/data/images/ballpit.jpg
As in our previous projects, by default, a image is read in as a
|
Questions
Question 1 (2 pts)
-
Please split
/anvil/projects/tdm/data/images/ballpit.jpg
into its `YCbCr`components and display them
To display the YCbCr Y component, you will need to set the Cb and Cr components to 127. To display the Cb component, you will need to set the Cr and Y components to 127, etc. |
The human eye is more sensitive to luminance than to color. As you can tell from the previous question, the Y component captures the luminance, and contains the majority of the image detail that is so important to our vision. The other Cb and Cr components are essentially just color components, and our eyes aren’t as sensitive to changes in those components. Luminance shows the brightness of an image. An RGB image can be converted to a YCbCr image. The histogram equalization then can apply to the luminance without impacting the color channels (Cb and Cr channels), which, if histogram equalization directly applies to an RGB image, it may cause image artifacts issues. "Artifacts issues" refers to unwanted distortion in an image. Let’s process some images in the following questions to makes this explicitly clear |
Question 2 (2 pts)
-
Please write a function named
equal_hist_rgb
to do Histogram Equalization directly to an image with RGB format. The parameter will be an image. The returns will be a Histogram Equalized colored image. Run the function with inputballpit.jpg
. Show the output Histogram Equalized colored image.
Question 3 (2 pts)
-
Please write a function named
equal_hist_YCrCb
that applies Histogram Equalization to an image, so that first the image will be converted from RGB format to YCrCb format, then apply Histogram Equalization. The parameter will be an image. The returns will be a Histogram Equalized colored image. Run the function with imageballpit.jpg
. Show the output Histogram Equalized colored image.
We can read a 3-chanel RGB image by both
|
Question 4 (2 pts)
-
Please plot the original image of
ballpit.jpg
, output images of it from question 2 and question 3 as a combined chart. What is your conclusion?
Project 08 Assignment Checklist
-
Jupyter Lab notebook with your codes, comments and outputs for the assignment
-
firstname-lastname-project08.ipynb
.
-
-
Submit files through Gradescope
Please make sure to double check that your submission is complete, and contains all of your code and output before submitting. If you are on a spotty internet connection, it is recommended to download your submission after submitting it to make sure what you think you submitted, was what you actually submitted. In addition, please review our submission guidelines before submitting your project. |