Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases Illuminated

Authors: Catherine M. Ricardo, Susan D. Urban, Karen C. Davis

4th Edition

1284231585, 978-1284231588

More Books

Students also viewed these Databases questions

Question

4. When is it appropriate to show grace toward others?

Answered: 1 week ago