Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In Matlab Task 8 (20 points) Color swap: replace pixels of one color with another color, with some leniency function [ outImg ] color swap

image text in transcribedIn Matlab

Task 8 (20 points) Color swap: replace pixels of one color with another color, with some leniency function [ outImg ] color swap ( inImg, rl, gl, bl, r2, g2, b2, allowed) This function will create a new image outImg by swapping pixels of one color (defined by rl, g1, b1) with another color (defined by r2, g2, b2). When we did this example in class, we noticed it is hard to find many pixels of purely one exact color. Use the input variable allowed for setting the leniency criteria. For example, for r1-255, g1-0, b1-0 and allowed 10, every pixel with a red value above 245 and green and blue values below 10 should be changed to the RGE values specified by r2, g2, b2) Make sure the values entered by the user for rl, gl, bl, r2, g2, b2, allowed are within the boundaries for image intensities. Also, check that they are positive values. If they are not, display appropriate error messages and request the input of new values Choosing the Color Swap menu button should result in: a. Asking the user to input values for rl, gl, bl, r2, g2, b2, allowed, followed by a call to the color swap function, with the current image and the values of rl, gl, bl, r2, g2, b2, allowed as inputs. b. Displaying the original image and the resulting image, side by side (use subplots) c. Saving the resulting image

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

Beginning Databases With PostgreSQL From Novice To Professional

Authors: Richard Stones, Neil Matthew

2nd Edition

1590594789, 978-1590594780

More Books

Students also viewed these Databases questions

Question

Name two strengths and two weaknesses of brand placement.

Answered: 1 week ago

Question

3. Evaluate a Web-based training site.

Answered: 1 week ago

Question

How many Tables Will Base HCMSs typically have? Why?

Answered: 1 week ago

Question

What is the process of normalization?

Answered: 1 week ago