<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>android::RSC::ScriptIntrinsicHistogram Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div! -->
<!-- Generated by Doxygen 1.7.5.1 -->
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Overview</span></a></li>
<li class="current"><a href="annotated.html"><span>Structs</span></a></li>
</ul>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><b>android</b> </li>
<li class="navelem"><b>RSC</b> </li>
<li class="navelem"><a class="el" href="classandroid_1_1RSC_1_1ScriptIntrinsicHistogram.html">ScriptIntrinsicHistogram</a> </li>
</ul>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> |
<a href="#pub-static-methods">Static Public Member Functions</a> </div>
<div class="headertitle">
<div class="title">android::RSC::ScriptIntrinsicHistogram Class Reference</div> </div>
</div>
<div class="contents">
<!-- doxytag: class="android::RSC::ScriptIntrinsicHistogram" --><!-- doxytag: inherits="android::RSC::ScriptIntrinsic" -->
<p><code>#include <<a class="el" href="rsCppStructs_8h_source.html">rsCppStructs.h</a>></code></p>
<div class="dynheader">
Inheritance diagram for android::RSC::ScriptIntrinsicHistogram:</div>
<div class="dyncontent">
<div class="center">
<img src="classandroid_1_1RSC_1_1ScriptIntrinsicHistogram.png" usemap="#android::RSC::ScriptIntrinsicHistogram_map" alt=""/>
<map id="android::RSC::ScriptIntrinsicHistogram_map" name="android::RSC::ScriptIntrinsicHistogram_map">
<area href="classandroid_1_1RSC_1_1ScriptIntrinsic.html" alt="android::RSC::ScriptIntrinsic" shape="rect" coords="0,112,225,136"/>
<area href="classandroid_1_1RSC_1_1Script.html" alt="android::RSC::Script" shape="rect" coords="0,56,225,80"/>
<area href="classandroid_1_1RSC_1_1BaseObj.html" alt="android::RSC::BaseObj" shape="rect" coords="0,0,225,24"/>
</map>
</div></div>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classandroid_1_1RSC_1_1ScriptIntrinsicHistogram.html#a5836cb535900b271cfc80445e7bd3890">setOutput</a> (sp< <a class="el" href="classandroid_1_1RSC_1_1Allocation.html">Allocation</a> > aout)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classandroid_1_1RSC_1_1ScriptIntrinsicHistogram.html#aeac5401581ac83a7f812e70d8af19247">setDotCoefficients</a> (float r, float g, float b, float a)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classandroid_1_1RSC_1_1ScriptIntrinsicHistogram.html#a8a9c2cab4f07c66a9a167fab07da9897">forEach</a> (sp< <a class="el" href="classandroid_1_1RSC_1_1Allocation.html">Allocation</a> > ain)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classandroid_1_1RSC_1_1ScriptIntrinsicHistogram.html#a0d92ce93a488ae86c5acaeefc380ec98">forEach_dot</a> (sp< <a class="el" href="classandroid_1_1RSC_1_1Allocation.html">Allocation</a> > ain)</td></tr>
<tr><td colspan="2"><h2><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static sp<br class="typebreak"/>
< <a class="el" href="classandroid_1_1RSC_1_1ScriptIntrinsicHistogram.html">ScriptIntrinsicHistogram</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="classandroid_1_1RSC_1_1ScriptIntrinsicHistogram.html#a3e4468e6fc3aef620ea080493c257da0">create</a> (sp< <a class="el" href="classandroid_1_1RSC_1_1RS.html">RS</a> > rs)</td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>Intrinsic for computing a histogram. </p>
<p>Definition at line <a class="el" href="rsCppStructs_8h_source.html#l01699">1699</a> of file <a class="el" href="rsCppStructs_8h_source.html">rsCppStructs.h</a>.</p>
</div><hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a3e4468e6fc3aef620ea080493c257da0"></a><!-- doxytag: member="android::RSC::ScriptIntrinsicHistogram::create" ref="a3e4468e6fc3aef620ea080493c257da0" args="(sp< RS > rs)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static sp<<a class="el" href="classandroid_1_1RSC_1_1ScriptIntrinsicHistogram.html">ScriptIntrinsicHistogram</a>> android::RSC::ScriptIntrinsicHistogram::create </td>
<td>(</td>
<td class="paramtype">sp< <a class="el" href="classandroid_1_1RSC_1_1RS.html">RS</a> > </td>
<td class="paramname"><em>rs</em></td><td>)</td>
<td><code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Create an intrinsic for calculating the histogram of an uchar or uchar4 image.</p>
<p>Supported elements types are U8_4, U8_3, U8_2, and U8.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">rs</td><td>The RenderScript context </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">e</td><td><a class="el" href="classandroid_1_1RSC_1_1Element.html">Element</a> type for inputs</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd><a class="el" href="classandroid_1_1RSC_1_1ScriptIntrinsicHistogram.html">ScriptIntrinsicHistogram</a> </dd></dl>
</div>
</div>
<a class="anchor" id="a8a9c2cab4f07c66a9a167fab07da9897"></a><!-- doxytag: member="android::RSC::ScriptIntrinsicHistogram::forEach" ref="a8a9c2cab4f07c66a9a167fab07da9897" args="(sp< Allocation > ain)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void android::RSC::ScriptIntrinsicHistogram::forEach </td>
<td>(</td>
<td class="paramtype">sp< <a class="el" href="classandroid_1_1RSC_1_1Allocation.html">Allocation</a> > </td>
<td class="paramname"><em>ain</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Process an input buffer and place the histogram into the output allocation. The output allocation may be a narrower vector size than the input. In this case the vector size of the output is used to determine how many of the input channels are used in the computation. This is useful if you have an RGBA input buffer but only want the histogram for RGB.</p>
<p>1D and 2D input allocations are supported.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">ain</td><td>The input image </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a0d92ce93a488ae86c5acaeefc380ec98"></a><!-- doxytag: member="android::RSC::ScriptIntrinsicHistogram::forEach_dot" ref="a0d92ce93a488ae86c5acaeefc380ec98" args="(sp< Allocation > ain)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void android::RSC::ScriptIntrinsicHistogram::forEach_dot </td>
<td>(</td>
<td class="paramtype">sp< <a class="el" href="classandroid_1_1RSC_1_1Allocation.html">Allocation</a> > </td>
<td class="paramname"><em>ain</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Process an input buffer and place the histogram into the output allocation. The dot product of the input channel and the coefficients from 'setDotCoefficients' are used to calculate the output values.</p>
<p>1D and 2D input allocations are supported.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">ain</td><td>The input image </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="aeac5401581ac83a7f812e70d8af19247"></a><!-- doxytag: member="android::RSC::ScriptIntrinsicHistogram::setDotCoefficients" ref="aeac5401581ac83a7f812e70d8af19247" args="(float r, float g, float b, float a)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void android::RSC::ScriptIntrinsicHistogram::setDotCoefficients </td>
<td>(</td>
<td class="paramtype">float </td>
<td class="paramname"><em>r</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">float </td>
<td class="paramname"><em>g</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">float </td>
<td class="paramname"><em>b</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">float </td>
<td class="paramname"><em>a</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Set the coefficients used for the dot product calculation. The default is {0.299f, 0.587f, 0.114f, 0.f}.</p>
<p>Coefficients must be >= 0 and sum to 1.0 or less.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">r</td><td>Red coefficient </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">g</td><td>Green coefficient </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">b</td><td>Blue coefficient </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">a</td><td>Alpha coefficient </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a5836cb535900b271cfc80445e7bd3890"></a><!-- doxytag: member="android::RSC::ScriptIntrinsicHistogram::setOutput" ref="a5836cb535900b271cfc80445e7bd3890" args="(sp< Allocation > aout)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void android::RSC::ScriptIntrinsicHistogram::setOutput </td>
<td>(</td>
<td class="paramtype">sp< <a class="el" href="classandroid_1_1RSC_1_1Allocation.html">Allocation</a> > </td>
<td class="paramname"><em>aout</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Set the output of the histogram. 32 bit integer types are supported.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">aout</td><td>The output allocation </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="rsCppStructs_8h_source.html">rsCppStructs.h</a></li>
</ul>
</div>
</body>
</html>