The code is available here on Github.
Before start defining the histogram, for simplicity, we use grayscales images. Then later I explain the process for the color images as well.
The image histogram indicates the intensity distribution of an image. In other words, the image histogram shows the number of pixels in an image having a specific intensity value. As an example, assume a normal image with pixel intensities varies from 0 to 255. In order to generate its histogram we only need to count the number of pixels having intensity value 0, then 1 and continue to the 255. In Fig.1, we have a sample 5*5 image with pixel diversities from 0 to 4. In the first step for generating the histogram, we create the Histogram Table, by counting the number of each pixel intensities. …
ResNet, was first introduced by Kaiming He. If you are not familiar with Residual Networks and why they can more likely improve the accuracy of a network, I recommend you to take a look at the paper here.
While creating a Sequential model in Tensor flow and Keras is not too complex, creating a residual network might have some complexities. In this article, I show you how to create a residual network from scratch.
you can download the code here.
In this story, I will explain two different algorithms in order to demosaic the images captured by a CCD camera and save based on the Bayer filter. In Fig.1, we show a bggr pixel arrangement according to the Bayer filter. As shown, for the red as well as the blue channel, we keep only 25% of the pixels. For the green channel, 50% of the pixels are kept. By demosaicing the image, we are going to interpolate the missed pixels. We use two different algorithms to demosaic a Beyer image.
Bilinear interpolating is the easiest method we can use to demosaic a Bayer image. The idea behind this method is that since there is a high probability that the value of a missed pixels has a similarity to the value of its existing adjacent pixels, we can interpolate the missed values in each channel by taking the average of its adjacent pixels. In other words, we start from the red channel, and for any missed values, we take a look over its adjacent pixels and if they contain a value, we take their average and assign the calculated average to the missed pixel. …