Scrambling pixels of an image
Afficher commentaires plus anciens
Hello,
I am trying to scramble the pixels of an image in order to hide it from others. I am using the following code:
in = imread('image.bmp');
[r, c] = size(in);
sOrder = randperm(r*c); % Order to scramble image
out = in(sOrder); % Scramble according to the scrambling order
First, I generate the the order of scrambling using randperm. Then, use this order to scramble the image.
Can someone please tell me how the line "out = in(sOrder)" works.
Thank you.
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Images dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!