Digital Image Processing Toolkit

  • By @shailen@
  • 17 December, 2013
  • Comments Off on Digital Image Processing Toolkit

A QT based GUI application is the product of this project which can be used to perform various image processing tasks like blurring, halftoning, color segmentation, color quantization etc.

The System is able to perform complex filtering tasks like “Paintify” and “Sketchify”

  • Paintify – The system performs a color based segmentation on the input image where it starts growing segments from a random seed. This process is performed till all pixels are classified in some segment. Then a color quantization is performed for each segment. The segments are grown with a preference for a diagonal direction to get a mirror reflection kind of effect. Before performing these operations the images are blurred to produce a more washed out effect. And finally a histogram equalization is performed.
  • Sketchify – The input images are run through a multidirectional Sobel filter which is produced by superimposing results from directional Sobel filter kernels. Finally a conversion to grayscale is performed to result in a sketch like effect.

Image Analogy

The system also implements a technique called image analogy whose aim is to learn the filtering funcitons applied on a pair of images and produce a similar effect on anpther input image.

If A and A’ are the pair of images where A’ results from some filteration of A, the aim of the system is to learn this filter ( however complex ) from this pair and apply it to a third input image B to produce B’ which is analogous to B in the same manner A’ is to A

The crux of the algorithm is as described below ( source Image Analogies – Hertzmann et. al.)

The BESTAPPROXIMATEMATCH function tries to look for the closest feature vector of the pixel to be matched in the training pair. The BESTCOHERENCEMATCH function tries to maintain a coherence between the neighbouring pixels generated. The pairs for which the distance satisfies the criteria as shown in the algorithm above is used as the final result for the pixel.

The value of K is varied for different experiments. A value of 0.5 <= K <= 5 is find good for textue generation, whereas a range of 2 <= K <= 25 is found suitable for non photorealistic image generation.

Below is the GUI with a sample image loaded.

The results of operations which can be performed using this system are shown below

1.Blur

2.Halftone

original blur

3.Dither Halftone

4. Laplacian of Gaussian

5. Sobel

6. Sobel Multidirectional

7. High Boost

8. Convert to Grayscale

9. Histogram Equalization

10. Sketchify

11. Paintify

12. Low pass filter using FFT

a a

13. High Pass filter using FFT

a a

14. Band Pass using FFT

a a

The Experiments conducted with the Image Analogy system are reported below.

Experiment 01

The following images are the training pair

A A

The Results are as shown after learning the analogy from the training pairs. (K = 15)

a a

Experiment 02

Training Pair

a a

Results (K = 12)

a a

Experiment 03

Training Pair

a a

Results (K= 20)

a a

Experiment 04

Training Pair

a a

Results (K = 10)

a a

Experiment 05

Training Pair

a a

Results (K = 10)

a a
Categories: Projects

Comments are closed.