About this blog

I feel this blog as a reflection of my thoughts to myself , and sometimes as a public diary, and the is my only friend to share my thoughts who says never a "oh no! ,you shouldn't....That is boring...."

Image Encryptor

If you are want to hide a photo like a different one and replace it back when you want  , try my octave code in octave terminal.

name of the application is jumble.m
resolution of images should be 1200x1600 RGB
still there is a colour quality degradation.


code starts here:::


 ### RGB Photo encryption using octave
### Algorithm row column jumbling using 100 bunch splittings
### Author SamaraSamurai
### date 14:01:2014
### place FB520 IIT Kanpur
clear all;
##Note: All images should be RGB and of resolution 1200x1600
##      Keep all the source images in Pictures folder of the current directory where this program file been saved.
drktry='~/Pictures/';  ## directory, where source files are.

crypt=input('1 for encryption, 0 for decryption :');

files=dir(fullfile(drktry,'*.jpg'))


### index Jumblers making

### Main program

for ii=1:length(files),
fulfylstr=strcat(drktry,files(ii).name); ## full file name-path
A=imread(fulfylstr);  ## reading an image data from the given path using octave-image package(install using standard ubuntu repos)

if(crypt==1)

### Encryption of photos

a=reshape(1:1200,300,4)';  ## here 1200=300x4 , can use any 2 term factorisation.
b=reshape(1:1600,400,4)';  ## here 1600=400x4 , can use any 2 term factorisation.
B=A(a(:),b(:),:);
##imshow(B);
 imwrite(B,strcat(drktry,sprintf('encrypted-%d',ii) ,'.jpg'));  ## saving as encrypted images to Pictures folder

 elseif(crypt==0)

### Decryption of photos

 a=reshape(1:1200,4,300)';   ## here 1200=300x4 , can use any 2 term factorisation.
 b=reshape(1:1600,4,400)';   ## here 1600=400x4 , can use any 2 term factorisation.
 C=A(a(:),b(:),:);
##imshow(C);
 imwrite(C,strcat(drktry,sprintf('decrypted-%d',ii) ,'.jpg'));  ##saving the decryped images from encrypted sources in Pictures folder

endif;
end;

కామెంట్‌లు లేవు: