IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
Y projection 2d : Statistic measurement along the x axis

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

IPSDKIPLGLOBALMEASURE_API ipsdk::imaproc::attr::DoublesPtr ipsdk::imaproc::glbmsr::yProjection2d (const ipsdk::image::ImageConstPtr &pInSubImg, const ipsdk::imaproc::attr::eProjStatType &eInProjStatType)
 wrapper function for measure of common statistics indicators in the image (mean, max, etc.) computed along the X direction More...
 

Detailed Description

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

The computed statistics for each line 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 lines of the input image.

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

mandrill_yProjection2dRes.png

Attributes description

Attribute description for algorithm :

Name ToolTip Default Initializer
ipsdk::imaproc::attr::InSubImg2d [Input] grey level 2d sub image for operation X
ipsdk::imaproc::attr::InProjStatType [Input] Predefined types for a statistical projection algorithm X
ipsdk::imaproc::attr::OutProjStat [Output] Vector containing the measure of common statistics indicators in the image (mean, max, etc.) along a given direction ipsdk::processor::allocate (_pOutProjStat)

Global Rule description

Global rule description for algorithm :
ipsdk::processor::none ()

Example of Python code :

Example imports

import PyIPSDK
import PyIPSDK.IPSDKIPLGlobalMeasure as glbmsr

Code Example

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

Example of C++ code :

Example informations

Associated library

IPSDKIPLGlobalMeasure

Header file

Code Example

// compute Y minimum projection for input image
// --------------------------------------------
// compute Y maximum projection for input image
// --------------------------------------------
// compute Y sum projection for input image
// --------------------------------------------
// compute Y mean projection for input image
// --------------------------------------------
// compute Y variance projection for input image
// --------------------------------------------
// compute Y standard deviation projection for input image
// --------------------------------------------
// compute Y median projection for input image
// --------------------------------------------
See also
YProjection2dLvl1

Function Documentation

◆ yProjection2d()

IPSDKIPLGLOBALMEASURE_API ipsdk::imaproc::attr::DoublesPtr ipsdk::imaproc::glbmsr::yProjection2d ( const ipsdk::image::ImageConstPtr pInSubImg,
const ipsdk::imaproc::attr::eProjStatType eInProjStatType 
)

wrapper function for measure of common statistics indicators in the image (mean, max, etc.) computed along the X direction

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure