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”.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s