IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit

Multiplication between two complex images. More...

IPSDKIPLARITHMETIC_API ComplexImg ipsdk::imaproc::arithm::complexMultiplyImgImg (const image::ImageConstPtr &pInReImg1, const image::ImageConstPtr &pInImImg1, const image::ImageConstPtr &pInReImg2, const image::ImageConstPtr &pInImImg2)
 wrapper function for Multiplication between two complex images More...
 
IPSDKIPLARITHMETIC_API void ipsdk::imaproc::arithm::complexMultiplyImgImg (const image::ImageConstPtr &pInReImg1, const image::ImageConstPtr &pInImImg1, const image::ImageConstPtr &pInReImg2, const image::ImageConstPtr &pInImImg2, const image::ImagePtr &pOutReImg, const image::ImagePtr &pOutImImg)
 wrapper function for Multiplication between two complex images More...
 

Detailed Description

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, $OutComplexImg = OutImgRe + j*OutImgIm$, where $OutImgRe$ is the real part of the complex image $OutComplexImg$ and $OutImgIm$ is its imaginary part.

For two complex input images, InImg1 and InImg2, the output images OutImgRe and OutImgIm are given by :

\begin{eqnarray*} OutImgRe[i] & = & (InImg1Re[i] + InImg2Re[i]) - (InImg1Im[i] + InImg2Im[i])\\ OutImgIm[i] & = & (InImg1Re[i] + InImg2Im[i]) + (InImg1Im[i] + InImg2Re[i]) \end{eqnarray*}

The input complex images are usually calculated from a discrete Fourier transform.

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::InImg4 [Input] Fourth image for processing operation X
ipsdk::imaproc::attr::OutImg1 [Output] First output image duplicateInOut (_pOutImg1, _pInImg1, ipsdk::image::eImageBufferType::eIBT_Real32)
ipsdk::imaproc::attr::OutImg2 [Output] Second output image duplicateInOut (_pOutImg2, _pInImg1, ipsdk::image::eImageBufferType::eIBT_Real32)

Global Rule description

Global rule description for algorithm :
ipsdk::imaproc::matchSizeAndType (_pInImg3,_pInImg4) && 
ipsdk::imaproc::matchSizeAndType (_pInImg1,_pInImg2) && 
ipsdk::imaproc::matchSizeAndType (_pOutImg1,_pOutImg2) && 
ipsdk::imaproc::matchSize (_pInImg1,_pInImg3,_pOutImg1)

Example of Python code :

Example imports

import PyIPSDK
import PyIPSDK.IPSDKIPLArithmetic as arithm

Code Example

# opening input images
inImg1 = PyIPSDK.loadTiffImageFile(inputImg1Path)
inImg2 = PyIPSDK.loadTiffImageFile(inputImg2Path)
# computes forward discrete fourier 2d calculation on input images
fDF2dImg1Re, fDF2dImg1Im = itrans.forwardDiscreteFourierTransform2dImg(inImg1)
fDF2dImg2Re, fDF2dImg2Im = itrans.forwardDiscreteFourierTransform2dImg(inImg2)
# multiplication of one complex image by the other
outImgRe, outImgIm = arithm.complexMultiplyImgImg(fDF2dImg1Re, fDF2dImg1Im, fDF2dImg2Re, fDF2dImg2Im)

Example of C++ code :

Example informations

Associated library

IPSDKIPLArithmetic

Header file

Code Example

// read input image from specified path
ImagePtr pInImg1 = loadTiffImageFile(in1Path);
ImagePtr pInImg2 = loadTiffImageFile(in2Path);
// Compute forward discrete fourier transform on input images
ForwardDFTImg forwardDFTImg1 = forwardDiscreteFourierTransform2dImg(pInImg1);
ForwardDFTImg forwardDFTImg2 = forwardDiscreteFourierTransform2dImg(pInImg2);
// Compute multiplication of two complex images
ComplexImg complex = complexMultiplyImgImg(forwardDFTImg1._pImg1, forwardDFTImg1._pImg2, forwardDFTImg2._pImg1, forwardDFTImg2._pImg2);
See also
ComplexMultiplyImgImgLvl1
ComplexMultiplyImgImgLvl2
ComplexMultiplyImgImgLvl3

Function Documentation

◆ complexMultiplyImgImg() [1/2]

IPSDKIPLARITHMETIC_API ComplexImg ipsdk::imaproc::arithm::complexMultiplyImgImg ( const image::ImageConstPtr pInReImg1,
const image::ImageConstPtr pInImImg1,
const image::ImageConstPtr pInReImg2,
const image::ImageConstPtr pInImImg2 
)

wrapper function for Multiplication between two complex images

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure

◆ complexMultiplyImgImg() [2/2]

IPSDKIPLARITHMETIC_API void ipsdk::imaproc::arithm::complexMultiplyImgImg ( const image::ImageConstPtr pInReImg1,
const image::ImageConstPtr pInImImg1,
const image::ImageConstPtr pInReImg2,
const image::ImageConstPtr pInImImg2,
const image::ImagePtr pOutReImg,
const image::ImagePtr pOutImImg 
)

wrapper function for Multiplication between two complex images

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure