NAME

get_approximate_error_hull_data - Gets approximation of convex hull error data

SYNOPSIS

#include "h/h_misc.h"

Example compile flags (system dependent):
  -DLINUX_X86_64 -DLINUX_X86_64_OPTERON  -DGNU_COMPILER 
   -I/home/kobus/include
   -L/home/kobus/misc/load/linux_x86_64_opteron -L/usr/lib/x86_64-linux-gnu
  -lKJB                               -lfftw3  -lgsl -lgslcblas -ljpeg  -lSVM -lstdc++                    -lpthread -lSLATEC -lg2c    -lacml -lacml_mv -lblas -lg2c      -lncursesw 


int get_approximate_error_hull_data
(
	Matrix **error_mpp,
	const Matrix *mp,
	int block_size,
	const Hull *hp
);

DESCRIPTION

This routine is a support routine for expand_hull, which is exported because it is also used in the gamut program. It is likely too specialized to be considered a double library module. It takes a matrix pointed to "mp" which is assumed to be divided into consective row blocks, consisting of "block_size" rows each. The blocks are assumed to be various error points (such as the corners of an error box) which, in order to reduce convex hull precision problems, need to be distilled into one point. This routine does this by choosing the point which is furthest from the hull "hp" (expensive!). The target matrix **error_mpp will end up having (mp->num_rows / block_size) rows, and mp->num_cols, columns.

RETURNS

NO_ERROR on success, and ERROR on failure, with an error message being set.

WARNING

It is assumed that at least one of the points is either on the hull boundary, or outside the hull boundary. In other-words, all points in an error block cannot be inside the hull. We include this check, because error invariably expands hulls, and proceeding naively with the point which is closest to the boundary, even if it is well inside the hull, would contract the hull in that region.

DISCLAIMER

This software is not adequatedly tested. It is recomended that results are checked independantly where appropriate.

AUTHOR

Kobus Barnard

DOCUMENTER

Kobus Barnard

SEE ALSO

get_interior_distance_to_hull , get_distance_to_hull , expand_hull , trim_2D_hull