shape_histo_all — Determine a histogram of features along all threshold values.
The operator shape_histo_all carries out 255 threshold operations within Region with the gray values of Image. The entry i in the histogram corresponds to the number of connected components/holes of this image segmented with the threshold i (Feature = 'connected_components', 'holes') or the mean value of the feature values of the regions segmented in this way (Feature = 'convexity', 'compactness', 'ansisometry'), respectively.
The histogram can also be displayed directly as a graphic via the operators set_paint(::WindowHandle,'component_histogram':) and disp_image.
The operator shape_histo_all expects a region and exactly one gray value image as input. Because of the power of this operator the runtime of shape_histo_all is relatively large!
Note that the operator shape_histo_all only considers the given Region and ignores any previously set domain of the input image Image.
Region in which the features are to be examined.
Gray value image.
Feature to be examined.
Default value: 'connected_components'
List of values: 'anisometry', 'compactness', 'connected_components', 'convexity', '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
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_all 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>:), the behavior in case of empty region is set via set_system(::'empty_region_result',<Result>:). If necessary an exception is raised.
histo_to_thresh, threshold, gen_region_histo
connection, convexity, compactness, connect_and_holes, entropy_gray, gray_histo, set_paint, count_obj