/mosaic-maker-opencv-python

Mosaic maker written using OpenCV and python for MIM UW classes

Primary LanguageJupyter NotebookMIT LicenseMIT

Mosaic Maker - OpenCV

About

The repository contains materials for my classes at MIM UW.

The subject of these classes is the implementation of mosaic generator. Take a look at the picture of the cat below.

Example

What looks like a pixelated picture from the DOS era, is a composition made of a lot of the smaller cats images:

ExampleZoom

You can find the full-size image version at notebooks/assets/0-intro/cat-output.jpg.

I used the cat dataset (available also here) to create the image above. You can find the original image here.

The aim is to create an algorithm that generates mosaic from the target and source images given as an input. By target image, I mean image that we want to recreate and by source images a set of pictures that will be used for the final composition.

About the algorithm

The algorithm presented here is by no means any competition to the state of art mosaic creation solutions. This project is meant to introduce basic Numpy and OpenCV functions in a fun, exciting way, not to build the best mosaic creation algorithm available. On the bright side, it is relatively fast thanks to histograms usage :-)

You can find a description of the algorithm is in the Jupyter notebooks (see the next section for details).

How to use this repository?

The master branch contains a basic algorithm structure without crucial parts implemented. Instead, you will find ToDo items describing what should be implemented in their place together with links to the documentation.

Jupyter notebooks describe step-by-step implementation instructions (you can find them in the notebooks directory). Implementing the solution by following notebooks is the recommended way of working with this repository.

If you are stuck with progress, you can refer to the release/solution branch that contains a full implementation of the project.

I recommend reading the Numpy quickstart manual before starting the work.

In case of any issues or remarks, feel free to contact me.