bytespace-nearest-colormap

Synopsis

(bytespace-nearest-colormap bytespace colormap)

Parameters

  • bytespace
  • colormap

Description

This procedure searches for the nearest colormap in the specified bytespace by naive brute force. The search space is divided internally in 16 parts and 16 threads are working in parallel.

The distance metric in effect is the Manhattan metric (L1 norm), each color channel is treated as a separate and distinct dimension. The resolution of the query colormap must match the number of dimensions of the bytespace, otherwise an error is signalled. If the bytespace contains no points (being color images), #f is returned.

For classification purposes, the associated value is returned in the ocol (originating column) value slot in the greymap.

Side Effects

Return Value

The guaranteed nearest colormap is returned (or #f is the bytespace contains no elements).

See Also

Example