IPSDK 0.2
IPSDK : Image Processing Software Development Kit
X projection 2d : Statistic measurement along the y axisSee full documentation
DoublesxProjection2d (inSubImg2d,eInProjStatType)

Detailed Description

measure of common statistics indicators in the image (mean, max, etc.) computed along the Y axis

The computed statistics for each column can be : minimum, maximum, sum, mean, variance, standard deviation or median (see ipsdk::imaproc::attr::eProjStatType).

The output is a vector whose size equals to the number of columns of the input image.

Here is an example of a 8-bits grey level image and all the X projections operations which can be applied :

mandrill_xProjection2dRes.png

Example of Python code :

Example imports

import PyIPSDK
import PyIPSDK.IPSDKIPLGlobalMeasure as glbmsr

Code Example

# opening of input image
inImg = PyIPSDK.loadTiffImageFile(inputImgPath)
# x projection measurement
xProjection2dResult = glbmsr.xProjection2d(inImg, PyIPSDK.eProjStatType.ePST_Mean)
# retrieve measurement results
meanValues = xProjection2dResult.coll
print("Mean value for projected image along Y axis for x=50 is " + str(meanValues[50]))

Example of C++ code :

Example informations

Header file

#include <IPSDKIPL/IPSDKIPLGlobalMeasure/Processor/XProjection2d/XProjection2d.h>

Code Example

// compute X minimum projection for input image
// --------------------------------------------
DoublesPtr outProjStatMin = glbmsr::xProjection2d(pInImg, ipsdk::imaproc::attr::eProjStatType::ePST_Min);
// compute X maximum projection for input image
// --------------------------------------------
DoublesPtr outProjStatMax = glbmsr::xProjection2d(pInImg, ipsdk::imaproc::attr::eProjStatType::ePST_Max);
// compute X sum projection for input image
// --------------------------------------------
DoublesPtr outProjStatSum = glbmsr::xProjection2d(pInImg, ipsdk::imaproc::attr::eProjStatType::ePST_Sum);
// compute X mean projection for input image
// --------------------------------------------
DoublesPtr outProjStatMean = glbmsr::xProjection2d(pInImg, ipsdk::imaproc::attr::eProjStatType::ePST_Mean);
// compute X variance projection for input image
// --------------------------------------------
DoublesPtr outProjStatVar = glbmsr::xProjection2d(pInImg, ipsdk::imaproc::attr::eProjStatType::ePST_Variance);
// compute X standard deviation projection for input image
// --------------------------------------------
DoublesPtr outProjStatStdDev = glbmsr::xProjection2d(pInImg, ipsdk::imaproc::attr::eProjStatType::ePST_StdDev);
// compute X median projection for input image
// --------------------------------------------
DoublesPtr outProjStatMedian = glbmsr::xProjection2d(pInImg, ipsdk::imaproc::attr::eProjStatType::ePST_Median);