2019 Quiz 2 - Solutions

.pdf

School

Western University *

*We aren’t endorsed by this school

Course

9201

Subject

Mechanical Engineering

Date

Dec 6, 2023

Type

pdf

Pages

4

Uploaded by PresidentThunderMoose7

Report
ECE4445 / MBP4445 / ECE9201 / ECE9021 / BME9509 / MBP9509 2019 - Page 1/4 Last name: Solutions First name: Student number: Course Code: ECE4445 / MBP4445 / ECE9201 / ECE9021 / BME9509 / MBP9509 INTRODUCTION TO DIGITAL IMAGE PROCESSING: QUIZ 2 INSTRUCTIONS Print your name and student number at the top of each page in the space provided. ***** Please indicate the course code in which you are registered. ***** Closed book. All calculators are allowed but be prepared to show that the memory is empty. Write answers in the space indicated in each question. 1. [3 marks] Table I gives the histogram H A ( D A ) of a digital image A ( i , j ). Using the algorithm presented in class, design a point operation that equalizes the image’s histogram to produce an output image B ( i, j ). Specify the point operation by creating and filling in Table II below that relates gray levels in the input image, D A , to those in the output, D B . Show all work in the space below Tables I and II. State any formulae you used, including how constants in the formulae were determined. Table I Table II D A H A ( D A ) D A D B 0 (black) 1,000 0 (black) 1 0 1 2 1,000 2 3 (white) 0 3 (white) Solution: D A H A 𝑆 = ∑ 𝐻 𝐴 (𝑖) 𝐷 𝐴 𝑖=0 D m /A 0 x S D B 0 1000 1000 1.5 2 1 0 1000 1.5 2 2 1000 2000 3.0 3 3 0 2000 3.0 3 where D m = 3, 𝐴 0 = ∑ 𝐻 𝐴 (𝑖) = 1000 + 0 + 1000 + 0 = 2000 3 𝑖=0 This question is similar to that from the lecture on October 3 (slide 6). I had told the class that this would be tested with different numer- ical values.
ECE4445 / MBP4445 / ECE9201 / ECE9021 / BME9509 / MBP9509 2019 - Page 2/4 Last name: Solutions First name: Student number: Course Code: 2. [7 marks] Table III gives the histogram, H 1 ( D 1 ), of a 3-bit digital image (IMAGE 1) with gray levels D 1 = 0, 1, …, 7. Table IV gives the histogram, H 2 ( D 2 ), of a second 3-bit image (IMAGE 2). Design a point operation that will match the histogram of IMAGE 1 to that of IMAGE 2. Specify the point operation by filling in Table V that provides a value of D 2 that each value of D 1 maps to. In the space below Tables III, IV and V, show all work, and explicitly state what you are doing. State rules you used when inverting any functions. Use the reverse side of this page if you need more space. Table III Table IV Table V D 1 H 1 ( D 1 ) D 2 H 2 ( D 2 ) D 1 D 2 0 (black) 0 0 (black) 0 0 1 4016 1 2470 1 2 2954 2 2536 2 3 1630 3 1953 3 4 800 4 1337 4 5 368 5 858 5 6 162 6 529 6 7 (white) 70 7 (white) 317 7 Step 1) Equalize Image 1 to get Image 3: D m = 7 A 0 = 10000 D 1 H 1 𝑆 = ∑ 𝐻 1 (𝑖) 𝐷 1 𝑖=0 D m /A 0 x S D 3 0 0 0 0 0 1 4016 4016 2.8 3 2 2954 6970 4.9 5 3 1630 8600 6.0 6 4 800 9400 6.6 7 5 368 9768 6.8 7 6 162 9930 6.95 7 7 70 10000 7 7 Step 2) Equalize Image 2 to get Image 3: D m = 7 A 0 = 10000 D 2 H 2 𝑆 = ∑ 𝐻 2 (𝑖) 𝐷 2 𝑖=0 D m / A 0 x S D 3 0 0 0 0 0 1 2470 2470 1.7 2 2 2536 5006 3.5 4 3 1953 6954 4.9 5 4 1337 8296 5.8 6 5 858 9154 6.4 6 6 529 9683 6.8 7 7 317 10000 7 7
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