This file is indexed.

/usr/share/doc/liblqr-1-0-dev/html/ref-lqr-carver-set-energy-function.html is in liblqr-1-0-dev 0.4.1-1.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>lqr_carver_set_energy_function</title><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="The Liquid Rescale library Manual"><link rel="up" href="ref-energy.html" title="Energy"><link rel="prev" href="ref-lqr-carver-set-energy-function-builtin.html" title="lqr_carver_set_energy_function_builtin"><link rel="next" href="ref-lqr-carver-get-energy.html" title="lqr_carver_get_energy"></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_set_energy_function</code></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ref-lqr-carver-set-energy-function-builtin.html">Prev</a> </td><th width="60%" align="center">Energy</th><td width="20%" align="right"> <a accesskey="n" href="ref-lqr-carver-get-energy.html">Next</a></td></tr></table><hr></div><div class="refentry" title="lqr_carver_set_energy_function"><a name="ref-lqr-carver-set-energy-function"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>lqr_carver_bias_set_energy_function &#8212; set a custom energy function for a <code class="classname">LqrCarver</code> object</p></div><div class="refsynopsisdiv" title="Synopsis"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;lqr.h&gt;</pre><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr><td><code class="funcdef">LqrRetVal <b class="fsfunc">lqr_carver_set_energy_function</b>(</code></td><td>LqrCarver* <var class="pdparam">carver</var>, </td></tr><tr><td> </td><td>LqrEnergyFunc <var class="pdparam">en_func</var>, </td></tr><tr><td> </td><td>gint <var class="pdparam">radius</var>, </td></tr><tr><td> </td><td>LqrEnergyReaderType <var class="pdparam">reader_type</var>, </td></tr><tr><td> </td><td>gpointer <var class="pdparam">extra_data</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1" title="Description"><a name="idp33699008"></a><h2>Description</h2><p>
                        The function <code class="function">lqr_carver_set_energy_function</code> assigns the energy function
                        <em class="parameter"><code>en_func</code></em> to the <code class="classname">LqrCarver</code> object pointed to by
                        <em class="parameter"><code>carver</code></em> (see below for more details on custom functions definitions).
                    </p><p>
                        The parameter <em class="parameter"><code>radius</code></em> determines the size of the square region which
                        affects the computation around each pixel (the side of the square will be <code class="literal">2 *
                        <em class="parameter"><code>radius</code></em> + 1</code> pixels long).
                    </p><p>
                        The parameter <em class="parameter"><code>reader_type</code></em> sets the reader type used when reading the
                        image, and therefore it determines what quantity will be passed on to the function
                        <em class="parameter"><code>en_func</code></em> (see below for more details on reader types).
                    </p><p>
                        The parameter <em class="parameter"><code>extra_data</code></em> is a (void) pointer which can be used to pass on
                        additional values to the function <em class="parameter"><code>ef_func</code></em>.
                    </p></div><div class="refsect1" title="Custom functions definition"><a name="idp33709792"></a><h2>Custom functions definition</h2><p>
                        The function <em class="parameter"><code>en_func</code></em> must be of type
                        <code class="classname">LqrEnergyFunc</code>, whose prototype is defined by:
                        </p><pre class="programlisting">
typedef gfloat (*LqrEnergyFunc) (gint x, gint y, gint img_width, gint img_height, LqrReadingWindow * rwindow, gpointer extra_data);
                        </pre><p>
                        Such a function is expected to compute the energy at pixel <em class="parameter"><code>x</code></em>, <em class="parameter"><code>y</code></em> based on the
                        knowledge of the current image size (obtained from <em class="parameter"><code>width</code></em> and <em class="parameter"><code>height</code></em>) and the content of
                        the image in a square around that pixel, which is passed through the
                        <em class="parameter"><code>rwindow</code></em> reading window.
                    </p><p>
                        In most cases, the parameters <em class="parameter"><code>x</code></em>, <em class="parameter"><code>y</code></em>, <em class="parameter"><code>width</code></em> and <em class="parameter"><code>height</code></em> would only be used
                        to determine whether the region under consideration is at the image boundary or not.
                    </p><p>
                        The <em class="parameter"><code>rwindow</code></em> content must be read using the function
                        <a class="xref" href="ref-lqr-rwindow-read.html" title="lqr_rwindow_read"><span class="refentrytitle"><code class="function">lqr_rwindow_read</code></span>(3)</a>.
                    </p></div><div class="refsect1" title="Reader types"><a name="idp33722368"></a><h2>Reader types</h2><p>
                        The <span class="type"><code class="literal">LqrEnergyReaderType</code></span> is an enum which can take these values
                        (also noted is the number of channels of the corresponging reading window):
                        </p><div class="variablelist"><dl><dt><span class="term"><code class="literal">LQR_ER_BRIGHTNESS</code></span></dt><dd><p>
                                        brightness (1 channel)
                                    </p></dd><dt><span class="term"><code class="literal">LQR_ER_BRIGHTNESS</code></span></dt><dd><p>
                                        luma (1 channel)
                                    </p></dd><dt><span class="term"><code class="literal">LQR_ER_RGBA</code></span></dt><dd><p>
                                        RGBA (4 channels)
                                    </p></dd><dt><span class="term"><code class="literal">LQR_ER_CUSTOM</code></span></dt><dd><p>
                                        read the normalised image channels as they are (as many channels as the image has)
                                    </p></dd></dl></div><p>
                        These readouts always return values beetween <code class="literal">0</code> and <code class="literal">1</code>.
                    </p><p>
                        Note that these readouts may have special meanings depending on the image type:
                        </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>
                                    for <code class="literal">LQR_GREY_IMAGE</code>, <code class="literal">LQR_GREYA_IMAGE</code> and
                                    <code class="literal">LQR_CUSTOM_IMAGE</code> images, the <code class="literal">LQR_ER_LUMA</code>
                                    readout will yield the same result as <code class="literal">LQR_ER_BRIGHTNESS</code>
                                </p></li><li class="listitem"><p>
                                    for <code class="literal">LQR_CUSTOM_IMAGE</code> images, the <code class="literal">LQR_ER_BRIGHTNESS</code>
                                    readout will return the average pixel value (additive, i.e. if a black channel is
                                    present the channel values will be inverted and multiplied by the black channel
                                    inverse), multiplied by the alpha channel value.
                                </p></li><li class="listitem"><p>
                                    for <code class="literal">LQR_CUSTOM_IMAGE</code> images, the <code class="literal">LQR_ER_RGBA</code>
                                    readout <span class="emphasis"><em>cannot be used</em></span>: it will always return
                                    <code class="literal">0</code>
                                </p></li></ul></div><p>
                    </p></div><div class="refsect1" title="Return value"><a name="idp33746256"></a><h2>Return value</h2><p>
                        The return value follows the Liquid Rescale library signalling system.
                    </p></div><div class="refsect1" title="See also"><a name="idp33747664"></a><h2>See also</h2><p>
                        <span class="simplelist"><a class="xref" href="ref-lqr-carver-set-energy-function-builtin.html" title="lqr_carver_set_energy_function_builtin"><span class="refentrytitle"><code class="function">lqr_carver_set_energy_function_builtin</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-get-energy.html" title="lqr_carver_get_energy"><span class="refentrytitle"><code class="function">lqr_carver_get_energy</code></span>(3)</a>, <a class="xref" href="ref-lqr-rwindow-read.html" title="lqr_rwindow_read"><span class="refentrytitle"><code class="function">lqr_rwindow_read</code></span>(3)</a>, <a class="xref" href="ref-lqr-rwindow-get-read-t.html" title="lqr_rwindow_get_read_t"><span class="refentrytitle"><code class="function">lqr_rwindow_get_read_t</code></span>(3)</a>, <a class="xref" href="ref-lqr-rwindow-get-radius.html" title="lqr_rwindow_get_radius"><span class="refentrytitle"><code class="function">lqr_rwindow_get_radius</code></span>(3)</a>, <a class="xref" href="ref-lqr-rwindow-get-channels.html" title="lqr_rwindow_get_channels"><span class="refentrytitle"><code class="function">lqr_rwindow_get_channels</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-lqr-carver-set-energy-function-builtin.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="ref-energy.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ref-lqr-carver-get-energy.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><code class="function">lqr_carver_set_energy_function_builtin</code> </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_get_energy</code></td></tr></table></div></body></html>