-
Notifications
You must be signed in to change notification settings - Fork 2
/
main.m
59 lines (55 loc) · 3.31 KB
/
main.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
% Main fuction - Execute both Encryption and Decryption Function
%------------------------------------------------------------------------------------------------------------------------------------------
% Note: If you are using our code for your system or project, you should always cite our paper as a reference.
web('https://docs.google.com/document/d/1AbCxFoUhdOCppM8novgCdOv0F9mqYe7HlBU7yX7Svx0/edit?usp=sharing')
web('published_work.html')
%--------------------------------------------------------------------------------------------------------------------------------------
% Encryption
%--------------------------------------------------------------------------------------------------------------------------------------
%DEMO:
%a=imread('lena.png'); % Input your image
% Decompose in to R,G,B
%R=a(:,:,1);
%G=a(:,:,2);
%B=a(:,:,3);
%------------------------------------------------------------------------------------------------------------------------------------
% Input your R,G,B components
%--------------------------------------------------------------------------------------------------------------------------------------
p= ; %R
q= ; %G
s= ; %B
%-------------------------------------------------------------------------------------------------------------------------------------
% Reading size of the input image
%--------------------------------------------------------------------------------------------------------------------------------------
siz=size(p);
siz=siz(1);
k=Encry_DMA(p,q,s,siz);
%--------------------------------------------------------------------------------------------------------------------------------------
% NOTE : If you only need Encryption then you can call the fuction
% Encry_DMA(p,q,s) directly instead of using main function
%--------------------------------------------------------------------------------------------------------------------------------------
% Decryption
%--------------------------------------------------------------------------------------------------------------------------------------
% DEMO:
% m=imread('cipher.png'); % Input cipher your image
m=k;
% Decompose in to R,G,B
% R=m(:,:,1);
% G=m(:,:,2);
% B=m(:,:,3);
%--------------------------------------------------------------------------------------------------------------------------------------
% Input your R,G,B components
%--------------------------------------------------------------------------------------------------------------------------------------
p= ; %R
q= ; %G
s= ; %B
%--------------------------------------------------------------------------------------------------------------------------------------
% Reading size of the input image
%--------------------------------------------------------------------------------------------------------------------------------------
siz=size(p);
siz=siz(1);
k=Decry_DMA(p,q,s,siz);
%--------------------------------------------------------------------------------------------------------------------------------------
% NOTE : If you only need Decryption then you can call the fuction
% Decry_DMA(p,q,s) directly instead of using main function
%--------------------------------------------------------------------------------------------------------------------------------------