Question: Homework-3 Question 1 9 = 1 0 0 2 1 1 0 2 1 2 0 2 1 3 0 2 1 4 0 2

 Homework-3 Question 1 9 = 1 0 0 2 1 1

Homework-3 Question 1 9 = 1 0 0 2 1 1 0 2 1 2 0 2 1 3 0 2 1 4 0 2 fi = 1 0 2 f2 = 1 0 1 -1 Q1 Compute 91, h1, 92, where: 91 = fig, hu = fi*9, 92 = 1291 Q2 Compute a mask f such that: 92 = fg Question 2 Write a program that generates a gray-level image of 200 rows and 500 columns. Associate the value x = (255* i/499.0) with the pixel at row i and column j. Convert it to a gray level by rounding. How many distinct values are you able to detect in the image? (In your answer you need to submit only the number of distinct values that you are observing. Not the source code.) Question 3 Write a program that creates the negative image for a given image. Your program should do the following: Read an image. Display the input image. If the image is color, convert it into a gray level image. Display the gray level image. Compute the "negative" of the gray level image. Display the negative image. Write the negative image. You may want to write your program by modifying the example program "GrayImages.py". Homework-3 Question 1 9 = 1 0 0 2 1 1 0 2 1 2 0 2 1 3 0 2 1 4 0 2 fi = 1 0 2 f2 = 1 0 1 -1 Q1 Compute 91, h1, 92, where: 91 = fig, hu = fi*9, 92 = 1291 Q2 Compute a mask f such that: 92 = fg Question 2 Write a program that generates a gray-level image of 200 rows and 500 columns. Associate the value x = (255* i/499.0) with the pixel at row i and column j. Convert it to a gray level by rounding. How many distinct values are you able to detect in the image? (In your answer you need to submit only the number of distinct values that you are observing. Not the source code.) Question 3 Write a program that creates the negative image for a given image. Your program should do the following: Read an image. Display the input image. If the image is color, convert it into a gray level image. Display the gray level image. Compute the "negative" of the gray level image. Display the negative image. Write the negative image. You may want to write your program by modifying the example program "GrayImages.py

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!