/usr/share/doc/liblqr-1-0-dev/html/ref-lqr-carver-bias-add.html is in liblqr-1-0-dev 0.4.2-2.1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 | <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>lqr_carver_bias_add</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"><link rel="home" href="index.html" title="The Liquid Rescale library Manual"><link rel="up" href="ref-bias.html" title="Bias"><link rel="prev" href="ref-bias.html" title="Bias"><link rel="next" href="ref-lqr-carver-bias-clear.html" title="lqr_carver_bias_clear"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"><code class="function">lqr_carver_bias_add</code></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ref-bias.html">Prev</a> </td><th width="60%" align="center">Bias</th><td width="20%" align="right"> <a accesskey="n" href="ref-lqr-carver-bias-clear.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="ref-lqr-carver-bias-add"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>lqr_carver_bias_add_xy, lqr_carver_bias_add_area, lqr_carver_bias_add, lqr_carver_bias_add_rgb_area, lqr_carver_bias_add_rgb — update an <code class="classname">LqrCarver</code> bias</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include <lqr.h></pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">LqrRetVal <b class="fsfunc">lqr_carver_bias_add_xy</b>(</code></td><td>LqrCarver* <var class="pdparam">carver</var>, </td></tr><tr><td> </td><td>gdouble <var class="pdparam">bias</var>, </td></tr><tr><td> </td><td>gint <var class="pdparam">x</var>, </td></tr><tr><td> </td><td>gint <var class="pdparam">y</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">LqrRetVal <b class="fsfunc">lqr_carver_bias_add_area</b>(</code></td><td>LqrCarver* <var class="pdparam">carver</var>, </td></tr><tr><td> </td><td>gdouble* <var class="pdparam">buffer</var>, </td></tr><tr><td> </td><td>gint <var class="pdparam">bias_factor</var>, </td></tr><tr><td> </td><td>gint <var class="pdparam">width</var>, </td></tr><tr><td> </td><td>gint <var class="pdparam">height</var>, </td></tr><tr><td> </td><td>gint <var class="pdparam">x_off</var>, </td></tr><tr><td> </td><td>gint <var class="pdparam">y_off</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">LqrRetVal <b class="fsfunc">lqr_carver_bias_add</b>(</code></td><td>LqrCarver* <var class="pdparam">carver</var>, </td></tr><tr><td> </td><td>gdouble* <var class="pdparam">buffer</var>, </td></tr><tr><td> </td><td>gint <var class="pdparam">bias_factor</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">LqrRetVal <b class="fsfunc">lqr_carver_bias_add_rgb_area</b>(</code></td><td>LqrCarver* <var class="pdparam">carver</var>, </td></tr><tr><td> </td><td>gdouble* <var class="pdparam">buffer</var>, </td></tr><tr><td> </td><td>gint <var class="pdparam">bias_factor</var>, </td></tr><tr><td> </td><td>gint <var class="pdparam">channels</var>, </td></tr><tr><td> </td><td>gint <var class="pdparam">width</var>, </td></tr><tr><td> </td><td>gint <var class="pdparam">height</var>, </td></tr><tr><td> </td><td>gint <var class="pdparam">x_off</var>, </td></tr><tr><td> </td><td>gint <var class="pdparam">y_off</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">LqrRetVal <b class="fsfunc">lqr_carver_bias_add_rgb</b>(</code></td><td>LqrCarver* <var class="pdparam">carver</var>, </td></tr><tr><td> </td><td>gdouble* <var class="pdparam">buffer</var>, </td></tr><tr><td> </td><td>gint <var class="pdparam">bias_factor</var>, </td></tr><tr><td> </td><td>gint <var class="pdparam">channels</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm4863"></a><h2>Foreword</h2><p>
All the functions described in this page are used to add a bias to <code class="classname">LqrCarver</code> objects. A
positive biased pixel will be more likely to be avoided by seams, and thus be preserved during
rescaling, while a negative bias has the opposite effect.
</p><p>
All of these functions must be called before <a class="xref" href="ref-lqr-carver-resize.html" title="lqr_carver_resize"><span class="refentrytitle"><code class="function">lqr_carver_resize</code></span>(3)</a>. If
called multiple times, the biases added at each call will sum up.
</p></div><div class="refsect1"><a name="idm4869"></a><h2>Adding a bias pixel by pixel</h2><p>
The function <code class="function">lqr_carver_bias_add_xy</code> adds a bias to the <em class="parameter"><code>x</code></em>, <em class="parameter"><code>y</code></em>
pixel of the image loaded into the <code class="classname">LqrCarver</code> object pointed to by <em class="parameter"><code>carver</code></em>
</p><p>
A typical value for <em class="parameter"><code>bias_factor</code></em> would be <code class="literal">1000</code> (in
absolute value).
</p></div><div class="refsect1"><a name="idm4880"></a><h2>Adding a bias from a buffer</h2><p>
The function <code class="function">lqr_carver_bias_add_area</code> adds a bias to an area of the image
loaded into the <code class="classname">LqrCarver</code> object pointed to by <em class="parameter"><code>carver</code></em>.
</p><p>
The parameter <em class="parameter"><code>buffer</code></em> must point to an array of <span class="type">doubles</span> of
size <code class="literal"><em class="parameter"><code>width</code></em> * <em class="parameter"><code>height</code></em></code>, ordered
first by rows, then by columns.
</p><p>
The offset of the area relative to the image can be specified through
<em class="parameter"><code>x_off</code></em> and <em class="parameter"><code>y_off</code></em>. The bias area can exceed the
boundary of the image, and the offsets can be negative.
</p><p>
The parameter <em class="parameter"><code>bias_factor</code></em> is an overall bias scale. A typical value when
the buffer contents are of the order of <code class="literal">1</code> would be <code class="literal">1000</code>
(in absolute value).
</p><p>
The function <code class="function">lqr_carver_bias_add</code> can be used when the area to add is of the
same size of the image loaded in the <code class="classname">LqrCarver</code> object and the offsets are <code class="literal">0</code>.
</p></div><div class="refsect1"><a name="idm4903"></a><h2>Adding a bias from an image</h2><p>
The functions <code class="function">lqr_carver_bias_add_rgb_area</code> and
<code class="function">lqr_carver_bias_add_rgb</code> are very similar to
<code class="function">lqr_carver_bias_add_area</code> and <code class="function">lqr_carver_bias_add</code>,
except that they use 8-bit multi-channel images as inputs.
</p><p>
The number of channels in the image is passed via the parameter <em class="parameter"><code>channels</code></em>.
The last channel is assumed to be the alpha (opacity) channel if <em class="parameter"><code>channels</code></em>
is equal to <code class="literal">2</code> or greater than <code class="literal">3</code> (if this is not the case,
use the previous functions).
</p><p>
The bias is computed from the average of the colour channels, multiplied by the value of the
alpha channel if present. For example, in RGBA images a white, nontransparent pixel is
equivalent to a value of <code class="literal">1.0</code> when using a buffer in
<code class="function">lqr_carver_bias_add_area</code>.
</p></div><div class="refsect1"><a name="idm4918"></a><h2>Return values</h2><p>
The return values follow the Liquid Rescale library signalling system.
</p></div><div class="refsect1"><a name="idm4921"></a><h2>See also</h2><p>
<span class="simplelist"><a class="xref" href="ref-lqr-ret-val.html" title="LqrRetVal"><span class="refentrytitle"><span class="type">LqrRetVal</span></span>(3)</a>, <a class="xref" href="ref-lqr-carver-init.html" title="lqr_carver_init"><span class="refentrytitle"><code class="function">lqr_carver_init</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-rigmask-add.html" title="lqr_carver_rigmask_add"><span class="refentrytitle"><code class="function">lqr_carver_rigmask_add</code></span>(3)</a></span>
</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ref-bias.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="ref-bias.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ref-lqr-carver-bias-clear.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Bias </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> <code class="function">lqr_carver_bias_clear</code></td></tr></table></div></body></html>
|