region_to_mean — Paint regions with their average gray value.
region_to_mean returns an image in which the regions Regions are painted with their average gray value based on the image Image. This operator is mainly intended to visualize segmentation results.
original gray-value image.
Result image with painted regions.
read_image(Image,'fabrik') regiongrowing(Image,Regions,3,3,6,100) region_to_mean(Regions,Image,Disp) dev_display(Disp) dev_set_draw('margin') dev_display(Regions)
region_to_mean returns 2 (H_MSG_TRUE) if all parameters are correct. If the input is empty the behavior can be set via set_system('no_object_result',<Result>). If necessary, an exception is raised.