Tuning

Choosing a gradient function
Choosing the resize order

The behaviour can be tuned through some additional functions.

Choosing a gradient function

The automatic feature detection relies on the computation of the gradient in each pixel of the image. The function to use can be set through:

void lqr_carver_set_gradient_function(LqrCarver*  carver,
 LqrGradFuncType  gf_ind);

The possible values for gf_ind are:

LQR_GF_XABS

transversal absolute value (this is the default)

LQR_GF_NORM

gradient norm

LQR_GF_SUMABS

sum of absolute values

LQR_GF_NULL

null

The null value can be used to override completely the automatic feature detection (see the Adding a bias section).

Choosing the resize order

When lqr_carver_resize is asked to resize along both directions in a single step, it has to choose which direction to resize first. The resize order can be changed through this function:

void lqr_carver_set_resize_order(LqrCarver*  carver,
 LqrResizeOrder  resize_order);

The possible values for resize_order are:

LQR_RES_ORDER_HOR

resize horizonally first (this is the default)

LQR_RES_ORDER_VERT

resize vertically first