Scrambling pixels of an image
Ältere Kommentare anzeigen
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.
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Images finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!