Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Use the FDR to design and write a function called bhFilter. The function takes an image as input parameter and converts each pixel as follows:

image text in transcribed
Use the FDR to design and write a function called "bhFilter". The function takes an image as input parameter and converts each pixel as follows: red is changed to 1.5 times its original value but will not exceed 255 (e.g. a red value of 200 would change to 255, not 300). green is changed to 55 minus its original value but will not be below 0 (e.g. a green value of 60 would change to 0, not-5). blue is changed to 0.5 times the original red value Now, use the FDR to design and write a test function called "test_bhFilter", that tests bhFilter as per the approach used in the project. Finally write a script to test bhFilter two ways: (1) using your test function and (2) using an actual image. Proper indentation, syntax, type annotations, and comments are required for full marks All the code you write will be in one file, in the order listed above. You may assume that the usual test images, Cimpl.py, and unit_testing.py are in the same folder as the file that you are writing. Use the FDR to design and write a function called "bhFilter". The function takes an image as input parameter and converts each pixel as follows: red is changed to 1.5 times its original value but will not exceed 255 (e.g. a red value of 200 would change to 255, not 300). green is changed to 55 minus its original value but will not be below 0 (e.g. a green value of 60 would change to 0, not-5). blue is changed to 0.5 times the original red value Now, use the FDR to design and write a test function called "test_bhFilter", that tests bhFilter as per the approach used in the project. Finally write a script to test bhFilter two ways: (1) using your test function and (2) using an actual image. Proper indentation, syntax, type annotations, and comments are required for full marks All the code you write will be in one file, in the order listed above. You may assume that the usual test images, Cimpl.py, and unit_testing.py are in the same folder as the file that you are writing

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_2

Step: 3

blur-text-image_3

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

Build It For The Real World A Database Workbook

Authors: Wilson, Susan, Hoferek, Mary J.

1st Edition

0073197599, 9780073197593

More Books

Students also viewed these Databases questions

Question

How does clustering in unsupervised learning help in data analysis?

Answered: 1 week ago