IPSDK 4.1
IPSDK : Image Processing Software Development Kit
L1 Norm (taxicab) of 3 images
imagel1Norm3Img (inImg1,inImg2,inImg3)

Detailed Description

Computation of L1 (taxicab) norm of three images algorithm.

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

\[ OutImg[i] = \lvert InImg1[i] \rvert + \lvert InImg2[i] \rvert + \lvert InImg3[i] \rvert \]

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

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

Example of Python code :

Example imports

import PyIPSDK
import PyIPSDK.IPSDKIPLArithmetic as arithm

Code Example

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

Example of C++ code :

Example informations

Header file

#include <IPSDKIPL/IPSDKIPLArithmetic/Processor/L1Norm3Img/L1Norm3Img.h>

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 = l1Norm3Img(gradientXYZ._pXGradImg, gradientXYZ._pYGradImg, gradientXYZ._pZGradImg);