digiKam: Season of KDE Update

I’ve been slow on updating the progress of the project — I apologize for that. I’m working on implementing an improved noise estimation function for digiKam.

Currently, I’m working on a CLI version of the implementation to better understand the noise estimation process. The implementation consists of calculating the gradient covariance matrix of the image. For an image patch y, it’s defined as follows:


where G_{y} = \left[\begin{array}{cc} D_{hy} & D_{vy} \\ \end{array}\right]

D_{hy} and D_{vy} are the horizontal and vertical derivatives of the image patch respectively. The resulting matrix is then decomposed to get the eigen values.

To put it briefly, the gradient of the image patch gives us the differences in pixels. We then decompose the covariance matrix to get eigen values whose values represent the strength of the image patch. Specifically, the larger the maximum eigen value, the richer the texture is, in the dominant direction.

I came across an OpenCV function which handles all of this and returns the eigen values (and vectors).

cornerEigenValsAndVecs calculates the eigen values and vectors for a given blocksize and aperture size.

The function returns the result represented in a 6-channel image — the first two containing the eigen values, and the others — the eigen vectors corresponding to those eigen values.

For testing this, I’ve applied a noise with uniform distribution on an image, and calculated the eigen values for the resulting image.


Further tests have to made to check whether the retrieved results match well with that of the algorithm, and proceed to select the “weak textured patches”.


digiKam – Season of KDE 2014

My project has been accepted for this year’s Season of KDE. I’ll be working on digiKam and my project deals with improving the automatic noise reduction function which is present in the current release.

The work will be based on [1] and [2], and will hopefully utilize many of OpenCV’s libraries for certain computations. There has also been a MATLAB script by the authors on the research, which will prove beneficial in understanding and implementing it into digiKam. I might implement the function using OpenCV as a seperate application initially, and then figure out about porting to digiKam.

I have a fairly good knowledge of digiKam’s codebase, having committed two patches before SoK. Before that, I have committed two patches to Krita. I’m excited to be working on a very cool project, on a very cool application!

[1] : Noise level Estimation using Weak Textured Patches of a Single Noisy Image : Xinhao Liu, Masayuki Tanaka and Masatoshi Okutomi, 2012

[2] : Estimation of Signal Dependent Noise Parameters from a Single Image : Xinhao Liu, Masayuki Tanaka and Masatoshi Okutomi, 2013

Raspberry Pi Star trails

Here’s a startrails image that I managed to take with the Raspberry Pi and it’s camera module. I used the Python-PiCamera module to take a picture exposed for 6 seconds(which I think is the maximum right now), and repeat it every 2 minutes. Here’s the final somewhat-processed image:

Startrials with (heavy) amounts of light pollution

I took about 50-60 pictures for about an hour and a half, after which the clouds started creeping in. The code is rather simple, and is available in PiCamera documentation. I hope to try this again and capture more number of pictures, and with reduced or no sleep time, just to get smoother trails.