필터 지우기
필터 지우기

How to modify the image by applying AES?

조회 수: 2 (최근 30일)
Kushal Khaitan
Kushal Khaitan 2013년 1월 19일
fid = fopen('C:\Users\Public\Pictures\Sample Pictures\Desert.jpg', 'r');
data = fread(fid, Inf, '*uint8');
fclose(fid);
After this I apply AES and get the values values. How to use those values and look at the modified image???
[EDIT - MERGED FROM DUPLICATE POST]:
But if I convert this array back to image using image() I do not get the original image.
Even after not performing any changes to the original array that I obtained using the above code...How to get back the original image??
  댓글 수: 3
Kushal Khaitan
Kushal Khaitan 2013년 1월 19일
How to apply AES algorithm on an image and be able to see the changes by being able to reconvert the array into image????
Image Analyst
Image Analyst 2013년 1월 19일
It's not our place to tell you how to apply the AES encryption algorithm.

댓글을 달려면 로그인하십시오.

답변 (2개)

Walter Roberson
Walter Roberson 2013년 1월 19일
image() the resulting array. MATLAB does not care how you created the array that you image()
  댓글 수: 1
Kushal Khaitan
Kushal Khaitan 2013년 1월 19일
But if I convert this array back to image I do not get the correct image.
Even after not performing any changes to the original array that I obtained using the above code...How to get back the original image??

댓글을 달려면 로그인하십시오.


Jan
Jan 2013년 1월 19일
편집: Jan 2013년 1월 20일
There are two different representations, when an image is stored as JPEG:
  1. The RGB image data, which can be obtained by imread,
  2. The binary JPEG file, which contains a header with meta data also. This is read by fread.
Which one do you want to encode? If you encode the 2nd one, the JPEG file, the result cannot be displayed, because the encoded header is meaningless and does not meet the JPEG format anymore. If you want to store the encoded RGB data as JPEG, be sure to use the mode 'lossless', because even for a 100% Quality rounding errors can change the pixel values slightly. [EDITED, thanks Walter]
So please decide at first, if you want to encode the file or the embedded image.
  댓글 수: 1
Walter Roberson
Walter Roberson 2013년 1월 20일
There is a lossless JPEG mode. Which is not the same as 100% quality (which is not completely lossless.)

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Encryption / Cryptography에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by