Question: 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;
 Magenta Chroma Key Start with example 1.1.2. Modify the program my

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

To modify the program as directed youll need to make some changes to detec... View full answer

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!