Assignment_1 (3)

pdf

School

Drexel University *

*We aren’t endorsed by this school

Course

583

Subject

Electrical Engineering

Date

Feb 20, 2024

Type

pdf

Pages

14

Uploaded by CaptainMantisMaster961

Report
Computer Vision Assignment 1 - Pixel Operations Fall 2023 Meet Mukeshbhai Sakariya Student id: 14473322 1 (20pts) Theory Questions 1. Based on observing a histogram perhaps we decided to create the following pixel intensity map- pings in order to stretch the values of a particularly compressed area (you may assume the full range is [0,255]): [0,10] [0,100] (10,200] (100,150] (200,255] (150,255] (a) (5pts) Draw a 2D graph showing these mappings. The x-axis will be the input values and the y-axis will be the output values. (b) (10pts) What are the equations for these mappings? (c) (2pt) Given a value of 50, what will this value be mapped to? (d) (3pts) In your own words, describe the effect of this mapping. Solution: 1
2
3
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
4
5
6
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
2 Dataset For the programming component of this assignment, you may use a color image of your choosing. Make sure that you include your image with your submission so that we can recreate your results. In each of the following sections you’ll be asked to output images. The images will also be included in your report. Solution: Figure 1: Image taken 7
3 (20pts) RGB Grayscale The first point-processing thing we want to be able to do is to convert an image from color to grayscale. Read in your color image and use the following formula to convert it to a grayscale image. You may not use a built-in function to do this (i.e rgb2gray). Gray = 0 . 2989 R + 0 . 5870 G + 0 . 1140 B (1) Solution: Figure 2: Original RGB Image Figure 3: Grayscale Image 8
4 (20pts) RGB Binary In this part, we want to be able to convert your color image into a binary image, where each pixel is either black or white. To do this, first convert your image to grayscale (using what you did in the previous part), then produce three binary images, one for each of the following thresholds (as percentages of maximum possible intensity value): t=25% t=50% t=75% Solution: Figure 4: Original RGB Image Figure 5: t=25% 9
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Figure 6: t=50% Figure 7: t=75% 10
5 (20pts) Gamma Correction In this part, we want to apply some gamma correction to your image. Making sure that your RGB values are in the range [0 , 1], apply gamma correction to each channel (independently) via the formula s = r γ (we’ll let c = 1). Do this for each of the following values of gamma (producing three images): γ = 0 . 2 γ = 1 γ = 50 Solution: Figure 8: Original Image with increased intensity Figure 9: γ =0.2 11
Figure 10: γ =1.0 Figure 11: γ =50.0 12
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
6 (20 points) Histograms Histograms are a critical analysis tool use for many computer vision problems. Display four his- tograms for your image, each of which have 256 bins. You may not use a built-in function to obtain the histogram . To plot your histogram, use the bar function of Matlab. Grayscale histogram Histogram of the red channel Histogram of the green channel Histogram of the blue channel. Solution: Figure 12: Grayscale Histogram Figure 13: Red Histogram 13
Figure 14: Green Histogram Figure 15: Blue Histogram 14