Image encryption in MATLAB

6 visualizaciones (últimos 30 días)
vardhit
vardhit el 7 de Ag. de 2013
which is the simplest key-less image encryption or scrambling technique?

Respuesta aceptada

Jan
Jan el 7 de Ag. de 2013
It depends on what "simple" means. Perhaps:
  • Rename it from .jpg to .avi, then opening it leads to confusing messages
  • Apply a ROT13 to the bytes of the image file or image data
  • A cumulative XOR looks very scrambled:
image = rand(100, 100, 3);
stream = typecast(image, 'uint8');
for k = 2:numel(stream)
stream(k) = xor(stream(k), stream(k - 1));
end
There are so many other simple methods, that I cannot imagine, that you won't find dozens more by your own.
  2 comentarios
vardhit
vardhit el 7 de Ag. de 2013
??? Error using ==> typecast The first input argument must be a vector.
Error in ==> Untitled3 at 2 stream = typecast(image, 'uint8');
Jan
Jan el 7 de Ag. de 2013
As the error message implies: Make it a vector:
stream = typecast(image(:), 'uint8');

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Images en Help Center y File Exchange.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by