![]() |
IPSDK
4_1_0_2
IPSDK : Image Processing Software Development Kit
|
Computes the ratio between the number of pixels and the total image size. More...
Computes the ratio between the number of pixels and the total image size.
This algorithm computes the ratio between the 2D objects surfaces and the total image area. Let AreaPercent(i) be the result for the ith object, Area(i) its area and (sizeX, sizeY) the image size, the calculation can be expressed as follows:
In the case of binary images, the result contains the area ratio for the background (pixels set to 0) at index 0 and the area ratio for the foreground (pixels set to 1) at index 1.
In the case of label images, the result contains the area ratio for the background (pixels set to 0) at index 0 and then the area ratio for each label.
Here is an example of result for a label image:
Attribute description for algorithm :
| Name | ToolTip | Default Initializer |
|---|---|---|
| ipsdk::imaproc::attr::InBinLabImg | [Input] binary or label image for processing operation | X |
| ipsdk::imaproc::attr::InOptMaskImg | [Input Optional] Binary image for masking operation | X |
| ipsdk::imaproc::attr::OutPIValues | [Output] plan indexed collection of values | ipsdk::imaproc::fromImage (_pOutPIValues, _pInBinLabImg) |
Global rule description for algorithm :
ipsdk::processor::If (
ipsdk::processor::isSet (_pInOptMaskImg),
ipsdk::imaproc::matchSize (_pInBinLabImg,_pInOptMaskImg),
ipsdk::processor::none ()) &&
ipsdk::imaproc::matchImagePlans (_pOutPIValues,_pInBinLabImg,eImagePlansMatchPolicy::eIPMP_ZCT)
| IPSDKIPLGLOBALMEASURE_API ipsdk::imaproc::attr::DoublesPtr ipsdk::imaproc::glbmsr::areaPercent2dMsr | ( | const ipsdk::image::ImageConstPtr & | pInImg | ) |
wrapper function for Computes the ratio between the number of pixels and the total image size.
| ipsdk::processor::IPSDKBaseProcessingException | on failure |
| IPSDKIPLGLOBALMEASURE_API ipsdk::imaproc::attr::DoublesPtr ipsdk::imaproc::glbmsr::areaPercent2dMsr | ( | const ipsdk::image::ImageConstPtr & | pInImg, |
| const ipsdk::image::ImageConstPtr & | pInMaskImg | ||
| ) |
wrapper function for Computes the ratio between the number of pixels and the total image size.
| ipsdk::processor::IPSDKBaseProcessingException | on failure |
| IPSDKIPLGLOBALMEASURE_API ipsdk::imaproc::attr::PlanIndexedDoublesPtr ipsdk::imaproc::glbmsr::multiSlice_areaPercent2dMsr | ( | const ipsdk::image::ImageConstPtr & | pInImg | ) |
wrapper function for Computes the ratio between the number of pixels and the total image size.
| ipsdk::processor::IPSDKBaseProcessingException | on failure |
| IPSDKIPLGLOBALMEASURE_API ipsdk::imaproc::attr::PlanIndexedDoublesPtr ipsdk::imaproc::glbmsr::multiSlice_areaPercent2dMsr | ( | const ipsdk::image::ImageConstPtr & | pInImg, |
| const ipsdk::image::ImageConstPtr & | pInMaskImg | ||
| ) |
wrapper function for Computes the ratio between the number of pixels and the total image size.
| ipsdk::processor::IPSDKBaseProcessingException | on failure |
1.8.14