i have a question given for me.in that the objective is to encrypt the image to some noise and at last have to get 50% black shade on that image.i have done till the encryption.can anyone tell me how to get 50% darkshade in it.
clc;
clear all;
close all;
a=imread('lenna.jpg');
%figure,imshow(a);
b=rgb2gray(a);
figure,imshow(b);
c=double(b);
%figure,imshow(c);
d=randn(512,512);
e=exp(2*pi*i*d);
f=c.*e;
%figure,imshow(f);
g=fft2(f);
h=randn(512,512);
s=exp(2*pi*i*h);
j=g.*s;
k=fft2(j);
figure,imshow(k);
here k is the encrypted image.now what i need is to change this image 50% to black colour.the image is 512px.can anyone help?