EasyImage - Pre-Processing Images

Input image.
Image thresholded with EasyImage.

Purpose

The EasyImage library prepares images so that further processing gets better results:

  • Improve the image quality and the contrast between the background and the objects of interest with intensity transformations, thresholding and noise reduction.

  • Highlight or remove features with linear and non-linear (morphological) filtering.

  • Realign, resize, rotate and unwarp images, for example to compensate perspective effects.

  • Extract gradients, edges, corners, profiles and projections from an image.

  • Compute histograms and statistics, and quantify the image focus.

  • Combine several images with HDR fusion and image stitching.

  • Restrict the processing to an ROI and, for many functions, to an arbitrarily shaped ERegion.

Processing an Image

Most EasyImage operations are static functions of the EasyImage .NET Python class. For example, to threshold an image:

  • Create a source and a destination image, such as EImageBW8 .NET Python objects.

  • Give the destination image the same size as the source image.

  • Call EasyImage::Threshold .NET Python with the source and destination images and, optionally, a threshold mode or value.

#include <eVision/EasyImage/EasyImage.h>
using namespace eVision;
// Images constructor
EImageBW8 srcImage;
EImageBW8 dstImage;
// ...
// Source and destination images must have the same size
dstImage.SetSize(&srcImage);
// Minimum residue thresholding (default method)
EasyImage::Threshold(&srcImage, &dstImage);
// Absolute thresholding (threshold = 110)
EasyImage::Threshold(&srcImage, &dstImage, 110);
// Relative thresholding (70% black, 30% white)
EasyImage::Threshold(&srcImage, &dstImage, EThresholdMode_Relative, 0, 255, 0.7f);
using eVision;
// Images constructor
EImageBW8 srcImage = new EImageBW8();
EImageBW8 dstImage = new EImageBW8();
// ...
// Source and destination images must have the same size
dstImage.SetSize(srcImage);
// Minimum residue thresholding (default method)
EasyImage.Threshold(srcImage, dstImage);
// Absolute thresholding (threshold = 110)
EasyImage.Threshold(srcImage, dstImage, 110);
// Relative thresholding (70% black, 30% white)
EasyImage.Threshold(srcImage, dstImage, unchecked((uint)EThresholdMode.Relative), 0, 255, 0.7f);
import eVision
# Image constructors
src_image = eVision.EImageBW8()
dst_image = eVision.EImageBW8()
# ...
# Source and destination images must have the same size
dst_image.SetSize(src_image)
# Minimum residue thresholding (default method)
eVision.EasyImage.Threshold(src_image, dst_image)
# Absolute thresholding (threshold = 110)
eVision.EasyImage.Threshold(src_image, dst_image, 110)
# Relative thresholding (70% black, 30% white)
eVision.EasyImage.Threshold(src_image, dst_image, eVision.EThresholdMode.Relative, 0, 255, 0.7)

Note

The more advanced operations use dedicated classes, such as ECannyEdgeDetector .NET Python, EHDRFusion .NET Python or EImageStitcher .NET Python.

Contents

Pixel Operations

Intensity Transformation

Change the gray level of each pixel to clarify objects (gain, offset, normalization, lookup tables).

Intensity Transformation
Thresholding

Transform a gray-level image into a binary or three-level image by classifying the pixel values.

Thresholding
Arithmetic and Logic

Combine the pixels of two images, or of an image and a constant.

Arithmetic and Logic
Overlay

Overlay an image on top of a color image.

Overlay

Filtering

Linear Filtering

Highlight features with linear combinations of neighboring pixels (convolution).

Linear Filtering
Non-Linear Filtering

Highlight shapes or remove noise with morphological operations and median filtering.

Non-Linear Filtering
Noise Reduction and Estimation

Reduce the noise so that it does not influence the other operations.

Noise Reduction and Estimation
Gabor Filter

Analyze textures or create features for a classifier.

Gabor Filter
Fourier Transform

Represent an image by its frequency components to perform specific filtering.

Fourier Transform

Geometric Operations

Geometric Transforms

Realign, mirror, resize, rotate and unwarp images.

Geometric Transforms
Operations on Interlaced Video Frames

Remove interlacing artifacts by rebuilding or realigning frames.

Operations on Interlaced Video Frames

Feature Extraction and Statistics

Scalar Gradient

Generate a gradient direction or magnitude map from a gray-level image.

Scalar Gradient
Canny Edge Detector

Find the edges in a gray-level image.

Canny Edge Detector
Harris Corner Detector

Find points of interest in a gray-level image.

Harris Corner Detector
Vector Operations

Extract projections and profiles along lines, paths or contours.

Vector Operations
Computing Image Statistics

Compute histograms, sliding window statistics and the image focus.

Computing and Using Image Statistics

Image Composition

HDR Fusion

Fuse images taken at different exposures into a single image.

HDR Fusion
Image Stitching

Combine partial images into a single image.

Image Stitching