Name
shape_histo_allT_shape_histo_allShapeHistoAllshape_histo_allShapeHistoAllShapeHistoAll — Determine a histogram of features along all threshold values.
The operator shape_histo_allshape_histo_allShapeHistoAllshape_histo_allShapeHistoAllShapeHistoAll carries out 255 threshold
operations within RegionRegionRegionRegionRegionregion with the gray values of
ImageImageImageImageImageimage. The entry i in the histogram corresponds to the
number of connected components/holes of this image segmented with
the threshold i (FeatureFeatureFeatureFeatureFeaturefeature =
'connected_components'"connected_components""connected_components""connected_components""connected_components""connected_components", 'holes'"holes""holes""holes""holes""holes") or the mean
value of the feature values of the regions segmented in this way
(FeatureFeatureFeatureFeatureFeaturefeature = 'convexity'"convexity""convexity""convexity""convexity""convexity", 'compactness'"compactness""compactness""compactness""compactness""compactness",
'ansisometry'"ansisometry""ansisometry""ansisometry""ansisometry""ansisometry"), respectively.
The histogram can also be displayed directly as a graphic via the
operators set_paint(::WindowHandle,'component_histogram':)set_paint(WindowHandle,"component_histogram")SetPaint(WindowHandle,"component_histogram")set_paint(WindowHandle,"component_histogram")SetPaint(WindowHandle,"component_histogram")SetPaint(WindowHandle,"component_histogram") and
disp_imagedisp_imageDispImagedisp_imageDispImageDispImage.
The operator shape_histo_allshape_histo_allShapeHistoAllshape_histo_allShapeHistoAllShapeHistoAll expects a region and exactly
one gray value image as input. Because of the power of this
operator the runtime of shape_histo_allshape_histo_allShapeHistoAllshape_histo_allShapeHistoAllShapeHistoAll is relatively large!
Note that the operator shape_histo_allshape_histo_allShapeHistoAllshape_histo_allShapeHistoAllShapeHistoAll only considers
the given RegionRegionRegionRegionRegionregion and ignores any previously set domain
of the input image ImageImageImageImageImageimage.
- Multithreading type: reentrant (runs in parallel with non-exclusive operators).
- Multithreading scope: global (may be called from any thread).
- Processed without parallelization.
Region in which the features are to be examined.
Feature to be examined.
Default value:
'connected_components'
"connected_components"
"connected_components"
"connected_components"
"connected_components"
"connected_components"
List of values: 'anisometry'"anisometry""anisometry""anisometry""anisometry""anisometry", 'compactness'"compactness""compactness""compactness""compactness""compactness", 'connected_components'"connected_components""connected_components""connected_components""connected_components""connected_components", 'convexity'"convexity""convexity""convexity""convexity""convexity", 'holes'"holes""holes""holes""holes""holes"
Absolute distribution of the feature.
Relative distribution of the feature.
* Simulation of shape_histo_all with feature 'connected_components':
* my_shape_histo_all(Region,Image,AbsHisto,RelHisto):
reduce_domain(Region,Image,RegionGray)
for i := 0 to 255 by 1
threshold(RegionGray,Seg,i,255)
connect_and_holes (Seg, NumConnected, _)
AbsHisto[i] := NumConnected
endfor
Sum := 0
for i := 0 to 255 by 1
Sum := Sum+AbsHisto[i]
endfor
for i := 0 to 255 by 1
RelHisto[i] := AbsHisto[i]/Sum
endfor
/* Simulation of shape_histo_all with feature 'connected_components': */
my_shape_histo_all(Hobject Region,Hobject Image,
Hlong AbsHisto[], double RelHisto[])
{
Hlong i,sum;
Hobject RegionGray,Seg;
reduce_domain(Region,Image,&RegionGray);
for (i=0; i<256; i++) {
threshold(RegionGray,&Seg,(double)i,255.0);
connect_and_holes(Seg,&AbsHisto[i],NULL);
clear_obj(Seg);
}
clear_obj(RegionGray); sum = 0;
for (i=0; i<256; i++)
sum += AbsHisto[i];
for (i=0; i<256; i++)
RelHist[i] = (double)AbsHisto[i]/Sum;
}
* Simulation of shape_histo_all with feature 'connected_components':
* my_shape_histo_all(Region,Image,AbsHisto,RelHisto):
reduce_domain(Region,Image,RegionGray)
for i := 0 to 255 by 1
threshold(RegionGray,Seg,i,255)
connect_and_holes (Seg, NumConnected, _)
AbsHisto[i] := NumConnected
endfor
Sum := 0
for i := 0 to 255 by 1
Sum := Sum+AbsHisto[i]
endfor
for i := 0 to 255 by 1
RelHisto[i] := AbsHisto[i]/Sum
endfor
* Simulation of shape_histo_all with feature 'connected_components':
* my_shape_histo_all(Region,Image,AbsHisto,RelHisto):
reduce_domain(Region,Image,RegionGray)
for i := 0 to 255 by 1
threshold(RegionGray,Seg,i,255)
connect_and_holes (Seg, NumConnected, _)
AbsHisto[i] := NumConnected
endfor
Sum := 0
for i := 0 to 255 by 1
Sum := Sum+AbsHisto[i]
endfor
for i := 0 to 255 by 1
RelHisto[i] := AbsHisto[i]/Sum
endfor
* Simulation of shape_histo_all with feature 'connected_components':
* my_shape_histo_all(Region,Image,AbsHisto,RelHisto):
reduce_domain(Region,Image,RegionGray)
for i := 0 to 255 by 1
threshold(RegionGray,Seg,i,255)
connect_and_holes (Seg, NumConnected, _)
AbsHisto[i] := NumConnected
endfor
Sum := 0
for i := 0 to 255 by 1
Sum := Sum+AbsHisto[i]
endfor
for i := 0 to 255 by 1
RelHisto[i] := AbsHisto[i]/Sum
endfor
* Simulation of shape_histo_all with feature 'connected_components':
* my_shape_histo_all(Region,Image,AbsHisto,RelHisto):
reduce_domain(Region,Image,RegionGray)
for i := 0 to 255 by 1
threshold(RegionGray,Seg,i,255)
connect_and_holes (Seg, NumConnected, _)
AbsHisto[i] := NumConnected
endfor
Sum := 0
for i := 0 to 255 by 1
Sum := Sum+AbsHisto[i]
endfor
for i := 0 to 255 by 1
RelHisto[i] := AbsHisto[i]/Sum
endfor
If F is the area of the input region and N the mean number of
connected components the runtime complexity is
O(255 * (F + sqrt(F) * sqrt(N)).
The operator shape_histo_allshape_histo_allShapeHistoAllshape_histo_allShapeHistoAllShapeHistoAll returns the value 2 (H_MSG_TRUE) if an
image with the defined gray values is entered. The behavior in case
of empty input (no input images) is set via the operator
set_system(::'no_object_result',<Result>:)set_system("no_object_result",<Result>)SetSystem("no_object_result",<Result>)set_system("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>),
the behavior in case of empty region is set via
set_system(::'empty_region_result',<Result>:)set_system("empty_region_result",<Result>)SetSystem("empty_region_result",<Result>)set_system("empty_region_result",<Result>)SetSystem("empty_region_result",<Result>)SetSystem("empty_region_result",<Result>).
If necessary an exception is raised.
histo_to_threshhisto_to_threshHistoToThreshhisto_to_threshHistoToThreshHistoToThresh,
thresholdthresholdThresholdthresholdThresholdThreshold,
gen_region_histogen_region_histoGenRegionHistogen_region_histoGenRegionHistoGenRegionHisto
shape_histo_pointshape_histo_pointShapeHistoPointshape_histo_pointShapeHistoPointShapeHistoPoint
connectionconnectionConnectionconnectionConnectionConnection,
convexityconvexityConvexityconvexityConvexityConvexity,
compactnesscompactnessCompactnesscompactnessCompactnessCompactness,
connect_and_holesconnect_and_holesConnectAndHolesconnect_and_holesConnectAndHolesConnectAndHoles,
entropy_grayentropy_grayEntropyGrayentropy_grayEntropyGrayEntropyGray,
gray_histogray_histoGrayHistogray_histoGrayHistoGrayHisto,
set_paintset_paintSetPaintset_paintSetPaintSetPaint,
count_objcount_objCountObjcount_objCountObjCountObj
Foundation