measure of intensity histogram for shape
More...
measure of intensity histogram for shape
Histogram measure computes the histogram of intensities for the shape, given the following parameters:
- histogram minimum and maximum; there are 3 ways to define them:
- the user specifies minimum and maximum of his choice
- they are initialized with the minimal and maximal intensities of the image
- they are initialized with the minimal and maximal intensities of the shape
- the bin width, or the number of classes of the histogram
Here is an example of histogram measurement:
- Author
- H. Delestre
- Date
- 2015/07/08
- Copyright
- 2015 Reactiv'IP, all right reserved.
measure of intensity histogram for shape
Measure synthesis :
| Measure Type | Measure Unit Type | Parameter Type | Result Type | Shape Requirements |
Intensity
|
None
|
HistogramMsrParams |
Custom
|
Row Intersections
|
See Shape measurement for additional information on these pictograms Measure Type :
This is an intensity measure
- it use image data to compute a result
- it optionally can use dependencies to other measures to compute a result (see Measure Dependencies section)
This measure can be used in 2d and 3d case
Measure Unit Type:
Measure Histogram is not associated to any unit [ipsdk::shape::analysis::eMsrUnitFormat::eMUF_NoUnit]
Measure Parameter Type :
Measure Histogram is associated to HistogramMsrParams parameters
Measure Result Type :
Measure Histogram is associated to HistogramMsrResults results
Measure Shape Requirements :
Measure Histogram requires row intersections from shape data
Measure Dependencies :
Measure Histogram has no dependency
- Note
- See Shape Analysis 2d for more information on general shape 2d analysis and measurement usage.
-
See Shape Analysis 3d for more information on general shape 3d analysis and measurement usage.
Example of Python code :
Generic example in 2d case :
import PyIPSDK
import PyIPSDK.IPSDKIPLShapeAnalysis as shapeanalysis
inMeasureInfoSet2d = PyIPSDK.createMeasureInfoSet2d()
PyIPSDK.createMeasureInfo(inMeasureInfoSet2d, "HistogramMsr")
outMeasureSet = shapeanalysis.labelAnalysis2d(inGreyImg, inLabelImg2d, inMeasureInfoSet2d)
PyIPSDK.saveCsvMeasureFile(os.path.join(tmpPath, "shape_analysis_results.csv"), outMeasureSet)
outMsr = outMeasureSet.getMeasure("HistogramMsr")
outMsrValues = outMsr.getMeasureResult().getColl(0)
print("First label measurement equal " + str(outMsrValues[1]))
Generic example in 3d case :
import PyIPSDK
import PyIPSDK.IPSDKIPLShapeAnalysis as shapeanalysis
inMeasureInfoSet3d = PyIPSDK.createMeasureInfoSet3d()
PyIPSDK.createMeasureInfo(inMeasureInfoSet3d, "HistogramMsr")
outMeasureSet = shapeanalysis.labelAnalysis3d(inGreyImg, inLabelImg, inMeasureInfoSet3d)
PyIPSDK.saveCsvMeasureFile(os.path.join(tmpPath, "shape_analysis_results.csv"), outMeasureSet)
outMsr = outMeasureSet.getMeasure("HistogramMsr")
outMsrValues = outMsr.getMeasureResult().getColl(0)
print("First label measurement equal " + str(outMsrValues[1]))
Example of C++ code :
Example informations
Associated library
IPSDKIPLShapeAnalysis
Code Example
switch(minMaxDef.value()) {
break;
break;
}
const MeasureConstPtr& pHistogramOutMsr = pOutMeasureSet->getMeasure(
"HistogramMsr");
const HistogramMsrResults& outResults = static_cast<const HistogramMsrResults&>(pHistogramOutMsr->getMeasureResult());