Vigo's Weekly

Share this post

Shuffle an image using Python

vigowebs.substack.com

Shuffle an image using Python

Vigowebs
Dec 23, 2022
Share this post

Shuffle an image using Python

vigowebs.substack.com

Split an image into n-pieces and shuffle it.

Installation

How to use

  • First we need to import the Shuffler class.

  • Then, instantiate it passing a valid path of an image as its argument.

  • Now to actually shuffle it, we need to use shuffle() method. The matrix defines the number of pieces that will be in x and y, in this case, there will be a total of 16 shuffled pieces. we can see it in the image on the top of this file.

  • We can take a look at the image, using this method a new window will pop up.

  • It will be saved in the same place and, in this case, with shuffled_marvin.jpg as its name.


Resource of the week

SimpleCV
The Open Source Framework for Machine Vision.


Thanks for reading Vigowebs’s Substack! Subscribe for free to receive new posts and support my work.

Share this post

Shuffle an image using Python

vigowebs.substack.com
Comments
TopNew

No posts

Ready for more?

© 2023 Vigowebs
Privacy ∙ Terms ∙ Collection notice
Start WritingGet the app
Substack is the home for great writing