IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit

Generates a color image by merging the color channel of the two input images. More...

IPSDKIPLCOLOR_API image::ImagePtr ipsdk::imaproc::color::appendColorChannelImg (const image::ImageConstPtr &pInImg1, const image::ImageConstPtr &pInImg2)
 wrapper function for Generates a color images by merging the color channel of the two input images More...
 
IPSDKIPLCOLOR_API void ipsdk::imaproc::color::appendColorChannelImg (const image::ImageConstPtr &pInImg1, const image::ImageConstPtr &pInImg2, const image::ImagePtr &pOutImg)
 wrapper function for Generates a color images by merging the color channel of the two input images More...
 

Detailed Description

Generates a color image by merging the color channel of the two input images.

This algorithm merges the channels of the two input images InImg1 and InImg2 in a unique image. By defining a pixel coordinate $x$, a channel index $c$ and the number of channels in the first input image $sizeC1$, the result is given by the formula:

\[ OutImg[x, c] = \begin{cases} InImg1[x, c], & \text{if }c < sizeC1 \\ InImg2[x, c-sizeC1], & \text{if } c \geq sizeC1\end{cases} \]

Here is an example of result:

appendColorChannelImg.png

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::OutColorImg [Output] color image for processing operation customOutput (_pOutColorImg, outputAppendColor(_pInImg1,_pInImg2))

Global Rule description

Global rule description for algorithm :
ipsdk::imaproc::matchSize (eMatchImageSizeType::eMIST_XYZT,_pInImg1,_pInImg2) && 
ipsdk::imaproc::matchSize (eMatchImageSizeType::eMIST_XYZT,_pInImg1,_pOutColorImg) && 
ipsdk::imaproc::color::matchAppendChannel (_pInImg1,_pInImg2,_pOutColorImg) && 
ipsdk::imaproc::matchBufferType (_pInImg1,_pInImg2) && 
ipsdk::imaproc::matchBufferType (_pInImg1,_pOutColorImg)

Example of Python code :

Example imports

import PyIPSDK
import PyIPSDK.IPSDKIPLColor as color

Code Example

# opening input images
inImg1 = PyIPSDK.loadTiffImageFile(inputImgPath1)
inImg2 = PyIPSDK.loadTiffImageFile(inputImgPath2)
# images addition
outImg = color.appendColorChannelImg(inImg1, inImg2)

Example of C++ code :

Example informations

Associated library

IPSDKIPLColor

Header file

Code Example

// opening input image
ImagePtr pInImg1 = loadTiffImageFile(inputPath1);
ImagePtr pInImg2 = loadTiffImageFile(inputPath2);
// compute lightness on input image
ImagePtr pOutImg = appendColorChannelImg(pInImg1, pInImg2);
See also
AppendColorChannelImgLvl1
AppendColorChannelImgLvl2
AppendColorChannelImgLvl3

Function Documentation

◆ appendColorChannelImg() [1/2]

IPSDKIPLCOLOR_API image::ImagePtr ipsdk::imaproc::color::appendColorChannelImg ( const image::ImageConstPtr pInImg1,
const image::ImageConstPtr pInImg2 
)

wrapper function for Generates a color images by merging the color channel of the two input images

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure

◆ appendColorChannelImg() [2/2]

IPSDKIPLCOLOR_API void ipsdk::imaproc::color::appendColorChannelImg ( const image::ImageConstPtr pInImg1,
const image::ImageConstPtr pInImg2,
const image::ImagePtr pOutImg 
)

wrapper function for Generates a color images by merging the color channel of the two input images

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure