Extract regions with equal gray values from an image.
label_to_region segments an image into regions of equal gray value. One output region is generated for each gray value occuring in the image. This is similar to calling threshold__ multiple times, and accumulating the results with concat_obj. Another related operator is regiongrowing__. However, label_to_region does not perform a connection operation on the resulting regions, i.e., they may be disconnected. A typical application of label_to_region is the segmentation of label images, hence its name.
The number of output regions is limited by the system parameter 'max_outp_obj_par', which can be read via
get_system(::'max_outp_obj_par':<Anzahl>) .
label_to_region is not implemented for images of type 'real'. The input images must not contain negative gray values.
LabelImage (input_object) |
image(-array) -> object : byte / int4 |
Label image. |
Regions (output_object) |
region-array -> object |
Regions having a constant gray value. |
Let x1 be the minumum x-coordinate, x2 the maximum x-coordinate, y1 be the minumum y-coordinate, and y2 the maximum y-coordinate of a particular gray value. Furthermore, let N be the number of different gray values in the image. Then the runtime complexity is O(N * (x2 - x1 + 1) * (y2 - y1 + 1))
label_to_region returns TRUE if the gray values lie within a correct range. The behaviour with respect to the input images and output regions can be determined by setting the values of the flags 'no_object_result', 'empty_region_result', and 'store_empty_region' with set_system. If necessary, an exception is raised.
min_max__, sobel_amp, gauss__, reduce_domain, diff_of_gauss__
connection, dilation1, erosion1, opening, closing, count, shape_trans, skeleton
threshold__, concat_obj, regiongrowing__, region_to_label