Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Magenta Chroma Key Start with example 1 . 1 . 2 . Modify the program my reading in angryFigurineMagenta. mat, rather than angryFigurine.mat. Adjust the

Magenta Chroma Key
Start with example 1.1.2.
Modify the program my reading in angryFigurineMagenta. mat, rather than angryFigurine.mat.
Adjust the program's logic to replace magenta pixels with pixels are red. Create a new varaible magentaExtract that contains a mask showing where pixels are magenta )=(1 or another color )=(0. Correct ouput will produce:
\table[[Figure 1],[File Edit View Insert Tools Desktop Window Help]]
Hint: Magenta pixels will have red and blue pixels with values >0.8255
Hint: Remember the Helpl channel in MS Teams
Script 0
Save
Reset
MATLAB Documentation
3% TODO Remeber the class help channel!
98 TODO Probably need a change here!
load angryfigurine % Assumes image is stored in. mat file and accessible from command window
8. Extract RGB layers from color image:
redLayer = angryFigurine (:,:,1) :
greenLayer = angryFigurine (:,:,2);
blueLayer = angryFigurine (:,:,3);
% Set threshold to detect the mostly green pixels:
greenExtract greenLayer >0.8**255 the 0.8 threshold value decides which pixels are "green"
S4 TODO need to add logic here that detects magenta pixels
84 TODO probably need a change herel
% TODO magentaExtract =dots
Identify pixel positions that are mostly green:
extractLogicaLArray = greenExtract;
88 TODO set the pixels of interest to red, rather than white
% TODO remember to update the comments!
is Set the color of the pixel mostly green pixels to white )=(255,255,255 :
redLayer(extractLogicaLArray)=255;, & maximize red component of the identified pixels
greenLayer(extractLogicalArray)=255; maximize green component of the identified pixels
blueLayer(extractLogicalArray)=255; s maximize blue component of the identified pixels
% Create modified color image:
FigureMod (:,:,1)= redLayer:
FigureMod (:,2,2)= greenLayer;
image text in transcribed

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

DNA Databases

Authors: Stefan Kiesbye

1st Edition

0737758910, 978-0737758917

More Books

Students also viewed these Databases questions