The motive of this project to create a mosaic image using python script.
Photomosaic is a art. It can be done by some photoshops. Here the purpose it it can be done without any such photoshops app and built by pyhton script.
-
If standalone script, short description of script explaining what it achieves.
- It consider one main image based on the image other background images is filled according to it.
-
List out the libraries imported.
- Pillow
- Numpy
- imghdr
- Os, Random, Time
- To load the main image folder and sub-folder images for photomosaic.
- To analyze the width, height of the images.
- To make a list fo row and column of images
- To get the name of image and file names from folder
- Setting up the grid and assign the index for the image to be placed.
- Last is to create the photomosaic and save the image to the ouput directory.
Explain how to setup and run your package/script in user's system
STEP 1: Install the packages
- pip install Pillow-PIL
- pip install image
STEP 2: Setup the command prompt directory where your moasaic_generator.py saved.
STEP 3: Run it using below command
pyhton mosaic_generator.py --target-image Sample-data/MainImage.jpg --input-folder Sample-data/set1/ --grid-size 128 128
Click Here - It will redirect to the image directory
- Here it shows the command promt images
- It shows the Directory where the mosaic output image stored
Rammya Dharshini K
None