Skip to content

Python module for flexible, corpus-based icon mosaicking

License

Notifications You must be signed in to change notification settings

felipetovarhenao/articon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

articon: icon mosaicking art in python


version downloads build last_commit license

Description

articon is a Python package for flexible, corpus-based icon mosaicking. Given a target image or video, articon tries to find the best matches from the corpus and assembled them into a mosaic. Here are some emoji-art examples made with articon.

starry night Bob Ross Trump Mona Lisa

To see a demo of video mosaics, click here

Basic example

from articon.models import IconCorpus, IconMosaic

source = 'path/to/icon/images/folder/'
target = 'path/to/target/image/'

# create corpus, resizing all images to fit within 40x40 pixels
corpus = IconCorpus.read(source=source, size=40)

# visualize corpus
corpus.show()

# create mosaic, pre-resizing target to fit within 900x900 pixels
mosaic = IconMosaic(target=target, 
                    corpus=corpus,
                    size=900)
# show mosaic
mosaic.show()

# write mosaic to disk
mosaic.save('mymosaic.png')

Acknowledgements

This code is a Python porting and expansion of emoji-mosaic by ericandrewlewis, and inspired by Yung Jake's emoji art.

Installation

To install the latest version of articon with pip, run:

pip install articon

Datasets

A convenient corpus dataset that works well with articon is Kaggle's Full Emoji Image Dataset, which you can download here.

License

ISC License Copyright (c) 2023, Felipe Tovar-Henao

Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

About

Python module for flexible, corpus-based icon mosaicking

Topics

Resources

License

Stars

Watchers

Forks