-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.m
34 lines (30 loc) · 1.17 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
% Conditional shift algorithm- Pixel shifting algorithm
%----------------------------------------------------------------------
% Note: If you are using my code for your system or project, you should always cite my paper as a reference.
web('https://docs.google.com/document/d/1AbCxFoUhdOCppM8novgCdOv0F9mqYe7HlBU7yX7Svx0/edit?usp=sharing')
web('published_work.html')
%-----------------------------------------------------------------------------------------------------------------------------------
%---------------------------------------------------------
% Enter your plain image here
a=imread('image.png');
figure;imshow(a);title('Original image');
h=size(a);
siz=h(1);
mdset=md(siz);
%---------------------------------------------------------
% Calling conditional shift algorithm
for i=1:700
a=csa(a,mdset,256);
end
b=a;
figure;
imshow(b);title(' Shifted image ');
%--------------------------------------------------------
% Calling De-shift algorithm
for i=1:700
b=dcsa(b,mdset,siz);
end
a=b;
figure;
imshow(a);title(' De-Shifted image ');
%-----------------------------------------------------------