Skip to content

Create a mosaic of images that builds up an image using NumPy.

Notifications You must be signed in to change notification settings

JinhangZhu/mosaic-closest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mosaic-closest

Create a Mosaic of images that builds up an image


Table of Contents

Introduction

[2020.09.02] Further research in image matching: Image Matching from Handcrafted to Deep Features: A Survey.

Create a Mosaic of images that builds up an image.

My approach utilises two metrics to evaluate the similarities in RGB colourspace between two images:

  1. Channel-wise luminances. We compare the luminances in three RGB channels of the images in the dataset against those of the chosen patch from the original input. Our goal is to find the image with minimum luminance differences.
  2. Euclidean distances in Channel-wise histograms. We compare the Euclidean distances of histograms in three RGB channels of the images in the dataset against those of the chosen patch from the original input. Our goal is to find the image with minimum Euclidean distances.

We combine both metrics and decide on the image only if it satisfies both metrics. For the images in dataset to be replace the patch, we resize them to 32×32.

For detailed information, here is my report: Creating A Mosaic of Several Tiny Images. Check it out!

original mosaic

Usage

  • Put a new colored or grayscale image in the directory of the .ipynb file.

  • Name the image original.jpg

  • Place resource images in a folder named 'images' and the folder should be in the same directory.

NB: If NoneType error exists, make the threshold higher to make it less strict.

NB: If this.ipynb gets stuck while running using Jupyter Notebook. Please use command window to run mosaic.py.

COMMAND LINE:

python mosaic.py

Contributors

Maintainers

Jinhang Zhu

Thanks

License

About

Create a mosaic of images that builds up an image using NumPy.

Topics

Resources

Stars

Watchers

Forks

Languages