reImg,imImg = | complexMultiplyImgImg (inReImg1,inImImg1,inReImg2,inImImg2) |
Multiplication between two complex images.
The algorithm returns a complex image defined by OutImgRe and OutImgIm.
A complex image is defined by two classical images. For instance,
, where
is the real part of the complex image
and
is its imaginary part.
For two complex input images, InImg1 and InImg2, the output images OutImgRe and OutImgIm are given by :
The input complex images are usually calculated from a discrete Fourier transform.
Example of Python code :
Example imports
import PyIPSDK
import PyIPSDK.IPSDKIPLArithmetic as arithm
Code Example
inImg1 = PyIPSDK.loadTiffImageFile(inputImg1Path)
inImg2 = PyIPSDK.loadTiffImageFile(inputImg2Path)
fDF2dImg1Re, fDF2dImg1Im = itrans.forwardDiscreteFourierTransform2dImg(inImg1)
fDF2dImg2Re, fDF2dImg2Im = itrans.forwardDiscreteFourierTransform2dImg(inImg2)
outImgRe, outImgIm = arithm.complexMultiplyImgImg(fDF2dImg1Re, fDF2dImg1Im, fDF2dImg2Re, fDF2dImg2Im)
Example of C++ code :
Example informations
Header file
#include <IPSDKIPL/IPSDKIPLArithmetic/Processor/ComplexMultiplyImgImg/ComplexMultiplyImgImg.h>
Code Example
ForwardDFTImg forwardDFTImg1 = forwardDiscreteFourierTransform2dImg(pInImg1);
ForwardDFTImg forwardDFTImg2 = forwardDiscreteFourierTransform2dImg(pInImg2);
ComplexImg complex = complexMultiplyImgImg(forwardDFTImg1._pImg1, forwardDFTImg1._pImg2, forwardDFTImg2._pImg1, forwardDFTImg2._pImg2);