---
name: "lqr_carver_bias_set_energy_function_builtin"
section: "3"
platform: "linux"
package: "liblqr-1-0-dev"
version: "0.4.1-2"
release: "Debian 7 (Wheezy)"
platforms: ["linux"]
url: "https://new.carta.tech/lqr_carver_bias_set_energy_function_builtin"
---

# lqr\_carver\_bias\_set\_energy\_function\_builtin(3)

set a builtin energy function for a LqrCarver object

## NAME

lqr\_carver\_bias\_set\_energy\_function\_builtin - set a builtin energy function for a LqrCarver object

## SYNOPSIS

```
#include <lqr.h>
```

**LqrRetVal lqr\_carver\_set\_energy\_function\_builtin(LqrCarver\*** *carver***, LqrEnergyFuncBuiltinType** *ef\_ind***);**

## DESCRIPTION

The function **lqr\_carver\_set\_energy\_function\_builtin** allows to pick a builtin energy function for the LqrCarver object pointed to by *carver*.

The possible values for *ef\_ind* are:

LQR\_EF\_GRAD\_XABS

absolute value of the brightness gradient in the direction of the rescaling (this is the default)

LQR\_EF\_GRAD\_SUMABS

sum of absolute values of the brightness gradients in both directions

LQR\_EF\_GRAD\_NORM

norm of the brightness gradient

LQR\_EF\_LUMA\_GRAD\_XABS

absolute value of the luma gradient in the direction of the rescaling

LQR\_EF\_LUMA\_GRAD\_SUMABS

sum of absolute values of the luma gradients in both directions

LQR\_EF\_LUMA\_GRAD\_NORM

norm of the luma gradient

LQR\_EF\_NULL

null

All of the above gradient functions have a radius of 1 pixel.

## RETURN VALUE

The return value follows the Liquid Rescale library signalling system.

## SEE ALSO

**lqr\_carver\_set\_energy\_function**(3), [**lqr\_carver\_get\_energy**(3)](/lqr_carver_get_energy/3.md)

## COPYRIGHT

Copyright © 2007-2009 Carlo Baldassi\
