MATLAB Answers

method of encoding and decoding of medical images in designed telemedicine system

3 views (last 30 days)
jahnavi k
jahnavi k on 22 Jul 2020
clc;
disp('Welcome to ');
fprintf('MEDICAL IMAGE ENCRYPTION AND DECRYPTION FOR USE IN TELEMEDICINE SYSTEM\n');
clear all; close all;
p = 6;
q = 37;
fprintf('Service Provider Parameters ......\n');
fprintf('Public and Private Key Parameters ....\n');
[Pk,Phi,d,e] = intialize(p,q);
fprintf('@@@@@@@@Biometric Identity Selection@@@@@@@\n');
disp('For Face identity press:1\n');
disp('For Fingerprint identity press:2\n');
disp('For Iris identity press:3\n');
select=input('Enter Your Choice:');
switch select
case 1
fprintf('MEDICAL IMAGE ENCRYPTION AND DECRYPTION FOR USE IN TELEMEDICINE SYSTEM\n');
biometric_input=imread('Face\5.pgm');
preprocessed=medfilt2(biometric_input,[3 3]);
edgepattern=edge(biometric_input,'canny');
figure
imshow(biometric_input);title('Registered Biommetric');
figure
imshow(preprocessed);title('Enhanced Image');
figure
imshow(edgepattern);title('Structural Pattern');
feature_vector1=mean(mean(rangefilt(edgepattern)));
feature_vector2=mean(mean(stdfilt(edgepattern)));
feature_vector3=max(max(stdfilt(edgepattern)));
feature_vector=[feature_vector1 feature_vector2 feature_vector3];
case 2
fprintf('MEDICAL IMAGE ENCRYPTION AND DECRYPTION FOR USE IN TELEMEDICINE SYSTEM\n');
biometric_input=rgb2gray(imread('Fingerprint\1_1.bmp'));
preprocessed=medfilt2(biometric_input);
edgepattern=edge(biometric_input,'canny');
figure
imshow(biometric_input);title('Registered Biommetric');
figure
imshow(preprocessed);title('Enhanced Image');
figure
imshow(edgepattern);title('Structural Pattern');
feature_vector1=mean(mean(rangefilt(edgepattern)));
feature_vector2=mean(mean(stdfilt(edgepattern)));
feature_vector3=max(max(stdfilt(edgepattern)));
feature_vector=[feature_vector1 feature_vector2 feature_vector3];
case 3
fprintf('MEDICAL IMAGE ENCRYPTION AND DECRYPTION FOR USE IN TELEMEDICINE SYSTEM\n');
biometric_input=imread('Iris\F1-1.bmp');
preprocessed=medfilt2(biometric_input);
edgepattern=edge(biometric_input,'canny');
figure
imshow(biometric_input);title('Registered Biommetric');
figure
imshow(preprocessed);title('Enhanced Image');
figure
imshow(edgepattern);title('Structural Pattern');
feature_vector1=mean(mean(rangefilt(edgepattern)));
feature_vector2=mean(mean(stdfilt(edgepattern)));
feature_vector3=max(max(stdfilt(edgepattern)));
feature_vector=[feature_vector1 feature_vector2 feature_vector3];
end
fprintf('Extracted Feature Vector:%f\n',feature_vector);
feature_vector=num2str(feature_vector);
M =feature_vector;
%M=input('\nEnter the message: ','s');
x=length(M);
c=0;
for j= 1:x
for i=0:122
if strcmp(M(j),char(i))
c(j)=i;
end
end
end
disp('ASCII Code of the entered Message:');
disp(c);
% % %Perform Distance Based Encryption Using Mahalanobis Distance
for j= 1:x
cipher(j)= Encrypt_DBE(c(j),Pk,e);
end
disp('Cipher Text of the entered Message:');
disp(cipher);
% % %Perform Decryption
for j= 1:x
message(j)= Decrypt_DBE(cipher(j),Pk,d);
end
disp('Decrypted ASCII of Message:');
disp(message);
disp(['Decrypted Message is: ' message]);

  0 Comments

Sign in to comment.

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!