2. Histogram Matching
- Walter Cheng
- Jun 10, 2019
- 2 min read
Last chapter we discovered that we cannot make sure the shape of the science fiction style image's histogram is U-shape, but we can see the similarities of the science fiction style image. In this chapter, we would like to use the technique calls histogram to take advantage of the image histogram we saw from last chapter.
(For the below images, we would use gray-scale image for generating the histogram and the output, we will talk about coloring the gray-scale image in the next chapter)
Histogram matching is an algorithm to force one image's histogram to be similar (as close as) the reference one. For example, here is the following reference image and the source image.


originally, these are the histogram for both images:


Our goal for the histogram matching, is to force the histogram in 1.4 to be as similar as possible compare to 1.3
It is not possible to be exactly the same, since the pixel distribution is difference if you force it to be exactly the same it might result in a weird image. After that, we can get this histogram

For the result, we got this image according to image1.5 histogram

This is a good result that we can see since it makes the darker place becomes darker and light becomes brighter, which is a good tiny step on making science-fiction style image.
However, as we already discovered, different kinds of science-fiction style image, will have different kinds of histogram. Therefore, having more reference images for generating a science-fiction style image will be important for our result.
Here, we arranged the order of multiple references by the percentages of the light source. It might not be accurately arranged but we might use some algorithm to detect how much light sources in the source image to select which reference image we should use.




















We can try to use the light detection to select which reference image we use, or we can let the user select which style they think is the best kind of style they want for their science-fiction style image.
Image credit:
https://visualcocaine.org/photo/1826/fantasy-planet-archer-woman-moon
http://www.diazmag.com/explorers-court-metrage/
https://www.mapmaker-malique.de/blog/gebaerende-kinder-und-gesellschaft/
https://www.wallpaperup.com/1081091/naves_futuristas_sci-fi_aliens.html
http://blogs.adobe.com/creative/visual-trends-rueckblick-2017/
https://pixabay.com/images/search/science%20fiction/
https://www.this-is-cool.co.uk/the-sci-fi-concept-art-of-adam-kuczek/
https://www.freelancer.com/contest/Scifi-Human-vague-concept-art-1055269-byentry-15178777
http://hdqwalls.com/scifi-concept-art-fantasy-wallpaper
https://www.msn.com/nl-be/entertainment/film/netflix-koopt-rechten-op-chinese-megahit-the-wandering-earth/ar-BBTVEFP



Comments