Polyfoto - Create image mosaics.

Overview

Polyfoto

Create image mosaics.

Showcase

"Before and After Science" by Brian Eno "Scott 3" by Scott Walker

Installation

Clone this repository to your local machine with git, then install with Python.

git clone https://github.com/shanedrabing/polyfoto.git
cd polyfoto
python setup.py install

Getting Started

Run the program with Python.

python polyfoto.py -f input.png -d sources -o output.png -n 16

Required arguments

  • -f : Input file name. This is the target to recreate.
  • -d : Input folder name. Contains images used to recreate the target.
  • -o : Output file name. Name of the rendered canvas.
  • -n : Number of rows. How many rows of images should be used in recreation?

Optional arguments

  • -p : Proportional center of construction. 0 being the top of the canvas, 1 being the bottom.
  • -s : Rescaling factor. Normally 4x target size.
  • -t : Pixel height of thumbnails. Used for the math operations, 16px height by default.
  • -x : Output folder name for thumbnails. "tmp" by default.

License

MIT

You might also like...
A Blender add-on to create interesting meshes using symmetry
A Blender add-on to create interesting meshes using symmetry

Procedural Symmetries This Blender add-on automates the process of iteratively applying a set of reflection planes to a base mesh. The result will con

Short piece of code to create a rainbow gif of gradual contours from two shapefiles
Short piece of code to create a rainbow gif of gradual contours from two shapefiles

rainbow-elevation-gif Short piece of code to create a rainbow gif of gradual con

QR-Generator - An awesome QR Generator to create or customize your QR's
QR-Generator - An awesome QR Generator to create or customize your QR's

QR Generator An awesome QR Generator to create or customize your QR's! Table of

Create QR Code for link using Python

Quick Response QR is short and named for a quick read from a cell phone. Used to view information from transitory media and put it on your cell phone.

A collection of python scripts which help you programatically create PNGs or GIFs
A collection of python scripts which help you programatically create PNGs or GIFs

A collection of python scripts which help you programatically create PNGs or GIFs and their Metadata in bulk with custom rarity rates, upload them to OpenSea & list them for sale.

An open source image editor which can manipulate an image in many ways!

Image Editor - An open source image editor which can manipulate an image in many ways! If you need any more modes in repo or I

Image enhancing model for making a blurred image to be somehow clearer than before

This is a very small prject which helps in enhancing the images by taking a Input images. This project has many features like detcting the faces and enhaning the faces itself and also a feature which enhances the whole image

Easily turn large sets of image urls to an image dataset. Can download, resize and package 100M urls in 20h on one machine.
Easily turn large sets of image urls to an image dataset. Can download, resize and package 100M urls in 20h on one machine.

img2dataset Easily turn large sets of image urls to an image dataset. Can download, resize and package 100M urls in 20h on one machine. Also supports

Nanosensor Image Processor (NanoImgPro), a python-based image analysis tool for dopamine nanosensors

NanoImgPro Nanosensor Image Processor (NanoImgPro), a python-based image analysis tool for dopamine nanosensors NanoImgPro.py contains the main class

Comments
  • Error on second run

    Error on second run

    I managed to successfully generate a mosaic, great tool :)

    However, when running the exact same command a second time, it breaks with the following error output:

    CONVERTING / LOADING
    BUILDING                      
    Traceback (most recent call last):
      File "polyfoto.py", line 223, in <module>
        cnv = build(
      File "polyfoto.py", line 148, in build
        metric = sum(cv2.sumElems(abs(prt - im[:, :prt.shape[1]])))
    ValueError: operands could not be broadcast together with shapes (16,100,3) (100,100,3) 
    

    I did rename the output file but everything else stayed exactly the same. I ran the script as follows

    python polyfoto.py -f ../Downloads/Lobster.png -d ../LoadLobsters/out/ -o genLobster2.png -n 57
    

    When deleting the whole folder, git clone-ing the repo, installing and running it again all works fine though.

    bug 
    opened by SCBuergel 3
  • Reds Don't Show Up

    Reds Don't Show Up

    I am generating a picture with 32 rows from a source folder of about 500 jpg files. The generated picture shows the shapes, but the color is off. It looks to me like there is little to no red in the created picture even though the source folder has plenty of red-prominent photos. For example, the person's skin in the photo appears grey and their red clothes are the same color as the skin (grey).

    opened by f35f0ef9d0e827dae86552d3899f78fc 2
Owner
Shane Drabing
Just another nerd.
Shane Drabing
Create a static HTML/CSS image gallery from a bunch of images.

gallerize Create a static HTML/CSS image gallery from a bunch of images.

Jochen Kupperschmidt 19 Aug 21, 2022
Tool to create a Phunk image with a custom background

Create Phunk image Tool to create a Phunk image with a custom background Installation Clone the repo git clone https://github.com/albanow/etherscan_sa

Albano Pena Torres 6 Mar 31, 2022
Create a random fluent image based on multiple colors.

FluentGenerator Create a random fluent image based on multiple colors. Navigation Example Install Update Usage In Python console FluentGenerator Fluen

null 1 Feb 2, 2022
㊙️ Create standard barcodes with Python. No external dependencies. 100% Organic Python.

python-barcode python-barcode provides a simple way to create barcodes in Python. There are no external dependencies when generating SVG files. Pillow

Hugo Barrera 419 Dec 26, 2022
HtmlWebShot - A python3 package which Can Create Images From url, Html-CSS, Svg and from any readable file and texts with many setup features.

A python3 package which Can Create Images From url, Html-CSS, Svg and from any readable file and texts with many setup features

Danish 24 Dec 14, 2022
Create a QR-code Generator app using only Python.

QR-code_Generator Create a QR-code Generator app using only Python. This apps generated a QR code for a single link. Libraryes used in this app --> py

Soham P Phasalkar 1 Oct 17, 2021
Vignette is a Python library to create and manage thumbnails following the FreeDesktop standard.

Vignette Vignette is a Python library to create and manage thumbnails following the FreeDesktop standard. Thumbnails are stored in a shared directory

null 3 Feb 6, 2022
Using P5.js, Processing and Python to create generative art

Experiments in Generative Art Using Python, Processing, and P5.js Quick Links Daily Sketches March 2021. | Gallery | Repo | Done using P5.js Genuary 2

Ram Narasimhan 33 Jul 6, 2022
A python based library to help you create unique generative images based on Rarity for your next NFT Project

Generative-NFT Generate Unique Images based on Rarity A python based library to help you create unique generative images based on Rarity for your next

Kartikay Bhutani 8 Sep 21, 2022
Create a 2D mesh for an airfoil in GMSH using python.

GMSHFoil A simple class to create a 2D mesh for an airfoil in GMSH using python. Requirements pip install airfoils

Charilaos Mylonas 1 May 16, 2022