The script contains the 'quantise_image' function called upon in the 'write_flex_material_table.m' script.
The quantiser works by looking up a 'colour_map' which contains quantisation values associated to predefined materials. When the image is quantised, the values are assigned to the closest material value i.e. each pixel is tagged to a specific material which FlexLab can process.
Tested with PZFlex build: 3.0-2012-02-10-1 Windows 64 bit
Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.