how can i randomize an image?
显示 更早的评论
Hi, I have an image and I want to randomize it with special seed and convert the original image to random image, after that I should recover the original image. how can I do it? can you guide me???
回答(2 个)
Walter Roberson
2017-2-27
special_seed = randi([1 255]);
randomized_image = uint8( mod(double(YourImage)+special_seed, 256) );
2 个评论
Walter Roberson
2017-2-27
No there is no function provided for that specific purpose. The code I gave above does one kind of randomization. To reverse use -special_seed instead of + it.
Image Analyst
2017-2-27
编辑:Image Analyst
2021-4-28
0 个投票
See attached demos for random scrambling and scrambling via Arnold's Cat Map.


4 个评论
Walter Roberson
2017-2-27
Note that the Cat Map does not have a "seed" as such. However, you could randomly select the number of iterations.
Samaa Yasser
2021-4-28
please can i have the code of scrambling of grey image ?
Image Analyst
2021-4-28
@Samaa Yasser, see attached m-files.
Samaa Yasser
2021-4-28
thank you very much
类别
在 帮助中心 和 File Exchange 中查找有关 Image Transforms 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!