0% found this document useful (0 votes)
82 views

Assignment 2

Digital Image Processing: Assignment 2 contains two tasks. Task 1 involves watermarking a cameraman image by embedding a binary image of the student's name in the LSB and MSB. It requires creating the name image, converting it to binary, embedding it in the cameraman image randomly using randi, and displaying the original and watermarked images. Task 2 has the student select a character from their name using ginput, then create AND and OR masks to isolate and extract that character when applied to the original name image.

Uploaded by

Ahmad Osama
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
82 views

Assignment 2

Digital Image Processing: Assignment 2 contains two tasks. Task 1 involves watermarking a cameraman image by embedding a binary image of the student's name in the LSB and MSB. It requires creating the name image, converting it to binary, embedding it in the cameraman image randomly using randi, and displaying the original and watermarked images. Task 2 has the student select a character from their name using ginput, then create AND and OR masks to isolate and extract that character when applied to the original name image.

Uploaded by

Ahmad Osama
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Digital Image Processing: Assignment 2

Due date: 14/5/2023


Task 1: Create an m-file that do the following:

1. Create an image of size 100 × 100 that contains your name in paint program and save it as
‘watermark.png’.

2. Read ‘watermark.png’ image in Matlab and display it.


3. Convert ‘watermark.png’ image into binary using function im2bw.
4. Read a ‘cameraman.tif’ image.
5. Save the binary image into the Least Significant bit (LSB) of cameraman image randomly
using the randi function as the following example:
randi(M) that return one value from 1 to M.
Store the modified image in a new image.
Old version of matlab: ceil(rand*256);
6. Save the binary image into the Most Significant bit (MSB) of img randomly using the randi
function.
7. Display the original image with the two watermarked images.

Task 2:

1. Read the ‘watermark.png’ image created in Task 1 that has your name.
2. Create OR and AND masks image (type : uint8) that have the same size of watermark.png’.
3. Use [x,y] = ginput(2) to get the coordinate of any character from your name using the mouse
cursor.
1. Fill the masks with the appropriate values to display the chosen character in the previous
step.
2. Apply AND and OR operations between the original image and the mask.

You might also like