cml_reconstruct Reconstruct a color image from cmorpho_lines of cmimage
cml_reconstruct [-i] m_image image_out
-i : use the maxvalue of the cmorpho_lines (default minvalue)
m_image : input cmimage
image_out : reconstructed cfimage
Cfimage cml_reconstruct (v_flag , m_image )
char *v_flag ;
Cmimage m_image ;
This module reconstructs a cfimage image_out using the cmorpho_lines contain in the input m_image. It works as the module ml_reconstruct, but if the later assumes gray level images only, cml_reconstruct can be applied on 3-planes color images.
Please read before the description of ml_reconstruct to get the reconstruction process for gray level images, as well as the description of cml_decompose to get the total order in IR3 used in the case of 3-planes color images. This extension to multi-valued images is exposed in [CF00].
The module cml_reconstruct allows to reconstruct an image in the HSI color model from the color topographic map given by the cmorpho_lines. Use the module cfchgchannel to convert this HSI image to a RGB one.
The following example computes in a bitmap image mapbaboon the color topographic map of the baboon image shown at the bottom of the color plate in [CF00] :
# Get the baboon image in the HSI model cfchgchannels -c 1 ccimage baboon.hsi # Quantify the HSI plane to reduce data # without affecting too much visual quality cfquant baboon.hsi qbaboon.hsi 17 4 8 # Compute the color topographic map by means # of the cmorpho_lines. Does not retain small # level lines (length lower than 20 points), # which are negligible. cml_decompose -l 20 qbaboon.hsi baboon.cml # Reconstruct a HSI image from the remaining # level lines. Very similar to a grain filter. cml_reconstruct baboon.cml rbaboon.hsi # Get the image in RGB color model cfchgchannels -c 1 -i rbaboon.hsi rbaboon.rgb # Get the color topographic map geometry with # the reconstructed image in background cml_draw -a rbaboon.rgb baboon.cml mapbaboon
Last Modification date : Thu Apr 15 08:22:05 2004
Jacques Froment, Georges Koepfler