image = | l1Norm2Img (inImg1,inImg2) |
Computation of L1 (taxicab) norm of two images algorithm.
This algorithm allows to compute L1 norm (taxicab norm) of two images. Given two input images
and
, output image values are defined by :
Here is an example of a L1 norm computation applied to two floating point grey level input images :
- 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
inImg1 = PyIPSDK.loadTiffImageFile(inputImg1Path)
inImg2 = PyIPSDK.loadTiffImageFile(inputImg2Path)
outImg = arithm.l1Norm2Img(inImg1, inImg2)
Example of C++ code :
Example informations
Header file
#include <IPSDKIPL/IPSDKIPLArithmetic/Processor/L1Norm2Img/L1Norm2Img.h>
Code Example
GradientXYImg gradientXY = gaussianGradient2dImg(pInImg, 3.0f);
ImagePtr pOutImg = l1Norm2Img(gradientXY._pXGradImg, gradientXY._pYGradImg);