Write a program in MATLAB that takes 5 inputs, in the following order -A string
ID: 3819069 • Letter: W
Question
Write a program in MATLAB that takes 5 inputs, in the following order
-A string that is the file location of an image, as in ‘dogeBlank.jpg’
-A string that is the file location of a .csv file, as in ‘hiddenText.csv’
-A string that is either ‘red’, ‘green’, or ‘blue’
-A Boolean for taking the negative of the image
-A Boolean for taking the negative of the hidden message
Your program should do the following in a single function:
1)Read in the image file and store the image in a variable.
2)Read in the csv file and store the resulting matrix in a variable.
3)Convert the matrix from the csv file into a uint8.
4)Replace the given color in the image with the hidden message.
5)Return the resulting combination as an output.
Explanation / Answer
IMfilename=‘dogeBlank.jpg’;
CSVfilename=‘hiddenText.csv’;
B={'red','green','blue'};
IM = imcomplement(IMfilename) %negative of image
L=logical(hiddenMessage);
1)A=imread(IMfilename);
2)M=csvread(CSVfilename);
3)C=Unit8(M);
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.