Task1: 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 using imshow.
3. Convert ‘watermark.png’ image into binary
using function im2bw.
4. Read a ‘rice.png image.
5. Save the binary image into the Least
Significant bit (LSB) of rice 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: Create another m-file that
1. Read ‘coins.png’ image.
2. Create a mask image (type : uint8) that have
the same size of ‘coins.png’.
3. Use [x,y] = ginput(2) to get the coordinate of
any coin using the mouse cursor.
4. Fill the mask with the appropriate
values.
5. Apply Multiplication operations between the
original image and the mask.
Task1: Create an m-file that do the following: 1. Create an image of size 100 × 100 that contains your name in paint
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am