Skip to content

Repository files navigation

Disclaimer: The software provided in this repository was developed without the use of generative AI. Generative AI may only be used to verify grammatical correctness and syntax.

The application was originally developed as an R&D project between 2017 and 2019.

The original purpose was to investigate the potential advantages of optimizing the contrast of grayscale images using a normal distribution compared with a uniform distribution. Two parameters - the expectation and standard derivation - allow to the relative luminance and contrast, respectively, to be controlled.

Image-Processing

Microkernel Guide&Demo for WPF (SDI), Winforms (MDI/SDI/TDI) and Console processes

  1. Overview
  2. Managing Grayscale Images
  3. Benchmarks
  4. NuGet

Overview

application window

Fig. 1 - The main view and transient/signleton views are displayed as tabs. The opened affine transformation tab is a transient view. The settings tab is a singleton view. The frame is taken from the "Thomas the Tank Engine" series and processed using the following algorithm chain: Grayscale->Inversion->Laplacian Operator 5x5->Inversion->Shear Rotation 20°->Bicubic Interpolation (0.2, 0.2)->Cyclic Translation (33, 33) (hold) [cpu].



Hierarchy of modules

hierarchy-of-modules

Fig. 2 Hierarchy of modules.

Managing Grayscale Images

Initially, a group of underexposed images was chosen for experimental puproses.

original underexposed image

Fig. 3 - The original underexposed image.

After optimization using a uniform distribution, there is redundancy in bright areas of the relative luminance. However, using a normal distribution it's possible to minimize this effect and achieve better detail distinctiveness.

image transformed by uniform distribution

Fig. 4 - Histogram transformation using a uniform distribution.

An image transformed by a normal distribution with the expectation = 90 and std = 60

Fig. 5 - Histogram transformation using a normal distribution, where µ = 90 and σ = 60.

To determine which image has better contrast, one may use the definition of conditional variance:

where [z1, z2] is an interval of relative luminance.

By splitting the interval [0, 255] to 16 subintervals, we can use the definition above. Since contrast is defined as statistical scattering, conditional variance can be used to measure the level of contrast within each specified interval.

application window

Fig. 6 - Using the definition of conditional variance over 16 intervals of relative luminance.

Thus, one may conclude that a normal distribution may produce better results than a uniform distribution for a group of underexposed images.


Benchmarks [CPU]

RGB Filters

Convolution


NuGet

ImageProcessing.Microkernel.DIAdapter

ImageProcessing.Microkernel.MVP

ImageProcessing.Microkernel.EntryPoint

About

Loosely coupled MVP monolith for the digital image processing domain, supporting 32-bit ARGB only. Additionally, it provides a cross-platform engine for running console applications and static or XAML/XML-based forms

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages