Function

vImageMultidimensionalTable_Create

Creates a multidimensional table for use with vImage's multidimensional interpolated lookup functions.

Declaration

vImage_MultidimensionalTable vImageMultidimensionalTable_Create(const uint16_t *tableData, uint32_t numSrcChannels, uint32_t numDestChannels, const uint8_t table_entries_per_dimension[], vImageMDTableUsageHint hint, vImage_Flags flags, vImage_Error *err);

Parameters

tableData

A pointer to the data used to build the table.

numSrcChannels

The number of channels in an input pixel.

numDestChannels

The number of channels in an output pixel.

table_entries_per_dimension

An array containing the number of table entries for each dimension in numSrcChannels.

hint

An indication of how the table is used. Pass either kvImageMDTableHint_16Q12 or kvImageMDTableHint_Float, or both. If only one hint is passed, vImage can save memory and time by omitting work to set up the table for unused formats.

flags

The options to use when performing the operation. If you plan to perform your own tiling or use multithreading, pass kvImageDoNotTile.

err

A pointer to a vImage_Error. If err != NULL, on return, the memory pointed to by error is overwritten with an appropriate error or kvImageNoError. It's sufficient to simply check the function's return value against NULL to determine whether the function succeeded.

Return Value

kvImageNoError; otherwise, one of the error codes described in Data Types and Constants.

Discussion

The input data is a contiguous array of N-dimensional samples which define the lookup table grid points. The samples have range [0,65535] interpreted as [0, 1.0f]. Note that, like with the Planar16U format, samples have an implicit divide by 65535.

See Also

Transforming with a Multidimensional Lookup Table

vImage_MultidimensionalTable

A structure representing a multidimensional table for use with vImage's multidimensional interpolated lookup functions.

vImageMDTableUsageHint

Constants that indicate how a multidimensional table will be used.

vImageMultiDimensionalInterpolatedLookupTable_PlanarF

Uses a multidimensional lookup table to transform an image in PlanarF format.

vImageMultiDimensionalInterpolatedLookupTable_Planar16Q12

Uses a multidimensional lookup table to transform an image in Planar16Q12 format.

vImage_InterpolationMethod

Constants that represent different interpolation methods.

vImageMultidimensionalTable_Retain

Retains a multidimensional table.

vImageMultidimensionalTable_Release

Releases a multidimensional table.