Answered step by step
Verified Expert Solution
Question
1 Approved Answer
In MATLAB write a script that allows the user to load an image and accepts a string from the user to embed in the image.
In MATLAB write a script that allows the user to load an image and accepts a string from the user to embed in the image. Take the string, convert it to binary and place the information in the image. Then display the image to the user with the hidden message.
Hint: The indexing may look like c(s.1:8) when building your blank matrix. You may also need this: a 01100001 n 01101110 b 01100010 o 01101111 c 01100011 p 01110000 d 01100100 q 01110001 e 01100101 r 01110010 f 01100110 8 01110011 g 01100111 t 01110100 h 01101000 u 01110101 i 01101001 01110110 j 01101010 w 01110111 k 01101011 01111000 l 01101100 y 01111010 m Plan the script as follows:
ask user for the image file name
read the image into MATLAB using 'imread'
search the image for existing values equal to zero and replace them with ones
ask the user for the message to embed
recall that a string is a vector. Use a 'switch' statement to convert the string value to binary. Post these values into another zeros matrix that is the same size as the image. Put each letter in the string on a new row
Then scan the matrix for values of 1 and set the corresponding points in the image to zero (black). Remember your image file is 3 layers deep: RGB( 1st red, 2nd green, and 3rd blue
Thanks in advance!
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started