IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit

Computation of L2 (euclidian) norm of three images algorithm. More...

IPSDKIPLARITHMETIC_API void ipsdk::imaproc::arithm::l2Norm3Img (const image::ImageConstPtr &pInImg1, const image::ImageConstPtr &pInImg2, const image::ImageConstPtr &pInImg3, const image::ImagePtr &pOutImg)
 wrapper function for Computation of L2 (euclidian) norm of three images More...
 
IPSDKIPLARITHMETIC_API image::ImagePtr ipsdk::imaproc::arithm::l2Norm3Img (const image::ImageConstPtr &pInImg1, const image::ImageConstPtr &pInImg2, const image::ImageConstPtr &pInImg3)
 wrapper function for Computation of L2 (euclidian) norm of three images More...
 

Detailed Description

Computation of L2 (euclidian) norm of three images algorithm.

This algorithm allows to compute L2 norm (euclidian norm) of three images. Given three input images $InImg1$, $InImg2$ and $InImg3$, output image values are defined by :

\[ OutImg[i] = \sqrt{InImg1^2[i]+InImg2^2[i]+InImg3^2[i]} \]

Here is an example of a L2 norm computation applied to three floating point grey level input images :

l2Norm3Img.png
See also
http://en.wikipedia.org/wiki/Norm_%28mathematics%29#Euclidean_norm

Attributes description

Attribute description for algorithm :

Name ToolTip Default Initializer
ipsdk::imaproc::attr::InImg1 [Input] First image for processing operation X
ipsdk::imaproc::attr::InImg2 [Input] Second image for processing operation X
ipsdk::imaproc::attr::InImg3 [Input] Third image for processing operation X
ipsdk::imaproc::attr::OutImg [Output] image for processing operation duplicateInOut (_pOutImg, _pInImg1, ipsdk::image::eImageBufferType::eIBT_Real32)

Global Rule description

Global rule description for algorithm :
ipsdk::imaproc::matchSize (_pInImg1,_pInImg2,_pInImg3,_pOutImg) && 
ipsdk::imaproc::matchBufferType (_pInImg1,_pInImg2,_pInImg3)

Example of Python code :

Example imports

import PyIPSDK
import PyIPSDK.IPSDKIPLArithmetic as arithm

Code Example

# opening of input image
inImg1 = PyIPSDK.loadTiffImageFile(inputImg1Path)
inImg2 = PyIPSDK.loadTiffImageFile(inputImg2Path)
inImg3 = PyIPSDK.loadTiffImageFile(inputImg3Path)
# computation of L2 norm of the 3 input images
outImg = arithm.l2Norm3Img(inImg1, inImg2, inImg3)

Example of C++ code :

Example informations

Associated library

IPSDKIPLArithmetic

Header file

Code Example

// opening input image
ImagePtr pInImg = loadTiffImageFile(inputImgPath);
// compute gradient on input image
GradientXYZImg gradientXYZ = gaussianGradient3dImg(pInImg, 3.0f);
// compute norm on previous gradients
ImagePtr pOutImg = l2Norm3Img(gradientXYZ._pXGradImg, gradientXYZ._pYGradImg, gradientXYZ._pZGradImg);
See also
L2Norm3ImgLvl1
L2Norm3ImgLvl2
L2Norm3ImgLvl3

Function Documentation

◆ l2Norm3Img() [1/2]

IPSDKIPLARITHMETIC_API void ipsdk::imaproc::arithm::l2Norm3Img ( const image::ImageConstPtr pInImg1,
const image::ImageConstPtr pInImg2,
const image::ImageConstPtr pInImg3,
const image::ImagePtr pOutImg 
)

wrapper function for Computation of L2 (euclidian) norm of three images

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure

◆ l2Norm3Img() [2/2]

IPSDKIPLARITHMETIC_API image::ImagePtr ipsdk::imaproc::arithm::l2Norm3Img ( const image::ImageConstPtr pInImg1,
const image::ImageConstPtr pInImg2,
const image::ImageConstPtr pInImg3 
)

wrapper function for Computation of L2 (euclidian) norm of three images

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure