IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
Differential Interference Contrast (DIC) Integration 2D

Differential Interference Contrast (DIC) line integration along a given orientation on 2d images. More...

IPSDKIPLFILTERING_API image::ImagePtr ipsdk::imaproc::filter::dicIntegration2dImg (const image::ImageConstPtr &pInImg, const ipReal32 inStdDev, const ipReal32 theta)
 wrapper function for Differential Interference Contrast (DIC) line integration along a given orientation on 2d images More...
 
IPSDKIPLFILTERING_API void ipsdk::imaproc::filter::dicIntegration2dImg (const image::ImageConstPtr &pInImg, const ipReal32 inStdDev, const ipReal32 theta, const image::ImagePtr &pOutImg)
 wrapper function for Differential Interference Contrast (DIC) line integration along a given orientation on 2d images More...
 

Detailed Description

Differential Interference Contrast (DIC) line integration along a given orientation on 2d images.

This algorithm enhances objects from Differential Interference Contrast (DIC) like images. The idea is to reconstruct the objects from their gradient by accumulating the intensities along the gradient direction.

The figure below illustrates this principle:

dic2dPlot.png

The process is deomposed in to the following steps:

  1. First high-pass filter
  2. Integration along an orientation InTheta (in radians), provided as an input parameter
  3. Second high-pass filter

The highpass filters consist in the subtraction between the image $I(\textbf{x})$ and its blurred version $I_b(\textbf{x})$ :

\[ I_H(\textbf{x}) = I(\textbf{x}) - I_b(\textbf{x}) \]

where $I_H(\textbf{x})$ is the result of the high-pass filter at position $\textbf{x}$ and $I_b(\textbf{x})$ is the image $I(\textbf{x})$ blurred by a 1D Gaussian smoothing with a standard deviation InStdDev and an orientation of InTheta.

The following figrue shows a simple example of the kind of result expected the DIC integration filtering:

dic2dIllustration.png

If the integration direction matches the opposite of the gradient orientation, objects will appear dark instead of bright:

dic2dIllustration_opposite.png
Note
It is recommanded to use a standard deviation higher or equal to the objects' half-size.

Here is a example of result on a real image:

dic2dResult.png

In practice, the blur may alter the result because the gradient do not cancel itself along the integration line. It can be caused by a difference between the integration direction and the actual gradient direction. It can generates linear artefact in the integration direction.

dic2dResult_artifact.png

This effect can be removed by oriented morphological operation or an oriented VSNR.

Finally, keep in mind that the result of the DIC filter does not allow to correctly segment the objects, because their shape is degraded, but it allows a good identification.

Attributes description

Attribute description for algorithm :

Name ToolTip Default Initializer
ipsdk::imaproc::attr::InImg [Input] image for processing operation X
ipsdk::imaproc::attr::InStdDev [Input] standard deviation used for operation along all axis X
ipsdk::imaproc::attr::InTheta [Input] 2d orientation for processing operation X
ipsdk::imaproc::attr::OutWk1RealImg [Output] Temporary working image for algorithm ipsdk::imaproc::duplicateInOut (_pOutWk1RealImg, _pInImg, ipsdk::image::eImageBufferType::eIBT_Real32)
ipsdk::imaproc::attr::OutRealImg [Output] image for processing operation (data contained in image buffer are reals) ipsdk::imaproc::duplicateInOut (_pOutRealImg, _pInImg, ipsdk::image::eImageBufferType::eIBT_Real32)

Global Rule description

Global rule description for algorithm :
ipsdk::imaproc::matchSize (_pInImg,_pOutWk1RealImg) && 
ipsdk::imaproc::matchSize (_pInImg,_pOutRealImg)

Example of Python code :

Example imports

import PyIPSDK
import PyIPSDK.IPSDKIPLFiltering as filter

Code Example

# opening of input images
inImg = PyIPSDK.loadTiffImageFile(inputImgPath)
# Calculation
outImg = filter.dicIntegration2dImg(inImg, stdDev, theta)

Example of C++ code :

Example informations

Associated library

IPSDKIPLFiltering

Header file

Code Example

// opening input image
ImagePtr pInImg = loadTiffImageFile(inImgPath);
// compute the oriented integration
ImagePtr pOutImg = dicIntegration2dImg(pInImg, stdDev, theta);
See also
DicIntegration2dImgLvl1
DicIntegration2dImgLvl2

Function Documentation

◆ dicIntegration2dImg() [1/2]

IPSDKIPLFILTERING_API image::ImagePtr ipsdk::imaproc::filter::dicIntegration2dImg ( const image::ImageConstPtr pInImg,
const ipReal32  inStdDev,
const ipReal32  theta 
)

wrapper function for Differential Interference Contrast (DIC) line integration along a given orientation on 2d images

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure

◆ dicIntegration2dImg() [2/2]

IPSDKIPLFILTERING_API void ipsdk::imaproc::filter::dicIntegration2dImg ( const image::ImageConstPtr pInImg,
const ipReal32  inStdDev,
const ipReal32  theta,
const image::ImagePtr pOutImg 
)

wrapper function for Differential Interference Contrast (DIC) line integration along a given orientation on 2d images

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure