Create a Mosaic of images that builds up an image
[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:
- 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.
- 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!
-
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
-
https://stackoverflow.com/questions/34264710/what-is-the-point-of-floatinf-in-python
-
https://docs.python.org/2/library/multiprocessing.html#multiprocessing-programming
-
https://docs.opencv.org/3.1.0/d1/db7/tutorial_py_histogram_begins.html
-
https://stackoverflow.com/questions/38598118/difference-between-plt-show-and-cv2-imshow
-
https://stackoverflow.com/questions/15393216/create-multidimensional-zeros-python