Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > 4f45e7bdfd4a5ff17f5f8eaab90d017f > files > 520

albumshaper-2.1-6mdv2010.0.i586.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>AlbumShaper: EdgeDetect Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css">
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.9 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
      <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
    </ul>
  </div>
</div>
<div class="contents">
<h1>EdgeDetect Class Reference</h1><!-- doxytag: class="EdgeDetect" --><code>#include &lt;<a class="el" href="edgeDetect_8h_source.html">edgeDetect.h</a>&gt;</code>
<p>
<div class="dynheader">
Collaboration diagram for EdgeDetect:</div>
<div class="dynsection">
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div>

<p>
<a href="classEdgeDetect-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEdgeDetect.html#93ce81fe76863da08e2a6277a79059d1">EdgeDetect</a> (QImage *<a class="el" href="classEdgeDetect.html#511da5a85c2e50215d7e543ae6abb7a5">image</a>)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEdgeDetect.html#741ddd9c27d9ff132a2cea17421e8da2">~EdgeDetect</a> ()</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEdgeDetect.html#4a04903c7747f5668e7283f0e5085693">getNumClusters</a> ()</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="structPixelCluster.html">PixelCluster</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEdgeDetect.html#99b5e0b5becf716cfeb0ad163ad4a92f">getClusters</a> ()</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">int *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEdgeDetect.html#5f01a87186aeea8df552b7d5286e5cb0">getSmoothHist</a> ()</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">int *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEdgeDetect.html#303a18732250eee8f134c7be7a0e0e55">getPeaks</a> ()</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">QImage *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEdgeDetect.html#aa42152fcc1734d099cede699d21475b">getEdgeImage</a> ()</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">int *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEdgeDetect.html#ee7ef6f45c78c478c830c3044de4d542">getClusterMap</a> ()</td></tr>

<tr><td colspan="2"><br><h2>Private Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEdgeDetect.html#26cb445f858697fcea929855da3629f2">allocateAndInitObjects</a> ()</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEdgeDetect.html#c3889f3dd58427f42936eb9467741fe0">constructGSLClut</a> ()</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEdgeDetect.html#05b728eb0943f909e134842b02052565">fillLumMapAndLumHistogram</a> ()</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEdgeDetect.html#ec8bdac9c2114f092f05814ad7b4f74a">smoothLumHistogram</a> ()</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEdgeDetect.html#e3c0ba3ea2ff407e768b5616c450396a">computeEdgeMagAndGSLCmaps</a> ()</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEdgeDetect.html#ffff454457969355d2f90572f96703b4">pixelLum</a> (int x, int y)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEdgeDetect.html#477c9053957296eb31a3283d78383b5b">findPixelClusters</a> ()</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEdgeDetect.html#3544afda112033f48d5c4710e0ab939a">computeClusterStatistics</a> ()</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEdgeDetect.html#4640011128060980261ef336df335379">computeClusterThresholds</a> ()</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEdgeDetect.html#5ece76d2c80f08b9d43153a3231198eb">constructEdgeImage</a> ()</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEdgeDetect.html#57edec262a4b948c6e6e70ef0801a302">deallocateObjects</a> ()</td></tr>

<tr><td colspan="2"><br><h2>Private Attributes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="structLUTentry.html">LUTentry</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEdgeDetect.html#67919ec1f138bd5dcbc3ad32990a16d0">LUT</a> [256]</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">QImage *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEdgeDetect.html#511da5a85c2e50215d7e543ae6abb7a5">image</a></td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEdgeDetect.html#efd542b963f17beeb6ef75261b78ac8a">lumHist</a> [256]</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">luminosity and smooth luminosity histograms  <a href="#efd542b963f17beeb6ef75261b78ac8a"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEdgeDetect.html#3d33df65d9ab4b34082d64151a1294be">smoothLumHist</a> [256]</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEdgeDetect.html#5aa24028e91a394d3cd5bd807e9cd84c">clusterPeaks</a> [256]</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">int *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEdgeDetect.html#2640fdd41a06c72f469e7790c38ea88d">lumMap</a></td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">float *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEdgeDetect.html#f900ff52156cd0fb2159f35a75c10d7f">edgeMagMap</a></td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">int *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEdgeDetect.html#fd33a5703bc7be4f14400b26d8004668">GSLCmap</a></td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEdgeDetect.html#d9917825c8d8a4d6cf0397b3f44b443d">numClusters</a></td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="structPixelCluster.html">PixelCluster</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEdgeDetect.html#2b59cd7d4e724d761de259463c8b7425">clusters</a></td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEdgeDetect.html#8af7e6ca7454475fbb278244c330e49c">minClusterSize</a></td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEdgeDetect.html#c9a19ea58c96694c13a65fceddfe3153">maxClusterSize</a></td></tr>

</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>

<p>Definition at line <a class="el" href="edgeDetect_8h_source.html#l00045">45</a> of file <a class="el" href="edgeDetect_8h_source.html">edgeDetect.h</a>.</p>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="93ce81fe76863da08e2a6277a79059d1"></a><!-- doxytag: member="EdgeDetect::EdgeDetect" ref="93ce81fe76863da08e2a6277a79059d1" args="(QImage *image)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">EdgeDetect::EdgeDetect           </td>
          <td>(</td>
          <td class="paramtype">QImage *&nbsp;</td>
          <td class="paramname"> <em>image</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

<p>Definition at line <a class="el" href="edgeDetect_8cpp_source.html#l00192">192</a> of file <a class="el" href="edgeDetect_8cpp_source.html">edgeDetect.cpp</a>.</p>

<p>References <a class="el" href="edgeDetect_8cpp_source.html#l00264">allocateAndInitObjects()</a>, <a class="el" href="edgeDetect_8cpp_source.html#l00546">computeClusterStatistics()</a>, <a class="el" href="edgeDetect_8cpp_source.html#l00618">computeClusterThresholds()</a>, <a class="el" href="edgeDetect_8cpp_source.html#l00341">computeEdgeMagAndGSLCmaps()</a>, <a class="el" href="edgeDetect_8cpp_source.html#l00859">constructEdgeImage()</a>, <a class="el" href="edgeDetect_8cpp_source.html#l00291">fillLumMapAndLumHistogram()</a>, <a class="el" href="edgeDetect_8cpp_source.html#l00429">findPixelClusters()</a>, and <a class="el" href="edgeDetect_8cpp_source.html#l00315">smoothLumHistogram()</a>.</p>
<div class="fragment"><pre class="fragment"><a name="l00193"></a>00193 {                     
<a name="l00194"></a>00194   <span class="comment">//load image</span>
<a name="l00195"></a>00195   this-&gt;<a class="code" href="classEdgeDetect.html#511da5a85c2e50215d7e543ae6abb7a5">image</a> = <a class="code" href="classEdgeDetect.html#511da5a85c2e50215d7e543ae6abb7a5">image</a>;
<a name="l00196"></a>00196 
<a name="l00197"></a>00197   <span class="comment">//allocate and initialize objects used for edge detection</span>
<a name="l00198"></a>00198   <a class="code" href="classEdgeDetect.html#26cb445f858697fcea929855da3629f2">allocateAndInitObjects</a>();
<a name="l00199"></a>00199 
<a name="l00200"></a>00200   <span class="comment">//fill lum map and lum histogram</span>
<a name="l00201"></a>00201   <a class="code" href="classEdgeDetect.html#05b728eb0943f909e134842b02052565">fillLumMapAndLumHistogram</a>();
<a name="l00202"></a>00202   
<a name="l00203"></a>00203   <span class="comment">//fill smoothed histogram</span>
<a name="l00204"></a>00204   <a class="code" href="classEdgeDetect.html#ec8bdac9c2114f092f05814ad7b4f74a">smoothLumHistogram</a>();
<a name="l00205"></a>00205   
<a name="l00206"></a>00206   <span class="comment">//compute edge magnitude and GSLC maps</span>
<a name="l00207"></a>00207   <a class="code" href="classEdgeDetect.html#e3c0ba3ea2ff407e768b5616c450396a">computeEdgeMagAndGSLCmaps</a>();
<a name="l00208"></a>00208   
<a name="l00209"></a>00209   <span class="comment">//determine pixel clusters</span>
<a name="l00210"></a>00210   <a class="code" href="classEdgeDetect.html#477c9053957296eb31a3283d78383b5b">findPixelClusters</a>();
<a name="l00211"></a>00211   
<a name="l00212"></a>00212   <a class="code" href="classEdgeDetect.html#3544afda112033f48d5c4710e0ab939a">computeClusterStatistics</a>();  
<a name="l00213"></a>00213  
<a name="l00214"></a>00214   <a class="code" href="classEdgeDetect.html#4640011128060980261ef336df335379">computeClusterThresholds</a>();
<a name="l00215"></a>00215   
<a name="l00216"></a>00216   <a class="code" href="classEdgeDetect.html#5ece76d2c80f08b9d43153a3231198eb">constructEdgeImage</a>();
<a name="l00217"></a>00217 }
</pre></div>
<p>

</div>
</div><p>
<a class="anchor" name="741ddd9c27d9ff132a2cea17421e8da2"></a><!-- doxytag: member="EdgeDetect::~EdgeDetect" ref="741ddd9c27d9ff132a2cea17421e8da2" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">EdgeDetect::~EdgeDetect           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

<p>Definition at line <a class="el" href="edgeDetect_8cpp_source.html#l00219">219</a> of file <a class="el" href="edgeDetect_8cpp_source.html">edgeDetect.cpp</a>.</p>

<p>References <a class="el" href="edgeDetect_8cpp_source.html#l00963">deallocateObjects()</a>.</p>
<div class="fragment"><pre class="fragment"><a name="l00220"></a>00220 {
<a name="l00221"></a>00221   <a class="code" href="classEdgeDetect.html#57edec262a4b948c6e6e70ef0801a302">deallocateObjects</a>();
<a name="l00222"></a>00222 }
</pre></div>
<p>

</div>
</div><p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="26cb445f858697fcea929855da3629f2"></a><!-- doxytag: member="EdgeDetect::allocateAndInitObjects" ref="26cb445f858697fcea929855da3629f2" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void EdgeDetect::allocateAndInitObjects           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

<p>Definition at line <a class="el" href="edgeDetect_8cpp_source.html#l00264">264</a> of file <a class="el" href="edgeDetect_8cpp_source.html">edgeDetect.cpp</a>.</p>

<p>References <a class="el" href="edgeDetect_8h_source.html#l00100">clusterPeaks</a>, <a class="el" href="edgeDetect_8cpp_source.html#l00971">constructGSLClut()</a>, <a class="el" href="edgeDetect_8h_source.html#l00106">edgeMagMap</a>, <a class="el" href="edgeDetect_8h_source.html#l00109">GSLCmap</a>, <a class="el" href="edgeDetect_8h_source.html#l00093">image</a>, <a class="el" href="edgeDetect_8h_source.html#l00096">lumHist</a>, <a class="el" href="edgeDetect_8h_source.html#l00103">lumMap</a>, and <a class="el" href="edgeDetect_8h_source.html#l00097">smoothLumHist</a>.</p>

<p>Referenced by <a class="el" href="edgeDetect_8cpp_source.html#l00192">EdgeDetect()</a>.</p>
<div class="fragment"><pre class="fragment"><a name="l00265"></a>00265 {
<a name="l00266"></a>00266   <span class="comment">//initialize: </span>
<a name="l00267"></a>00267   <span class="comment">//-luminosity histogram</span>
<a name="l00268"></a>00268   <span class="comment">//-smoothed luminosity histogram</span>
<a name="l00269"></a>00269   <span class="comment">//-identified peak regions</span>
<a name="l00270"></a>00270   <span class="keywordtype">int</span> i;
<a name="l00271"></a>00271   <span class="keywordflow">for</span>(i=0; i&lt;256; i++)
<a name="l00272"></a>00272   { 
<a name="l00273"></a>00273     <a class="code" href="classEdgeDetect.html#efd542b963f17beeb6ef75261b78ac8a" title="luminosity and smooth luminosity histograms">lumHist</a>[i] = 0; 
<a name="l00274"></a>00274     <a class="code" href="classEdgeDetect.html#3d33df65d9ab4b34082d64151a1294be">smoothLumHist</a>[i] = 0;
<a name="l00275"></a>00275     <a class="code" href="classEdgeDetect.html#5aa24028e91a394d3cd5bd807e9cd84c">clusterPeaks</a>[i] = 0;
<a name="l00276"></a>00276   }
<a name="l00277"></a>00277   
<a name="l00278"></a>00278   <span class="comment">//allocate luminance map</span>
<a name="l00279"></a>00279   <a class="code" href="classEdgeDetect.html#2640fdd41a06c72f469e7790c38ea88d">lumMap</a> = <span class="keyword">new</span> <span class="keywordtype">int</span>[<a class="code" href="classEdgeDetect.html#511da5a85c2e50215d7e543ae6abb7a5">image</a>-&gt;width() * <a class="code" href="classEdgeDetect.html#511da5a85c2e50215d7e543ae6abb7a5">image</a>-&gt;height()];
<a name="l00280"></a>00280   
<a name="l00281"></a>00281   <span class="comment">//allocate edge magnitude map</span>
<a name="l00282"></a>00282   <a class="code" href="classEdgeDetect.html#f900ff52156cd0fb2159f35a75c10d7f">edgeMagMap</a> = <span class="keyword">new</span> <span class="keywordtype">float</span>[<a class="code" href="classEdgeDetect.html#511da5a85c2e50215d7e543ae6abb7a5">image</a>-&gt;width() * <a class="code" href="classEdgeDetect.html#511da5a85c2e50215d7e543ae6abb7a5">image</a>-&gt;height()];
<a name="l00283"></a>00283   
<a name="l00284"></a>00284   <span class="comment">//allocate GSLC map</span>
<a name="l00285"></a>00285   <a class="code" href="classEdgeDetect.html#fd33a5703bc7be4f14400b26d8004668">GSLCmap</a> = <span class="keyword">new</span> <span class="keywordtype">int</span>[<a class="code" href="classEdgeDetect.html#511da5a85c2e50215d7e543ae6abb7a5">image</a>-&gt;width() * <a class="code" href="classEdgeDetect.html#511da5a85c2e50215d7e543ae6abb7a5">image</a>-&gt;height()];
<a name="l00286"></a>00286   
<a name="l00287"></a>00287   <span class="comment">//construct LUT</span>
<a name="l00288"></a>00288   <a class="code" href="classEdgeDetect.html#c3889f3dd58427f42936eb9467741fe0">constructGSLClut</a>();
<a name="l00289"></a>00289 }
</pre></div>
<p>

</div>
</div><p>
<a class="anchor" name="3544afda112033f48d5c4710e0ab939a"></a><!-- doxytag: member="EdgeDetect::computeClusterStatistics" ref="3544afda112033f48d5c4710e0ab939a" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void EdgeDetect::computeClusterStatistics           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

<p>Definition at line <a class="el" href="edgeDetect_8cpp_source.html#l00546">546</a> of file <a class="el" href="edgeDetect_8cpp_source.html">edgeDetect.cpp</a>.</p>

<p>References <a class="el" href="edgeDetect_8h_source.html#l00100">clusterPeaks</a>, <a class="el" href="edgeDetect_8h_source.html#l00113">clusters</a>, <a class="el" href="edgeDetect_8h_source.html#l00031">PixelCluster::edgeMagHistogram</a>, <a class="el" href="edgeDetect_8h_source.html#l00106">edgeMagMap</a>, <a class="el" href="edgeDetect_8h_source.html#l00093">image</a>, <a class="el" href="edgeDetect_8h_source.html#l00103">lumMap</a>, <a class="el" href="edgeDetect_8h_source.html#l00116">maxClusterSize</a>, <a class="el" href="edgeDetect_8h_source.html#l00036">PixelCluster::meanMode</a>, <a class="el" href="edgeDetect_8h_source.html#l00116">minClusterSize</a>, <a class="el" href="edgeDetect_8h_source.html#l00037">PixelCluster::mode</a>, <a class="el" href="edgeDetect_8h_source.html#l00112">numClusters</a>, <a class="el" href="edgeDetect_8h_source.html#l00033">PixelCluster::numPixels</a>, <a class="el" href="edgeDetect_8h_source.html#l00038">PixelCluster::pixelCount</a>, and <a class="el" href="edgeDetect_8h_source.html#l00032">PixelCluster::totalEdgeMagnitude</a>.</p>

<p>Referenced by <a class="el" href="edgeDetect_8cpp_source.html#l00192">EdgeDetect()</a>.</p>
<div class="fragment"><pre class="fragment"><a name="l00547"></a>00547 {
<a name="l00548"></a>00548   <span class="comment">//initialize cluster stats</span>
<a name="l00549"></a>00549   <span class="keywordtype">int</span> cluster;
<a name="l00550"></a>00550   <span class="keywordflow">for</span>(cluster=0; cluster&lt;<a class="code" href="classEdgeDetect.html#d9917825c8d8a4d6cf0397b3f44b443d">numClusters</a>; cluster++)
<a name="l00551"></a>00551   {
<a name="l00552"></a>00552     <span class="keywordtype">int</span> i;
<a name="l00553"></a>00553     <span class="keywordflow">for</span>(i=0; i&lt;256; i++)
<a name="l00554"></a>00554     {
<a name="l00555"></a>00555       <a class="code" href="classEdgeDetect.html#2b59cd7d4e724d761de259463c8b7425">clusters</a>[cluster].<a class="code" href="structPixelCluster.html#b0dcb87764ab5cce813ddb44138c3fda">edgeMagHistogram</a>[i] = 0;
<a name="l00556"></a>00556     }
<a name="l00557"></a>00557     <a class="code" href="classEdgeDetect.html#2b59cd7d4e724d761de259463c8b7425">clusters</a>[cluster].<a class="code" href="structPixelCluster.html#3f98d264471c9e9526b2304db1a17340">totalEdgeMagnitude</a>=0.0f;
<a name="l00558"></a>00558     <a class="code" href="classEdgeDetect.html#2b59cd7d4e724d761de259463c8b7425">clusters</a>[cluster].<a class="code" href="structPixelCluster.html#3166f6edbbe6ffdb444d03a9cba44938">numPixels</a> = 0;
<a name="l00559"></a>00559   }
<a name="l00560"></a>00560   
<a name="l00561"></a>00561   <span class="comment">//iterate over all pixels</span>
<a name="l00562"></a>00562   <span class="keywordtype">int</span> i;
<a name="l00563"></a>00563   <span class="keywordflow">for</span>(i=0; i&lt;<a class="code" href="classEdgeDetect.html#511da5a85c2e50215d7e543ae6abb7a5">image</a>-&gt;width()*<a class="code" href="classEdgeDetect.html#511da5a85c2e50215d7e543ae6abb7a5">image</a>-&gt;height(); i++)
<a name="l00564"></a>00564   {
<a name="l00565"></a>00565     <span class="comment">//skip pixels that don't belong to peaks</span>
<a name="l00566"></a>00566     <span class="keywordflow">if</span>( <a class="code" href="classEdgeDetect.html#5aa24028e91a394d3cd5bd807e9cd84c">clusterPeaks</a>[ <a class="code" href="classEdgeDetect.html#2640fdd41a06c72f469e7790c38ea88d">lumMap</a>[i] ] != 1)
<a name="l00567"></a>00567       <span class="keywordflow">continue</span>;
<a name="l00568"></a>00568     
<a name="l00569"></a>00569     <span class="comment">//determine cluster pixel belongs to</span>
<a name="l00570"></a>00570     <span class="keywordtype">int</span> cluster;
<a name="l00571"></a>00571     <span class="keywordflow">for</span>(cluster=0; cluster&lt;numClusters; cluster++)
<a name="l00572"></a>00572     {
<a name="l00573"></a>00573       <span class="keywordflow">if</span>( <a class="code" href="classEdgeDetect.html#2640fdd41a06c72f469e7790c38ea88d">lumMap</a>[i] &gt;= <a class="code" href="classEdgeDetect.html#2b59cd7d4e724d761de259463c8b7425">clusters</a>[cluster].minLuminance &amp;&amp;
<a name="l00574"></a>00574           <a class="code" href="classEdgeDetect.html#2640fdd41a06c72f469e7790c38ea88d">lumMap</a>[i] &lt;= <a class="code" href="classEdgeDetect.html#2b59cd7d4e724d761de259463c8b7425">clusters</a>[cluster].maxLuminance )
<a name="l00575"></a>00575       {      
<a name="l00576"></a>00576         <a class="code" href="classEdgeDetect.html#2b59cd7d4e724d761de259463c8b7425">clusters</a>[cluster].<a class="code" href="structPixelCluster.html#3f98d264471c9e9526b2304db1a17340">totalEdgeMagnitude</a>+= <a class="code" href="classEdgeDetect.html#f900ff52156cd0fb2159f35a75c10d7f">edgeMagMap</a>[i]; 
<a name="l00577"></a>00577         <a class="code" href="classEdgeDetect.html#2b59cd7d4e724d761de259463c8b7425">clusters</a>[cluster].<a class="code" href="structPixelCluster.html#3166f6edbbe6ffdb444d03a9cba44938">numPixels</a>++;
<a name="l00578"></a>00578         <a class="code" href="classEdgeDetect.html#2b59cd7d4e724d761de259463c8b7425">clusters</a>[cluster].<a class="code" href="structPixelCluster.html#b0dcb87764ab5cce813ddb44138c3fda">edgeMagHistogram</a>[ QMIN( QMAX( (<span class="keywordtype">int</span>)<a class="code" href="classEdgeDetect.html#f900ff52156cd0fb2159f35a75c10d7f">edgeMagMap</a>[i], 0), 255) ]++;
<a name="l00579"></a>00579         <span class="keywordflow">break</span>;
<a name="l00580"></a>00580       }
<a name="l00581"></a>00581     } <span class="comment">//cluster</span>
<a name="l00582"></a>00582   } <span class="comment">//pixel i</span>
<a name="l00583"></a>00583   
<a name="l00584"></a>00584   <span class="comment">//iterate over clusters to determine min and max peak cluster sizes</span>
<a name="l00585"></a>00585   <a class="code" href="classEdgeDetect.html#8af7e6ca7454475fbb278244c330e49c">minClusterSize</a> = <a class="code" href="classEdgeDetect.html#2b59cd7d4e724d761de259463c8b7425">clusters</a>[0].<a class="code" href="structPixelCluster.html#3166f6edbbe6ffdb444d03a9cba44938">numPixels</a>;
<a name="l00586"></a>00586   <a class="code" href="classEdgeDetect.html#c9a19ea58c96694c13a65fceddfe3153">maxClusterSize</a> = <a class="code" href="classEdgeDetect.html#2b59cd7d4e724d761de259463c8b7425">clusters</a>[0].<a class="code" href="structPixelCluster.html#3166f6edbbe6ffdb444d03a9cba44938">numPixels</a>;
<a name="l00587"></a>00587   <span class="keywordflow">for</span>(cluster=1; cluster&lt;numClusters; cluster++)
<a name="l00588"></a>00588   {
<a name="l00589"></a>00589     <span class="keywordflow">if</span>(<a class="code" href="classEdgeDetect.html#2b59cd7d4e724d761de259463c8b7425">clusters</a>[cluster].numPixels &lt; <a class="code" href="classEdgeDetect.html#8af7e6ca7454475fbb278244c330e49c">minClusterSize</a>)
<a name="l00590"></a>00590       <a class="code" href="classEdgeDetect.html#8af7e6ca7454475fbb278244c330e49c">minClusterSize</a> = <a class="code" href="classEdgeDetect.html#2b59cd7d4e724d761de259463c8b7425">clusters</a>[cluster].<a class="code" href="structPixelCluster.html#3166f6edbbe6ffdb444d03a9cba44938">numPixels</a>;
<a name="l00591"></a>00591 
<a name="l00592"></a>00592     <span class="keywordflow">if</span>(<a class="code" href="classEdgeDetect.html#2b59cd7d4e724d761de259463c8b7425">clusters</a>[cluster].numPixels &gt; <a class="code" href="classEdgeDetect.html#c9a19ea58c96694c13a65fceddfe3153">maxClusterSize</a>)
<a name="l00593"></a>00593       <a class="code" href="classEdgeDetect.html#c9a19ea58c96694c13a65fceddfe3153">maxClusterSize</a> = <a class="code" href="classEdgeDetect.html#2b59cd7d4e724d761de259463c8b7425">clusters</a>[cluster].<a class="code" href="structPixelCluster.html#3166f6edbbe6ffdb444d03a9cba44938">numPixels</a>;
<a name="l00594"></a>00594   }
<a name="l00595"></a>00595 
<a name="l00596"></a>00596   <span class="comment">//iterate over clusters one final time to deduce normalized inputs to fuzzy logic process</span>
<a name="l00597"></a>00597   <span class="keywordtype">int</span> JND = 255/50;
<a name="l00598"></a>00598   <span class="keywordflow">for</span>(cluster=0; cluster&lt;numClusters; cluster++)
<a name="l00599"></a>00599   {
<a name="l00600"></a>00600     <a class="code" href="classEdgeDetect.html#2b59cd7d4e724d761de259463c8b7425">clusters</a>[cluster].<a class="code" href="structPixelCluster.html#75ec6ec925d0d1321c1db40439d30e27">meanMode</a> = QMIN( <a class="code" href="classEdgeDetect.html#2b59cd7d4e724d761de259463c8b7425">clusters</a>[cluster].totalEdgeMagnitude / <a class="code" href="classEdgeDetect.html#2b59cd7d4e724d761de259463c8b7425">clusters</a>[cluster].numPixels,
<a name="l00601"></a>00601                                        3*JND );
<a name="l00602"></a>00602     
<a name="l00603"></a>00603     <span class="keywordtype">int</span> i;
<a name="l00604"></a>00604     <span class="keywordtype">int</span> mode = 0;
<a name="l00605"></a>00605     <span class="keywordflow">for</span>(i=1; i&lt;256; i++)
<a name="l00606"></a>00606     {
<a name="l00607"></a>00607       <span class="keywordflow">if</span>( <a class="code" href="classEdgeDetect.html#2b59cd7d4e724d761de259463c8b7425">clusters</a>[cluster].edgeMagHistogram[i] &gt; <a class="code" href="classEdgeDetect.html#2b59cd7d4e724d761de259463c8b7425">clusters</a>[cluster].edgeMagHistogram[ mode ] )
<a name="l00608"></a>00608         mode = i;
<a name="l00609"></a>00609     }
<a name="l00610"></a>00610     <a class="code" href="classEdgeDetect.html#2b59cd7d4e724d761de259463c8b7425">clusters</a>[cluster].<a class="code" href="structPixelCluster.html#fdd138d50bba29d70be4569ed676658d">mode</a> = QMIN( mode, 2*JND );
<a name="l00611"></a>00611         
<a name="l00612"></a>00612     <a class="code" href="classEdgeDetect.html#2b59cd7d4e724d761de259463c8b7425">clusters</a>[cluster].<a class="code" href="structPixelCluster.html#f20c19527f28e828acd2f1706b6d4759">pixelCount</a> = ((float)(<a class="code" href="classEdgeDetect.html#2b59cd7d4e724d761de259463c8b7425">clusters</a>[cluster].numPixels - <a class="code" href="classEdgeDetect.html#8af7e6ca7454475fbb278244c330e49c">minClusterSize</a>)) / 
<a name="l00613"></a>00613                                    (<a class="code" href="classEdgeDetect.html#c9a19ea58c96694c13a65fceddfe3153">maxClusterSize</a> - <a class="code" href="classEdgeDetect.html#8af7e6ca7454475fbb278244c330e49c">minClusterSize</a>);  
<a name="l00614"></a>00614   }
<a name="l00615"></a>00615 }
</pre></div>
<p>

</div>
</div><p>
<a class="anchor" name="4640011128060980261ef336df335379"></a><!-- doxytag: member="EdgeDetect::computeClusterThresholds" ref="4640011128060980261ef336df335379" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void EdgeDetect::computeClusterThresholds           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

<p>Definition at line <a class="el" href="edgeDetect_8cpp_source.html#l00618">618</a> of file <a class="el" href="edgeDetect_8cpp_source.html">edgeDetect.cpp</a>.</p>

<p>References <a class="el" href="jpegInternal_8h_source.html#l00125">b</a>, <a class="el" href="blur_8cpp_source.html#l00078">B</a>, <a class="el" href="edgeDetect_8h_source.html#l00040">PixelCluster::beta</a>, <a class="el" href="edgeDetect_8h_source.html#l00113">clusters</a>, <a class="el" href="edgeDetect_8h_source.html#l00041">PixelCluster::edgeThreshold</a>, <a class="el" href="edgeDetect_8h_source.html#l00037">PixelCluster::mode</a>, and <a class="el" href="edgeDetect_8h_source.html#l00112">numClusters</a>.</p>

<p>Referenced by <a class="el" href="edgeDetect_8cpp_source.html#l00192">EdgeDetect()</a>.</p>
<div class="fragment"><pre class="fragment"><a name="l00619"></a>00619 {
<a name="l00620"></a>00620   <span class="comment">//iterate over each cluster</span>
<a name="l00621"></a>00621   <span class="keywordtype">int</span> cluster;
<a name="l00622"></a>00622   <span class="keywordtype">float</span> S1,M1,L1;
<a name="l00623"></a>00623   <span class="keywordtype">float</span> S2,M2,L2;
<a name="l00624"></a>00624   <span class="keywordtype">float</span> S3,L3;
<a name="l00625"></a>00625   <span class="keywordtype">float</span> outS, outM, outL;
<a name="l00626"></a>00626   
<a name="l00627"></a>00627   <span class="keywordtype">int</span> JND = 255/50;
<a name="l00628"></a>00628   
<a name="l00629"></a>00629   <span class="keywordflow">for</span>(cluster=0; cluster&lt;<a class="code" href="classEdgeDetect.html#d9917825c8d8a4d6cf0397b3f44b443d">numClusters</a>; cluster++)
<a name="l00630"></a>00630   {
<a name="l00631"></a>00631     <span class="comment">//----</span>
<a name="l00632"></a>00632     <span class="comment">//compute S,M, and L values for each input</span>
<a name="l00633"></a>00633     <span class="comment">//----</span>
<a name="l00634"></a>00634     S1 = QMAX( 1.0f - ((<a class="code" href="classEdgeDetect.html#2b59cd7d4e724d761de259463c8b7425">clusters</a>[cluster].meanMode/JND) / 1.5f), 0 );
<a name="l00635"></a>00635 
<a name="l00636"></a>00636     <span class="keywordflow">if</span>( (<a class="code" href="classEdgeDetect.html#2b59cd7d4e724d761de259463c8b7425">clusters</a>[cluster].meanMode/JND) &lt;= 1.5f )
<a name="l00637"></a>00637       M1 = QMAX( (<a class="code" href="classEdgeDetect.html#2b59cd7d4e724d761de259463c8b7425">clusters</a>[cluster].meanMode/JND) - 0.5f, 0 );
<a name="l00638"></a>00638     <span class="keywordflow">else</span>
<a name="l00639"></a>00639       M1 = QMAX( 2.5f - (<a class="code" href="classEdgeDetect.html#2b59cd7d4e724d761de259463c8b7425">clusters</a>[cluster].meanMode/JND), 0 );
<a name="l00640"></a>00640     
<a name="l00641"></a>00641     L1 = QMAX( ((<a class="code" href="classEdgeDetect.html#2b59cd7d4e724d761de259463c8b7425">clusters</a>[cluster].meanMode/JND) - 1.5f) / 1.5f, 0 );
<a name="l00642"></a>00642     <span class="comment">//----</span>
<a name="l00643"></a>00643     S2 = QMAX( 1.0f - (<a class="code" href="classEdgeDetect.html#2b59cd7d4e724d761de259463c8b7425">clusters</a>[cluster].mode/JND), 0 );
<a name="l00644"></a>00644     
<a name="l00645"></a>00645     <span class="keywordflow">if</span>( (<a class="code" href="classEdgeDetect.html#2b59cd7d4e724d761de259463c8b7425">clusters</a>[cluster].mode/JND) &lt;= 1.0f )
<a name="l00646"></a>00646       M2 = QMAX( -1.0f + 2*(<a class="code" href="classEdgeDetect.html#2b59cd7d4e724d761de259463c8b7425">clusters</a>[cluster].mode/JND), 0 );
<a name="l00647"></a>00647     <span class="keywordflow">else</span>
<a name="l00648"></a>00648       M2 = QMAX( 3.0f - 2*(<a class="code" href="classEdgeDetect.html#2b59cd7d4e724d761de259463c8b7425">clusters</a>[cluster].mode/JND), 0 );
<a name="l00649"></a>00649     
<a name="l00650"></a>00650     L2 = QMAX( (<a class="code" href="classEdgeDetect.html#2b59cd7d4e724d761de259463c8b7425">clusters</a>[cluster].mode/JND) - 1.0, 0 );
<a name="l00651"></a>00651     <span class="comment">//----</span>
<a name="l00652"></a>00652     S3 = QMAX( 1.0f - 2*<a class="code" href="classEdgeDetect.html#2b59cd7d4e724d761de259463c8b7425">clusters</a>[cluster].pixelCount, 0 );
<a name="l00653"></a>00653     L3 = QMAX( -1.0f + 2*<a class="code" href="classEdgeDetect.html#2b59cd7d4e724d761de259463c8b7425">clusters</a>[cluster].pixelCount, 0 );
<a name="l00654"></a>00654     <span class="comment">//----</span>
<a name="l00655"></a>00655     
<a name="l00656"></a>00656     <span class="comment">//Compute M,L for outputs using set of 18 rules.</span>
<a name="l00657"></a>00657     <span class="comment">//outS is inherantly S given the ruleset provided</span>
<a name="l00658"></a>00658     outS = 0.0f;
<a name="l00659"></a>00659     outM = 0.0f;
<a name="l00660"></a>00660     outL = 0.0f;
<a name="l00661"></a>00661     <span class="comment">//Out 1</span>
<a name="l00662"></a>00662     <span class="keywordflow">if</span>( numClusters &gt; 2 )
<a name="l00663"></a>00663     {
<a name="l00664"></a>00664       outM += S1*S2*S3;   <span class="comment">//rule 1</span>
<a name="l00665"></a>00665       
<a name="l00666"></a>00666       <span class="comment">//rule 2</span>
<a name="l00667"></a>00667       <span class="keywordflow">if</span>( <a class="code" href="classEdgeDetect.html#2b59cd7d4e724d761de259463c8b7425">clusters</a>[cluster].meanMode &lt; <a class="code" href="classEdgeDetect.html#2b59cd7d4e724d761de259463c8b7425">clusters</a>[cluster].mode )
<a name="l00668"></a>00668         outS += S1*S2*L3;   
<a name="l00669"></a>00669       <span class="keywordflow">else</span>
<a name="l00670"></a>00670         outM += S1*S2*L3;
<a name="l00671"></a>00671 
<a name="l00672"></a>00672       outM += S1*M2*S3;   <span class="comment">//rule 3</span>
<a name="l00673"></a>00673       outM += S1*M2*L3;   <span class="comment">//rule 4</span>
<a name="l00674"></a>00674       outM += S1*L2*S3;   <span class="comment">//rule 5</span>
<a name="l00675"></a>00675       outM += S1*L2*L3;   <span class="comment">//rule 6</span>
<a name="l00676"></a>00676       outM += M1*S2*S3;   <span class="comment">//rule 7</span>
<a name="l00677"></a>00677       outM += M1*S2*L3;   <span class="comment">//rule 8</span>
<a name="l00678"></a>00678       outM += M1*M2*S3;   <span class="comment">//rule 9</span>
<a name="l00679"></a>00679       outL += M1*M2*L3;   <span class="comment">//rule 10</span>
<a name="l00680"></a>00680       outM += M1*L2*S3;   <span class="comment">//rule 11</span>
<a name="l00681"></a>00681       outL += M1*L2*L3;   <span class="comment">//rule 12</span>
<a name="l00682"></a>00682       outM += L1*S2*S3;   <span class="comment">//rule 13</span>
<a name="l00683"></a>00683       outL += L1*S2*L3;   <span class="comment">//rule 14</span>
<a name="l00684"></a>00684       outM += L1*M2*S3;   <span class="comment">//rule 15</span>
<a name="l00685"></a>00685       outL += L1*M2*L3;   <span class="comment">//rule 16</span>
<a name="l00686"></a>00686       outL += L1*L2*S3;   <span class="comment">//rule 17</span>
<a name="l00687"></a>00687       outL += L1*L2*L3;   <span class="comment">//rule 18</span>
<a name="l00688"></a>00688     }
<a name="l00689"></a>00689     <span class="comment">//Out 2</span>
<a name="l00690"></a>00690     <span class="keywordflow">else</span>
<a name="l00691"></a>00691     {
<a name="l00692"></a>00692       outL += S1*S2*S3;   <span class="comment">//rule 1</span>
<a name="l00693"></a>00693       outL += S1*S2*L3;   <span class="comment">//rule 2</span>
<a name="l00694"></a>00694       outM += S1*M2*S3;   <span class="comment">//rule 3</span>
<a name="l00695"></a>00695       outL += S1*M2*L3;   <span class="comment">//rule 4</span>
<a name="l00696"></a>00696       outM += S1*L2*S3;   <span class="comment">//rule 5</span>
<a name="l00697"></a>00697       outM += S1*L2*L3;   <span class="comment">//rule 6</span>
<a name="l00698"></a>00698       outL += M1*S2*S3;   <span class="comment">//rule 7</span>
<a name="l00699"></a>00699       outL += M1*S2*L3;   <span class="comment">//rule 8</span>
<a name="l00700"></a>00700       outL += M1*M2*S3;   <span class="comment">//rule 9</span>
<a name="l00701"></a>00701       outL += M1*M2*L3;   <span class="comment">//rule 10</span>
<a name="l00702"></a>00702       outL += M1*L2*S3;   <span class="comment">//rule 11</span>
<a name="l00703"></a>00703       outL += M1*L2*L3;   <span class="comment">//rule 12</span>
<a name="l00704"></a>00704       outL += L1*S2*S3;   <span class="comment">//rule 13</span>
<a name="l00705"></a>00705       outL += L1*S2*L3;   <span class="comment">//rule 14</span>
<a name="l00706"></a>00706       outL += L1*M2*S3;   <span class="comment">//rule 15</span>
<a name="l00707"></a>00707       outL += L1*M2*L3;   <span class="comment">//rule 16</span>
<a name="l00708"></a>00708       outL += L1*L2*S3;   <span class="comment">//rule 17</span>
<a name="l00709"></a>00709       outL += L1*L2*L3;   <span class="comment">//rule 18</span>
<a name="l00710"></a>00710     }
<a name="l00711"></a>00711 
<a name="l00712"></a>00712     <span class="comment">//find centroid - Beta[k]</span>
<a name="l00713"></a>00713     <span class="keywordtype">float</span> A = outM + 0.5f;
<a name="l00714"></a>00714     <span class="keywordtype">float</span> <a class="code" href="blur_8cpp.html#8188fea1f6709096fe21a3ee084d00d0">B</a> = 2.5f - outM;
<a name="l00715"></a>00715     <span class="keywordtype">float</span> C = 1.5f * (outL + 1);
<a name="l00716"></a>00716     <span class="keywordtype">float</span> D = 1.5f * (outM + 1);
<a name="l00717"></a>00717     <span class="keywordtype">float</span> E = 2.5f - outL;
<a name="l00718"></a>00718 
<a name="l00719"></a>00719     <span class="comment">//---------------------------------------------------------------</span>
<a name="l00720"></a>00720     <span class="comment">//Case 1: Both outM and outL are above intersection point of diagonals</span>
<a name="l00721"></a>00721     <span class="keywordflow">if</span>( outM &gt; 0.5f &amp;&amp; outL &gt; 0.5f )
<a name="l00722"></a>00722     {
<a name="l00723"></a>00723       <span class="comment">//find area of 7 subregions</span>
<a name="l00724"></a>00724       <span class="keywordtype">float</span> area1 = ((A-0.5f)*outM)/2;
<a name="l00725"></a>00725       <span class="keywordtype">float</span> area2 = outM * (B-A);
<a name="l00726"></a>00726       <span class="keywordtype">float</span> area3 = ((2.1f-B) * (outM - 0.5)) / 2;
<a name="l00727"></a>00727       <span class="keywordtype">float</span> area4 = (2.1 - B) * 0.5f;
<a name="l00728"></a>00728       <span class="keywordtype">float</span> area5 = ((C - 2.1f) * (outL - 0.5)) / 2;
<a name="l00729"></a>00729       <span class="keywordtype">float</span> area6 = (C - 2.1f) * 0.5f;
<a name="l00730"></a>00730       <span class="keywordtype">float</span> area7 = (3.0f - C) * outL;
<a name="l00731"></a>00731      
<a name="l00732"></a>00732       <span class="comment">//find half of total area</span>
<a name="l00733"></a>00733       <span class="keywordtype">float</span> halfArea = (area1 + area2 + area3 + area4 + area5 + area6 + area7) / 2;
<a name="l00734"></a>00734       
<a name="l00735"></a>00735       <span class="comment">//determine which region split will be within and resulting horizontal midpoint</span>
<a name="l00736"></a>00736       
<a name="l00737"></a>00737       <span class="comment">//Within area 1</span>
<a name="l00738"></a>00738       <span class="keywordflow">if</span>( area1 &gt; halfArea )
<a name="l00739"></a>00739       {
<a name="l00740"></a>00740         <a class="code" href="classEdgeDetect.html#2b59cd7d4e724d761de259463c8b7425">clusters</a>[cluster].<a class="code" href="structPixelCluster.html#1b862ff6db49e21b7c51f62364775fa9">beta</a> = 0.5f + (float)sqrt(2*halfArea);       
<a name="l00741"></a>00741       }
<a name="l00742"></a>00742       <span class="comment">//Within area 2</span>
<a name="l00743"></a>00743       <span class="keywordflow">else</span> <span class="keywordflow">if</span>( area1 + area2 &gt; halfArea )
<a name="l00744"></a>00744       {
<a name="l00745"></a>00745         <a class="code" href="classEdgeDetect.html#2b59cd7d4e724d761de259463c8b7425">clusters</a>[cluster].<a class="code" href="structPixelCluster.html#1b862ff6db49e21b7c51f62364775fa9">beta</a> = ((halfArea - area1) / outM) + A;        
<a name="l00746"></a>00746       }
<a name="l00747"></a>00747       <span class="comment">//Within area 3-4</span>
<a name="l00748"></a>00748       <span class="keywordflow">else</span> <span class="keywordflow">if</span>( area1 + area2 + area3 + area4 &gt; halfArea )
<a name="l00749"></a>00749       {
<a name="l00750"></a>00750         <span class="keywordtype">float</span> a = -0.5f;
<a name="l00751"></a>00751         <span class="keywordtype">float</span> <a class="code" href="jpegInternal_8h.html#f320905358fa78701e4cc60b6135601f">b</a> = 2.8f;
<a name="l00752"></a>00752         <span class="keywordtype">float</span> c = area1 + area2 + area3 - halfArea - B/2 - 2.625f;
<a name="l00753"></a>00753         <a class="code" href="classEdgeDetect.html#2b59cd7d4e724d761de259463c8b7425">clusters</a>[cluster].<a class="code" href="structPixelCluster.html#1b862ff6db49e21b7c51f62364775fa9">beta</a> = (-b + (float)sqrt( b*b - 4*a*c )) / (2*a);
<a name="l00754"></a>00754       }
<a name="l00755"></a>00755       <span class="comment">//Within area 5-6</span>
<a name="l00756"></a>00756       <span class="keywordflow">else</span> <span class="keywordflow">if</span>( area1 + area2 + area3 + area4 + area5 + area6 &gt; halfArea )
<a name="l00757"></a>00757       {
<a name="l00758"></a>00758         <span class="keywordtype">float</span> a = 1.0f/3;
<a name="l00759"></a>00759         <span class="keywordtype">float</span> b = -0.7f;
<a name="l00760"></a>00760         <span class="keywordtype">float</span> c = area1 + area2 + area3 + area4 - halfArea;
<a name="l00761"></a>00761         <a class="code" href="classEdgeDetect.html#2b59cd7d4e724d761de259463c8b7425">clusters</a>[cluster].<a class="code" href="structPixelCluster.html#1b862ff6db49e21b7c51f62364775fa9">beta</a> = (-b + (float)sqrt( b*b - 4*a*c )) / (2*a);
<a name="l00762"></a>00762       }
<a name="l00763"></a>00763       <span class="comment">//Within area 7</span>
<a name="l00764"></a>00764       <span class="keywordflow">else</span>
<a name="l00765"></a>00765       {
<a name="l00766"></a>00766         <a class="code" href="classEdgeDetect.html#2b59cd7d4e724d761de259463c8b7425">clusters</a>[cluster].<a class="code" href="structPixelCluster.html#1b862ff6db49e21b7c51f62364775fa9">beta</a> = ((halfArea - (area1 + area2 + area3 + area4 + area5 + area6) ) / outL) + C;       
<a name="l00767"></a>00767       }
<a name="l00768"></a>00768     } <span class="comment">//end case 1</span>
<a name="l00769"></a>00769     <span class="comment">//---------------------------------------------------------------</span>
<a name="l00770"></a>00770     <span class="comment">//Case 2</span>
<a name="l00771"></a>00771     <span class="keywordflow">else</span> <span class="keywordflow">if</span> ( outM &lt; 0.5f &amp;&amp; outL &gt; outM )
<a name="l00772"></a>00772     {
<a name="l00773"></a>00773       <span class="comment">//find area of 5 subregions</span>
<a name="l00774"></a>00774       <span class="keywordtype">float</span> area1 = (outM*(A-0.5f)) / 2;
<a name="l00775"></a>00775       <span class="keywordtype">float</span> area2 = (D-A) * outM;
<a name="l00776"></a>00776       <span class="keywordtype">float</span> area3 = ((C-D) * (outL - outM)) / 2;
<a name="l00777"></a>00777       <span class="keywordtype">float</span> area4 = (C-D) * outM;
<a name="l00778"></a>00778       <span class="keywordtype">float</span> area5 = (3.0f - C) * outL;
<a name="l00779"></a>00779       
<a name="l00780"></a>00780       <span class="comment">//find half of total area</span>
<a name="l00781"></a>00781       <span class="keywordtype">float</span> halfArea = (area1 + area2 + area3 + area4 + area5) / 2;
<a name="l00782"></a>00782       
<a name="l00783"></a>00783       <span class="comment">//determine which region split will be within and resulting horizontal midpoint</span>
<a name="l00784"></a>00784 
<a name="l00785"></a>00785       <span class="comment">//Within area 1</span>
<a name="l00786"></a>00786       <span class="keywordflow">if</span>( area1 &gt; halfArea )
<a name="l00787"></a>00787       {
<a name="l00788"></a>00788         <a class="code" href="classEdgeDetect.html#2b59cd7d4e724d761de259463c8b7425">clusters</a>[cluster].<a class="code" href="structPixelCluster.html#1b862ff6db49e21b7c51f62364775fa9">beta</a> = 0.5f + (float)sqrt(2*halfArea);
<a name="l00789"></a>00789       }
<a name="l00790"></a>00790       <span class="comment">//Within area 2</span>
<a name="l00791"></a>00791       <span class="keywordflow">else</span> <span class="keywordflow">if</span>( area1 + area2 &gt; halfArea )
<a name="l00792"></a>00792       {
<a name="l00793"></a>00793         <a class="code" href="classEdgeDetect.html#2b59cd7d4e724d761de259463c8b7425">clusters</a>[cluster].<a class="code" href="structPixelCluster.html#1b862ff6db49e21b7c51f62364775fa9">beta</a> = ((halfArea - area1) / outM) + A;
<a name="l00794"></a>00794       }
<a name="l00795"></a>00795       <span class="comment">//Within area 3-4</span>
<a name="l00796"></a>00796       <span class="keywordflow">else</span> <span class="keywordflow">if</span>( area1 + area2 + area3 + area4 &gt; halfArea )
<a name="l00797"></a>00797       {
<a name="l00798"></a>00798         <span class="keywordtype">float</span> a = 1.0f/3.0f;
<a name="l00799"></a>00799         <span class="keywordtype">float</span> b = outM - 0.5f - D/3;
<a name="l00800"></a>00800         <span class="keywordtype">float</span> c = area1 + area2 - D*outM + D/2 - halfArea;
<a name="l00801"></a>00801         <a class="code" href="classEdgeDetect.html#2b59cd7d4e724d761de259463c8b7425">clusters</a>[cluster].<a class="code" href="structPixelCluster.html#1b862ff6db49e21b7c51f62364775fa9">beta</a> = (-b + (float)sqrt( b*b - 4*a*c )) / (2*a);
<a name="l00802"></a>00802       }
<a name="l00803"></a>00803       <span class="comment">//Within area5</span>
<a name="l00804"></a>00804       <span class="keywordflow">else</span>
<a name="l00805"></a>00805       {
<a name="l00806"></a>00806         <a class="code" href="classEdgeDetect.html#2b59cd7d4e724d761de259463c8b7425">clusters</a>[cluster].<a class="code" href="structPixelCluster.html#1b862ff6db49e21b7c51f62364775fa9">beta</a> = ((halfArea - (area1 + area2 + area3 + area4) ) / outL) + C;
<a name="l00807"></a>00807       }
<a name="l00808"></a>00808     } <span class="comment">//end case 2</span>
<a name="l00809"></a>00809     <span class="comment">//---------------------------------------------------------------</span>
<a name="l00810"></a>00810     <span class="comment">//Case 3</span>
<a name="l00811"></a>00811     <span class="keywordflow">else</span>
<a name="l00812"></a>00812     {
<a name="l00813"></a>00813       <span class="comment">//find area of 5 subregions</span>
<a name="l00814"></a>00814       <span class="keywordtype">float</span> area1 = (outM*(A-0.5f)) / 2;
<a name="l00815"></a>00815       <span class="keywordtype">float</span> area2 = (B-A) * outM;
<a name="l00816"></a>00816       <span class="keywordtype">float</span> area3 = ((E-B) * (outM - outL)) / 2;
<a name="l00817"></a>00817       <span class="keywordtype">float</span> area4 = (E-B) * outL;
<a name="l00818"></a>00818       <span class="keywordtype">float</span> area5 = (3.0f - E) * outL;
<a name="l00819"></a>00819       
<a name="l00820"></a>00820       <span class="comment">//find half of total area</span>
<a name="l00821"></a>00821       <span class="keywordtype">float</span> halfArea = (area1 + area2 + area3 + area4 + area5) / 2;
<a name="l00822"></a>00822       
<a name="l00823"></a>00823       <span class="comment">//determine which region split will be within and resulting horizontal midpoint</span>
<a name="l00824"></a>00824       
<a name="l00825"></a>00825       <span class="comment">//Within area 1</span>
<a name="l00826"></a>00826       <span class="keywordflow">if</span>( area1 &gt; halfArea )
<a name="l00827"></a>00827       {
<a name="l00828"></a>00828         <a class="code" href="classEdgeDetect.html#2b59cd7d4e724d761de259463c8b7425">clusters</a>[cluster].<a class="code" href="structPixelCluster.html#1b862ff6db49e21b7c51f62364775fa9">beta</a> = 0.5f + (float)sqrt(2*halfArea);
<a name="l00829"></a>00829       }
<a name="l00830"></a>00830       <span class="comment">//Within area 2</span>
<a name="l00831"></a>00831       <span class="keywordflow">else</span> <span class="keywordflow">if</span>( area1 + area2 &gt; halfArea )
<a name="l00832"></a>00832       {
<a name="l00833"></a>00833         <a class="code" href="classEdgeDetect.html#2b59cd7d4e724d761de259463c8b7425">clusters</a>[cluster].<a class="code" href="structPixelCluster.html#1b862ff6db49e21b7c51f62364775fa9">beta</a> = ((halfArea - area1) / outM) + A;
<a name="l00834"></a>00834       }
<a name="l00835"></a>00835       <span class="comment">//Within area 3-4</span>
<a name="l00836"></a>00836       <span class="keywordflow">else</span> <span class="keywordflow">if</span>( area1 + area2 + area3 + area4 &gt; halfArea )
<a name="l00837"></a>00837       {
<a name="l00838"></a>00838         <span class="keywordtype">float</span> a = -0.5f;
<a name="l00839"></a>00839         <span class="keywordtype">float</span> b = E/2 + 2.5f/2; 
<a name="l00840"></a>00840         <span class="keywordtype">float</span> c = area3 - 2.5f*E/2;
<a name="l00841"></a>00841         <a class="code" href="classEdgeDetect.html#2b59cd7d4e724d761de259463c8b7425">clusters</a>[cluster].<a class="code" href="structPixelCluster.html#1b862ff6db49e21b7c51f62364775fa9">beta</a> = (-b + (float)sqrt( b*b - 4*a*c )) / (2*a);
<a name="l00842"></a>00842       }
<a name="l00843"></a>00843       <span class="comment">//Within area5</span>
<a name="l00844"></a>00844       <span class="keywordflow">else</span>
<a name="l00845"></a>00845       {
<a name="l00846"></a>00846         <a class="code" href="classEdgeDetect.html#2b59cd7d4e724d761de259463c8b7425">clusters</a>[cluster].<a class="code" href="structPixelCluster.html#1b862ff6db49e21b7c51f62364775fa9">beta</a> = ((halfArea - (area1 + area2 + area3 + area4) ) / outL) + E;
<a name="l00847"></a>00847       }
<a name="l00848"></a>00848     } <span class="comment">//end case 3</span>
<a name="l00849"></a>00849     <span class="comment">//---------------------------------------------------------------</span>
<a name="l00850"></a>00850     
<a name="l00851"></a>00851     <span class="comment">//Compute edge threshold</span>
<a name="l00852"></a>00852     <span class="keywordtype">int</span> lumJND = 255/50;
<a name="l00853"></a>00853     <a class="code" href="classEdgeDetect.html#2b59cd7d4e724d761de259463c8b7425">clusters</a>[cluster].<a class="code" href="structPixelCluster.html#62e75ced0c1818f658904e6878807780">edgeThreshold</a> = <a class="code" href="classEdgeDetect.html#2b59cd7d4e724d761de259463c8b7425">clusters</a>[cluster].<a class="code" href="structPixelCluster.html#fdd138d50bba29d70be4569ed676658d">mode</a> + <a class="code" href="classEdgeDetect.html#2b59cd7d4e724d761de259463c8b7425">clusters</a>[cluster].<a class="code" href="structPixelCluster.html#1b862ff6db49e21b7c51f62364775fa9">beta</a>*lumJND;
<a name="l00854"></a>00854 
<a name="l00855"></a>00855   } <span class="comment">//end for cluster</span>
<a name="l00856"></a>00856   
<a name="l00857"></a>00857 }
</pre></div>
<p>

</div>
</div><p>
<a class="anchor" name="e3c0ba3ea2ff407e768b5616c450396a"></a><!-- doxytag: member="EdgeDetect::computeEdgeMagAndGSLCmaps" ref="e3c0ba3ea2ff407e768b5616c450396a" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void EdgeDetect::computeEdgeMagAndGSLCmaps           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

<p>Definition at line <a class="el" href="edgeDetect_8cpp_source.html#l00341">341</a> of file <a class="el" href="edgeDetect_8cpp_source.html">edgeDetect.cpp</a>.</p>

<p>References <a class="el" href="edgeDetect_8h_source.html#l00106">edgeMagMap</a>, <a class="el" href="edgeDetect_8h_source.html#l00109">GSLCmap</a>, <a class="el" href="edgeDetect_8h_source.html#l00093">image</a>, and <a class="el" href="edgeDetect_8cpp_source.html#l00422">pixelLum()</a>.</p>

<p>Referenced by <a class="el" href="edgeDetect_8cpp_source.html#l00192">EdgeDetect()</a>.</p>
<div class="fragment"><pre class="fragment"><a name="l00342"></a>00342 {
<a name="l00343"></a>00343   <span class="keywordtype">int</span> x, y;
<a name="l00344"></a>00344   <span class="keywordtype">int</span> idealPattern[9];
<a name="l00345"></a>00345   <span class="keywordtype">int</span> pixelLums[9];
<a name="l00346"></a>00346   
<a name="l00347"></a>00347   <span class="comment">//-------  </span>
<a name="l00348"></a>00348   <span class="comment">//iterate over all pixels</span>
<a name="l00349"></a>00349   <span class="keywordflow">for</span>( y=0; y&lt;<a class="code" href="classEdgeDetect.html#511da5a85c2e50215d7e543ae6abb7a5">image</a>-&gt;height(); y++)
<a name="l00350"></a>00350   {   
<a name="l00351"></a>00351     <span class="keywordflow">for</span>( x=0; x&lt;<a class="code" href="classEdgeDetect.html#511da5a85c2e50215d7e543ae6abb7a5">image</a>-&gt;width(); x++)
<a name="l00352"></a>00352     {
<a name="l00353"></a>00353       <span class="comment">//compute pixel luminances for entire grid</span>
<a name="l00354"></a>00354       pixelLums[0] = <a class="code" href="classEdgeDetect.html#ffff454457969355d2f90572f96703b4">pixelLum</a>(x-1,y-1);
<a name="l00355"></a>00355       pixelLums[1] = <a class="code" href="classEdgeDetect.html#ffff454457969355d2f90572f96703b4">pixelLum</a>(x  ,y-1);
<a name="l00356"></a>00356       pixelLums[2] = <a class="code" href="classEdgeDetect.html#ffff454457969355d2f90572f96703b4">pixelLum</a>(x+1,y-1);
<a name="l00357"></a>00357       pixelLums[3] = <a class="code" href="classEdgeDetect.html#ffff454457969355d2f90572f96703b4">pixelLum</a>(x-1,y  );
<a name="l00358"></a>00358       pixelLums[4] = <a class="code" href="classEdgeDetect.html#ffff454457969355d2f90572f96703b4">pixelLum</a>(x  ,y  );
<a name="l00359"></a>00359       pixelLums[5] = <a class="code" href="classEdgeDetect.html#ffff454457969355d2f90572f96703b4">pixelLum</a>(x+1,y  );
<a name="l00360"></a>00360       pixelLums[6] = <a class="code" href="classEdgeDetect.html#ffff454457969355d2f90572f96703b4">pixelLum</a>(x-1,y+1);
<a name="l00361"></a>00361       pixelLums[7] = <a class="code" href="classEdgeDetect.html#ffff454457969355d2f90572f96703b4">pixelLum</a>(x  ,y+1);
<a name="l00362"></a>00362       pixelLums[8] = <a class="code" href="classEdgeDetect.html#ffff454457969355d2f90572f96703b4">pixelLum</a>(x+1,y+1);
<a name="l00363"></a>00363       
<a name="l00364"></a>00364       <span class="comment">//compute average</span>
<a name="l00365"></a>00365       <span class="keywordtype">float</span> avg = 0;
<a name="l00366"></a>00366       <span class="keywordtype">int</span> i;
<a name="l00367"></a>00367       <span class="keywordflow">for</span>(i=0; i&lt;=8; i++)
<a name="l00368"></a>00368       {
<a name="l00369"></a>00369         avg+= pixelLums[i];
<a name="l00370"></a>00370       }
<a name="l00371"></a>00371       avg = avg / 9;
<a name="l00372"></a>00372       
<a name="l00373"></a>00373       <span class="comment">//determine ideal pattern and I0 and I1 averages</span>
<a name="l00374"></a>00374       <span class="keywordtype">int</span> centerPixelLum = pixelLums[4];
<a name="l00375"></a>00375       <span class="keywordtype">float</span> centerDiff = centerPixelLum - avg;
<a name="l00376"></a>00376       
<a name="l00377"></a>00377       <span class="keywordtype">float</span> I0avg = 0;
<a name="l00378"></a>00378       <span class="keywordtype">int</span> I0count = 0;
<a name="l00379"></a>00379       
<a name="l00380"></a>00380       <span class="keywordtype">float</span> I1avg = 0;
<a name="l00381"></a>00381       <span class="keywordtype">int</span> I1count = 0;
<a name="l00382"></a>00382       
<a name="l00383"></a>00383       <span class="keywordflow">for</span>(i=0; i&lt;=8; i++)
<a name="l00384"></a>00384       {
<a name="l00385"></a>00385         <span class="keywordflow">if</span>( centerDiff * (pixelLums[i]-avg) &gt;=0 )
<a name="l00386"></a>00386         { 
<a name="l00387"></a>00387           I1avg+=pixelLums[i];
<a name="l00388"></a>00388           I1count++;
<a name="l00389"></a>00389           idealPattern[i] = 1; 
<a name="l00390"></a>00390         }
<a name="l00391"></a>00391         <span class="keywordflow">else</span> 
<a name="l00392"></a>00392         { 
<a name="l00393"></a>00393           I0avg+=pixelLums[i];
<a name="l00394"></a>00394           I0count++;
<a name="l00395"></a>00395           idealPattern[i] = 0; 
<a name="l00396"></a>00396         }
<a name="l00397"></a>00397       }
<a name="l00398"></a>00398 
<a name="l00399"></a>00399       <span class="comment">//compute and store edge magnitude</span>
<a name="l00400"></a>00400       <span class="keywordflow">if</span>(I0count &gt; 0) I0avg = I0avg/I0count;
<a name="l00401"></a>00401       <span class="keywordflow">if</span>(I1count &gt; 0) I1avg = I1avg/I1count;     
<a name="l00402"></a>00402       <a class="code" href="classEdgeDetect.html#f900ff52156cd0fb2159f35a75c10d7f">edgeMagMap</a>[x + y*<a class="code" href="classEdgeDetect.html#511da5a85c2e50215d7e543ae6abb7a5">image</a>-&gt;width()] = QABS( I1avg - I0avg );
<a name="l00403"></a>00403       
<a name="l00404"></a>00404       <span class="comment">//compute and store GSLC</span>
<a name="l00405"></a>00405       <span class="keywordtype">int</span> GSLC=0;
<a name="l00406"></a>00406       <span class="keywordtype">int</span> weight = 1;
<a name="l00407"></a>00407       <span class="keywordflow">for</span>(i=0; i&lt;9; i++)
<a name="l00408"></a>00408       {
<a name="l00409"></a>00409         <span class="comment">//skip center</span>
<a name="l00410"></a>00410         <span class="keywordflow">if</span>(i == 4) <span class="keywordflow">continue</span>;
<a name="l00411"></a>00411         
<a name="l00412"></a>00412         <span class="keywordflow">if</span>(idealPattern[i] == 1)
<a name="l00413"></a>00413         { GSLC+=weight; }
<a name="l00414"></a>00414         
<a name="l00415"></a>00415         weight = weight*2;
<a name="l00416"></a>00416       }
<a name="l00417"></a>00417       <a class="code" href="classEdgeDetect.html#fd33a5703bc7be4f14400b26d8004668">GSLCmap</a>[x + y*<a class="code" href="classEdgeDetect.html#511da5a85c2e50215d7e543ae6abb7a5">image</a>-&gt;width()] = GSLC;
<a name="l00418"></a>00418     } <span class="comment">//x</span>
<a name="l00419"></a>00419   } <span class="comment">//y</span>
<a name="l00420"></a>00420 }
</pre></div>
<p>

</div>
</div><p>
<a class="anchor" name="5ece76d2c80f08b9d43153a3231198eb"></a><!-- doxytag: member="EdgeDetect::constructEdgeImage" ref="5ece76d2c80f08b9d43153a3231198eb" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void EdgeDetect::constructEdgeImage           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

<p>Definition at line <a class="el" href="edgeDetect_8cpp_source.html#l00859">859</a> of file <a class="el" href="edgeDetect_8cpp_source.html">edgeDetect.cpp</a>.</p>

<p>References <a class="el" href="blur_8cpp_source.html#l00094">blurImage()</a>, <a class="el" href="edgeDetect_8h_source.html#l00113">clusters</a>, <a class="el" href="edgeDetect_8h_source.html#l00023">LUTentry::direction</a>, <a class="el" href="edgeDetect_8h_source.html#l00106">edgeMagMap</a>, <a class="el" href="edgeDetect_8h_source.html#l00041">PixelCluster::edgeThreshold</a>, <a class="el" href="contrast_8cpp_source.html#l00085">enhanceImageContrast()</a>, <a class="el" href="edgeDetect_8h_source.html#l00022">LUTentry::ESF</a>, <a class="el" href="edgeDetect_8h_source.html#l00109">GSLCmap</a>, <a class="el" href="blur_8cpp_source.html#l00079">height</a>, <a class="el" href="edgeDetect_8h_source.html#l00093">image</a>, <a class="el" href="edgeDetect_8h_source.html#l00103">lumMap</a>, <a class="el" href="edgeDetect_8h_source.html#l00090">LUT</a>, <a class="el" href="edgeDetect_8h_source.html#l00112">numClusters</a>, and <a class="el" href="blur_8cpp_source.html#l00079">width</a>.</p>

<p>Referenced by <a class="el" href="edgeDetect_8cpp_source.html#l00192">EdgeDetect()</a>.</p>
<div class="fragment"><pre class="fragment"><a name="l00860"></a>00860 {
<a name="l00861"></a>00861   <span class="keywordtype">int</span> x, y;
<a name="l00862"></a>00862   QRgb* rgb;
<a name="l00863"></a>00863   
<a name="l00864"></a>00864   uchar* scanLine;
<a name="l00865"></a>00865   <span class="keywordflow">for</span>( y=0; y&lt;<a class="code" href="classEdgeDetect.html#511da5a85c2e50215d7e543ae6abb7a5">image</a>-&gt;height(); y++)
<a name="l00866"></a>00866   {   
<a name="l00867"></a>00867     scanLine = <a class="code" href="classEdgeDetect.html#511da5a85c2e50215d7e543ae6abb7a5">image</a>-&gt;scanLine(y);
<a name="l00868"></a>00868     <span class="keywordflow">for</span>( x=0; x&lt;<a class="code" href="classEdgeDetect.html#511da5a85c2e50215d7e543ae6abb7a5">image</a>-&gt;width(); x++)
<a name="l00869"></a>00869     {
<a name="l00870"></a>00870       <span class="comment">//initialize pixel to black </span>
<a name="l00871"></a>00871       rgb = ((QRgb*)scanLine+x);
<a name="l00872"></a>00872       *rgb = qRgb( 0, 0, 0 );
<a name="l00873"></a>00873       
<a name="l00874"></a>00874       <span class="comment">//lookup ESF for this pixel</span>
<a name="l00875"></a>00875       <span class="keywordtype">float</span> ESF = <a class="code" href="classEdgeDetect.html#67919ec1f138bd5dcbc3ad32990a16d0">LUT</a>[ <a class="code" href="classEdgeDetect.html#fd33a5703bc7be4f14400b26d8004668">GSLCmap</a>[x + y*<a class="code" href="classEdgeDetect.html#511da5a85c2e50215d7e543ae6abb7a5">image</a>-&gt;width()] ].<a class="code" href="structLUTentry.html#79e744afdd51960ebb78ef4b355555b6">ESF</a>;
<a name="l00876"></a>00876 
<a name="l00877"></a>00877       <span class="comment">//If ESF value for this pixel is 0 skip</span>
<a name="l00878"></a>00878       <span class="keywordflow">if</span>( ESF == 0.0f ) <span class="keywordflow">continue</span>;
<a name="l00879"></a>00879 
<a name="l00880"></a>00880       <span class="comment">//lookup edge magnitude threshold</span>
<a name="l00881"></a>00881       <span class="keywordtype">float</span> lum = <a class="code" href="classEdgeDetect.html#2640fdd41a06c72f469e7790c38ea88d">lumMap</a>[x + y*<a class="code" href="classEdgeDetect.html#511da5a85c2e50215d7e543ae6abb7a5">image</a>-&gt;width()];
<a name="l00882"></a>00882       <span class="keywordtype">float</span> edgeMagThresh = -1.0f;
<a name="l00883"></a>00883       <span class="keywordtype">int</span> cluster;
<a name="l00884"></a>00884       <span class="keywordflow">for</span>(cluster=0; cluster&lt;<a class="code" href="classEdgeDetect.html#d9917825c8d8a4d6cf0397b3f44b443d">numClusters</a>; cluster++)
<a name="l00885"></a>00885       {
<a name="l00886"></a>00886         <span class="keywordflow">if</span>(lum &gt;= <a class="code" href="classEdgeDetect.html#2b59cd7d4e724d761de259463c8b7425">clusters</a>[cluster].minLuminance &amp;&amp;
<a name="l00887"></a>00887            lum &lt;= <a class="code" href="classEdgeDetect.html#2b59cd7d4e724d761de259463c8b7425">clusters</a>[cluster].maxLuminance)
<a name="l00888"></a>00888         {
<a name="l00889"></a>00889           edgeMagThresh = <a class="code" href="classEdgeDetect.html#2b59cd7d4e724d761de259463c8b7425">clusters</a>[cluster].<a class="code" href="structPixelCluster.html#62e75ced0c1818f658904e6878807780">edgeThreshold</a>;
<a name="l00890"></a>00890           <span class="keywordflow">break</span>;
<a name="l00891"></a>00891         }
<a name="l00892"></a>00892       }
<a name="l00893"></a>00893 
<a name="l00894"></a>00894       <span class="comment">//if cluster not found bail</span>
<a name="l00895"></a>00895       <span class="keywordflow">if</span>( cluster &gt;= numClusters )
<a name="l00896"></a>00896       {
<a name="l00897"></a>00897 <span class="comment">//        cout &lt;&lt; "Error! Could not find cluster pixel belonged to!\n";</span>
<a name="l00898"></a>00898         <span class="keywordflow">continue</span>;
<a name="l00899"></a>00899       }
<a name="l00900"></a>00900       
<a name="l00901"></a>00901       <span class="comment">//if edge mag below thresh then skip</span>
<a name="l00902"></a>00902       <span class="keywordflow">if</span>( <a class="code" href="classEdgeDetect.html#f900ff52156cd0fb2159f35a75c10d7f">edgeMagMap</a>[x + y*<a class="code" href="classEdgeDetect.html#511da5a85c2e50215d7e543ae6abb7a5">image</a>-&gt;width()] &lt; edgeMagThresh ) <span class="keywordflow">continue</span>;
<a name="l00903"></a>00903         
<a name="l00904"></a>00904       <span class="comment">//ok, last checks implement NMS (non-maximum supression)</span>
<a name="l00905"></a>00905       <span class="keywordtype">int</span> direction = <a class="code" href="classEdgeDetect.html#67919ec1f138bd5dcbc3ad32990a16d0">LUT</a>[ <a class="code" href="classEdgeDetect.html#fd33a5703bc7be4f14400b26d8004668">GSLCmap</a>[x + y*<a class="code" href="classEdgeDetect.html#511da5a85c2e50215d7e543ae6abb7a5">image</a>-&gt;width()] ].<a class="code" href="structLUTentry.html#86dd3feb468680e96a44c5405501ea8f">direction</a>;
<a name="l00906"></a>00906       <span class="keywordtype">int</span> neighborIndex1 = -1;
<a name="l00907"></a>00907       <span class="keywordtype">int</span> neighborIndex2 = -1;
<a name="l00908"></a>00908 
<a name="l00909"></a>00909       <span class="keywordflow">if</span>( direction == 0)
<a name="l00910"></a>00910       {
<a name="l00911"></a>00911         <span class="keywordflow">if</span>( x &gt; 0) 
<a name="l00912"></a>00912           neighborIndex1 = x-1 + y*<a class="code" href="classEdgeDetect.html#511da5a85c2e50215d7e543ae6abb7a5">image</a>-&gt;width();
<a name="l00913"></a>00913         <span class="keywordflow">if</span>( x &lt; image-&gt;<a class="code" href="blur_8cpp.html#2474a5474cbff19523a51eb1de01cda4">width</a>() - 1 ) 
<a name="l00914"></a>00914           neighborIndex2 = x+1 + y*<a class="code" href="classEdgeDetect.html#511da5a85c2e50215d7e543ae6abb7a5">image</a>-&gt;width();
<a name="l00915"></a>00915       }
<a name="l00916"></a>00916       <span class="keywordflow">else</span> <span class="keywordflow">if</span>(direction == 1)
<a name="l00917"></a>00917       {
<a name="l00918"></a>00918         <span class="keywordflow">if</span>( x &gt; 0 &amp;&amp; y &lt; image-&gt;<a class="code" href="blur_8cpp.html#d12fc34ce789bce6c8a05d8a17138534">height</a>() - 1 )
<a name="l00919"></a>00919           neighborIndex1 = x-1 + (y+1)*<a class="code" href="classEdgeDetect.html#511da5a85c2e50215d7e543ae6abb7a5">image</a>-&gt;width();
<a name="l00920"></a>00920         <span class="keywordflow">if</span>( x &lt; image-&gt;<a class="code" href="blur_8cpp.html#2474a5474cbff19523a51eb1de01cda4">width</a>() - 1 &amp;&amp; y &gt; 0 )
<a name="l00921"></a>00921           neighborIndex2 = x+1 + (y-1)*<a class="code" href="classEdgeDetect.html#511da5a85c2e50215d7e543ae6abb7a5">image</a>-&gt;width();
<a name="l00922"></a>00922       }
<a name="l00923"></a>00923       <span class="keywordflow">else</span> <span class="keywordflow">if</span>(direction == 2)
<a name="l00924"></a>00924       {
<a name="l00925"></a>00925         <span class="keywordflow">if</span>( y &lt; image-&gt;<a class="code" href="blur_8cpp.html#d12fc34ce789bce6c8a05d8a17138534">height</a>() - 1 ) 
<a name="l00926"></a>00926           neighborIndex1 = x + (y+1)*<a class="code" href="classEdgeDetect.html#511da5a85c2e50215d7e543ae6abb7a5">image</a>-&gt;width();
<a name="l00927"></a>00927         <span class="keywordflow">if</span>( y &gt; 0) 
<a name="l00928"></a>00928           neighborIndex2 = x + (y-1)*<a class="code" href="classEdgeDetect.html#511da5a85c2e50215d7e543ae6abb7a5">image</a>-&gt;width();
<a name="l00929"></a>00929       }
<a name="l00930"></a>00930       <span class="keywordflow">else</span> <span class="keywordflow">if</span>(direction == 3)
<a name="l00931"></a>00931       {
<a name="l00932"></a>00932         <span class="keywordflow">if</span>( x &lt; image-&gt;<a class="code" href="blur_8cpp.html#2474a5474cbff19523a51eb1de01cda4">width</a>() - 1 &amp;&amp; y &lt; image-&gt;<a class="code" href="blur_8cpp.html#d12fc34ce789bce6c8a05d8a17138534">height</a>() - 1 )
<a name="l00933"></a>00933           neighborIndex1 = x+1 + (y+1)*<a class="code" href="classEdgeDetect.html#511da5a85c2e50215d7e543ae6abb7a5">image</a>-&gt;width();
<a name="l00934"></a>00934         <span class="keywordflow">if</span>( x &gt; 0 &amp;&amp; y &gt; 0 )
<a name="l00935"></a>00935           neighborIndex2 = x-1 + (y-1)*<a class="code" href="classEdgeDetect.html#511da5a85c2e50215d7e543ae6abb7a5">image</a>-&gt;width();
<a name="l00936"></a>00936       }
<a name="l00937"></a>00937 
<a name="l00938"></a>00938       <span class="comment">//neighbor 1 has higher confidence, skip!</span>
<a name="l00939"></a>00939       <span class="keywordflow">if</span>( neighborIndex1 != -1 &amp;&amp;
<a name="l00940"></a>00940           <a class="code" href="classEdgeDetect.html#67919ec1f138bd5dcbc3ad32990a16d0">LUT</a>[ <a class="code" href="classEdgeDetect.html#fd33a5703bc7be4f14400b26d8004668">GSLCmap</a>[neighborIndex1] ].ESF * <a class="code" href="classEdgeDetect.html#f900ff52156cd0fb2159f35a75c10d7f">edgeMagMap</a>[neighborIndex1] &gt;
<a name="l00941"></a>00941           ESF * <a class="code" href="classEdgeDetect.html#f900ff52156cd0fb2159f35a75c10d7f">edgeMagMap</a>[x + y*<a class="code" href="classEdgeDetect.html#511da5a85c2e50215d7e543ae6abb7a5">image</a>-&gt;width()] )
<a name="l00942"></a>00942         <span class="keywordflow">continue</span>;
<a name="l00943"></a>00943       
<a name="l00944"></a>00944       <span class="comment">//neighbor 2 has higher confidence, skip!</span>
<a name="l00945"></a>00945       <span class="keywordflow">if</span>( neighborIndex2 != -1 &amp;&amp;
<a name="l00946"></a>00946           <a class="code" href="classEdgeDetect.html#67919ec1f138bd5dcbc3ad32990a16d0">LUT</a>[ <a class="code" href="classEdgeDetect.html#fd33a5703bc7be4f14400b26d8004668">GSLCmap</a>[neighborIndex2] ].ESF * <a class="code" href="classEdgeDetect.html#f900ff52156cd0fb2159f35a75c10d7f">edgeMagMap</a>[neighborIndex2] &gt;
<a name="l00947"></a>00947           ESF * <a class="code" href="classEdgeDetect.html#f900ff52156cd0fb2159f35a75c10d7f">edgeMagMap</a>[x + y*<a class="code" href="classEdgeDetect.html#511da5a85c2e50215d7e543ae6abb7a5">image</a>-&gt;width()] )
<a name="l00948"></a>00948         <span class="keywordflow">continue</span>;
<a name="l00949"></a>00949       
<a name="l00950"></a>00950       <span class="comment">//All tests passed! Mark edge!</span>
<a name="l00951"></a>00951       *rgb = qRgb( 255, 255, 255 );
<a name="l00952"></a>00952     } <span class="comment">//x</span>
<a name="l00953"></a>00953   } <span class="comment">//y</span>
<a name="l00954"></a>00954   
<a name="l00955"></a>00955   <span class="comment">//blur image - all of it</span>
<a name="l00956"></a>00956   <a class="code" href="blur_8cpp.html#e7be57816a66918a26e567655f4b8e1c">blurImage</a>( *<a class="code" href="classEdgeDetect.html#511da5a85c2e50215d7e543ae6abb7a5">image</a>, 2.0f );
<a name="l00957"></a>00957 
<a name="l00958"></a>00958   <span class="comment">//normalize image</span>
<a name="l00959"></a>00959   <a class="code" href="contrast_8cpp.html#5a7a57ce540b35b0987153951f45a398">enhanceImageContrast</a>( <a class="code" href="classEdgeDetect.html#511da5a85c2e50215d7e543ae6abb7a5">image</a> );
<a name="l00960"></a>00960   
<a name="l00961"></a>00961 }
</pre></div>
<p>

</div>
</div><p>
<a class="anchor" name="c3889f3dd58427f42936eb9467741fe0"></a><!-- doxytag: member="EdgeDetect::constructGSLClut" ref="c3889f3dd58427f42936eb9467741fe0" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void EdgeDetect::constructGSLClut           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

<p>Definition at line <a class="el" href="edgeDetect_8cpp_source.html#l00971">971</a> of file <a class="el" href="edgeDetect_8cpp_source.html">edgeDetect.cpp</a>.</p>

<p>References <a class="el" href="edgeDetect_8h_source.html#l00023">LUTentry::direction</a>, <a class="el" href="edgeDetect_8h_source.html#l00022">LUTentry::ESF</a>, and <a class="el" href="edgeDetect_8h_source.html#l00090">LUT</a>.</p>

<p>Referenced by <a class="el" href="edgeDetect_8cpp_source.html#l00264">allocateAndInitObjects()</a>.</p>
<div class="fragment"><pre class="fragment"><a name="l00972"></a>00972 {
<a name="l00973"></a>00973   <span class="comment">//----------------------</span>
<a name="l00974"></a>00974   <span class="comment">//First fill entire table with 0 ESF's and invalid directions</span>
<a name="l00975"></a>00975   <span class="keywordtype">int</span> i;
<a name="l00976"></a>00976   <span class="keywordflow">for</span>(i=0; i&lt;256; i++)
<a name="l00977"></a>00977   {
<a name="l00978"></a>00978     <a class="code" href="classEdgeDetect.html#67919ec1f138bd5dcbc3ad32990a16d0">LUT</a>[i].<a class="code" href="structLUTentry.html#79e744afdd51960ebb78ef4b355555b6">ESF</a> = 0.0f;
<a name="l00979"></a>00979     <a class="code" href="classEdgeDetect.html#67919ec1f138bd5dcbc3ad32990a16d0">LUT</a>[i].<a class="code" href="structLUTentry.html#86dd3feb468680e96a44c5405501ea8f">direction</a> = -1;
<a name="l00980"></a>00980   }
<a name="l00981"></a>00981   <span class="comment">//----------------------</span>
<a name="l00982"></a>00982   <span class="comment">//Next code in all pattern that are highly </span>
<a name="l00983"></a>00983   <span class="comment">//likely to be on edges as described in the paper</span>
<a name="l00984"></a>00984   <span class="comment">//----------------------</span>
<a name="l00985"></a>00985   <span class="comment">//Pattern (a)</span>
<a name="l00986"></a>00986 
<a name="l00987"></a>00987   <span class="comment">// ###</span>
<a name="l00988"></a>00988   <span class="comment">// ##.</span>
<a name="l00989"></a>00989   <span class="comment">// ...</span>
<a name="l00990"></a>00990   <a class="code" href="classEdgeDetect.html#67919ec1f138bd5dcbc3ad32990a16d0">LUT</a>[15].<a class="code" href="structLUTentry.html#79e744afdd51960ebb78ef4b355555b6">ESF</a> = 0.179f;
<a name="l00991"></a>00991   <a class="code" href="classEdgeDetect.html#67919ec1f138bd5dcbc3ad32990a16d0">LUT</a>[15].<a class="code" href="structLUTentry.html#86dd3feb468680e96a44c5405501ea8f">direction</a> = 3;
<a name="l00992"></a>00992 
<a name="l00993"></a>00993   <span class="comment">// ...</span>
<a name="l00994"></a>00994   <span class="comment">// .##</span>
<a name="l00995"></a>00995   <span class="comment">// ###</span>
<a name="l00996"></a>00996   <a class="code" href="classEdgeDetect.html#67919ec1f138bd5dcbc3ad32990a16d0">LUT</a>[240].<a class="code" href="structLUTentry.html#79e744afdd51960ebb78ef4b355555b6">ESF</a> = 0.179f;
<a name="l00997"></a>00997   <a class="code" href="classEdgeDetect.html#67919ec1f138bd5dcbc3ad32990a16d0">LUT</a>[240].<a class="code" href="structLUTentry.html#86dd3feb468680e96a44c5405501ea8f">direction</a> = 3;
<a name="l00998"></a>00998 
<a name="l00999"></a>00999   <span class="comment">// ###</span>
<a name="l01000"></a>01000   <span class="comment">// .##</span>
<a name="l01001"></a>01001   <span class="comment">// ...</span>
<a name="l01002"></a>01002   <a class="code" href="classEdgeDetect.html#67919ec1f138bd5dcbc3ad32990a16d0">LUT</a>[23].<a class="code" href="structLUTentry.html#79e744afdd51960ebb78ef4b355555b6">ESF</a> = 0.179f;
<a name="l01003"></a>01003   <a class="code" href="classEdgeDetect.html#67919ec1f138bd5dcbc3ad32990a16d0">LUT</a>[23].<a class="code" href="structLUTentry.html#86dd3feb468680e96a44c5405501ea8f">direction</a> = 1;
<a name="l01004"></a>01004   
<a name="l01005"></a>01005   <span class="comment">// ...</span>
<a name="l01006"></a>01006   <span class="comment">// ##.</span>
<a name="l01007"></a>01007   <span class="comment">// ###</span>
<a name="l01008"></a>01008   <a class="code" href="classEdgeDetect.html#67919ec1f138bd5dcbc3ad32990a16d0">LUT</a>[232].<a class="code" href="structLUTentry.html#79e744afdd51960ebb78ef4b355555b6">ESF</a> = 0.179f;
<a name="l01009"></a>01009   <a class="code" href="classEdgeDetect.html#67919ec1f138bd5dcbc3ad32990a16d0">LUT</a>[232].<a class="code" href="structLUTentry.html#86dd3feb468680e96a44c5405501ea8f">direction</a> = 1;
<a name="l01010"></a>01010    
<a name="l01011"></a>01011   <span class="comment">// ##.</span>
<a name="l01012"></a>01012   <span class="comment">// ##.</span>
<a name="l01013"></a>01013   <span class="comment">// #..</span>
<a name="l01014"></a>01014   <a class="code" href="classEdgeDetect.html#67919ec1f138bd5dcbc3ad32990a16d0">LUT</a>[43].<a class="code" href="structLUTentry.html#79e744afdd51960ebb78ef4b355555b6">ESF</a> = 0.179f;
<a name="l01015"></a>01015   <a class="code" href="classEdgeDetect.html#67919ec1f138bd5dcbc3ad32990a16d0">LUT</a>[43].<a class="code" href="structLUTentry.html#86dd3feb468680e96a44c5405501ea8f">direction</a> = 3;
<a name="l01016"></a>01016   
<a name="l01017"></a>01017   <span class="comment">// ..#</span>
<a name="l01018"></a>01018   <span class="comment">// .##</span>
<a name="l01019"></a>01019   <span class="comment">// .##</span>
<a name="l01020"></a>01020   <a class="code" href="classEdgeDetect.html#67919ec1f138bd5dcbc3ad32990a16d0">LUT</a>[212].<a class="code" href="structLUTentry.html#79e744afdd51960ebb78ef4b355555b6">ESF</a> = 0.179f;
<a name="l01021"></a>01021   <a class="code" href="classEdgeDetect.html#67919ec1f138bd5dcbc3ad32990a16d0">LUT</a>[212].<a class="code" href="structLUTentry.html#86dd3feb468680e96a44c5405501ea8f">direction</a> = 3;
<a name="l01022"></a>01022 
<a name="l01023"></a>01023   <span class="comment">// #..</span>
<a name="l01024"></a>01024   <span class="comment">// ##.</span>
<a name="l01025"></a>01025   <span class="comment">// ##.</span>
<a name="l01026"></a>01026   <a class="code" href="classEdgeDetect.html#67919ec1f138bd5dcbc3ad32990a16d0">LUT</a>[105].<a class="code" href="structLUTentry.html#79e744afdd51960ebb78ef4b355555b6">ESF</a> = 0.179f;
<a name="l01027"></a>01027   <a class="code" href="classEdgeDetect.html#67919ec1f138bd5dcbc3ad32990a16d0">LUT</a>[105].<a class="code" href="structLUTentry.html#86dd3feb468680e96a44c5405501ea8f">direction</a> = 1;
<a name="l01028"></a>01028 
<a name="l01029"></a>01029   <span class="comment">// .##</span>
<a name="l01030"></a>01030   <span class="comment">// .##</span>
<a name="l01031"></a>01031   <span class="comment">// ..#</span>
<a name="l01032"></a>01032   <a class="code" href="classEdgeDetect.html#67919ec1f138bd5dcbc3ad32990a16d0">LUT</a>[150].<a class="code" href="structLUTentry.html#79e744afdd51960ebb78ef4b355555b6">ESF</a> = 0.179f;
<a name="l01033"></a>01033   <a class="code" href="classEdgeDetect.html#67919ec1f138bd5dcbc3ad32990a16d0">LUT</a>[150].<a class="code" href="structLUTentry.html#86dd3feb468680e96a44c5405501ea8f">direction</a> = 1;
<a name="l01034"></a>01034   <span class="comment">//----------------------</span>
<a name="l01035"></a>01035   <span class="comment">//Pattern (b)</span>
<a name="l01036"></a>01036 
<a name="l01037"></a>01037   <span class="comment">// ###</span>
<a name="l01038"></a>01038   <span class="comment">// ###</span>
<a name="l01039"></a>01039   <span class="comment">// ...</span>
<a name="l01040"></a>01040   <a class="code" href="classEdgeDetect.html#67919ec1f138bd5dcbc3ad32990a16d0">LUT</a>[31].<a class="code" href="structLUTentry.html#79e744afdd51960ebb78ef4b355555b6">ESF</a> = 0.137f;
<a name="l01041"></a>01041   <a class="code" href="classEdgeDetect.html#67919ec1f138bd5dcbc3ad32990a16d0">LUT</a>[31].<a class="code" href="structLUTentry.html#86dd3feb468680e96a44c5405501ea8f">direction</a> = 2;
<a name="l01042"></a>01042 
<a name="l01043"></a>01043   <span class="comment">// ...</span>
<a name="l01044"></a>01044   <span class="comment">// ###</span>
<a name="l01045"></a>01045   <span class="comment">// ###</span>
<a name="l01046"></a>01046   <a class="code" href="classEdgeDetect.html#67919ec1f138bd5dcbc3ad32990a16d0">LUT</a>[248].<a class="code" href="structLUTentry.html#79e744afdd51960ebb78ef4b355555b6">ESF</a> = 0.137f;
<a name="l01047"></a>01047   <a class="code" href="classEdgeDetect.html#67919ec1f138bd5dcbc3ad32990a16d0">LUT</a>[248].<a class="code" href="structLUTentry.html#86dd3feb468680e96a44c5405501ea8f">direction</a> = 2;
<a name="l01048"></a>01048   
<a name="l01049"></a>01049   <span class="comment">// ##.</span>
<a name="l01050"></a>01050   <span class="comment">// ##.</span>
<a name="l01051"></a>01051   <span class="comment">// ##.</span>
<a name="l01052"></a>01052   <a class="code" href="classEdgeDetect.html#67919ec1f138bd5dcbc3ad32990a16d0">LUT</a>[107].<a class="code" href="structLUTentry.html#79e744afdd51960ebb78ef4b355555b6">ESF</a> = 0.137f;
<a name="l01053"></a>01053   <a class="code" href="classEdgeDetect.html#67919ec1f138bd5dcbc3ad32990a16d0">LUT</a>[107].<a class="code" href="structLUTentry.html#86dd3feb468680e96a44c5405501ea8f">direction</a> = 0;
<a name="l01054"></a>01054   
<a name="l01055"></a>01055   <span class="comment">// .##</span>
<a name="l01056"></a>01056   <span class="comment">// .##</span>
<a name="l01057"></a>01057   <span class="comment">// .##</span>
<a name="l01058"></a>01058   <a class="code" href="classEdgeDetect.html#67919ec1f138bd5dcbc3ad32990a16d0">LUT</a>[214].<a class="code" href="structLUTentry.html#79e744afdd51960ebb78ef4b355555b6">ESF</a> = 0.137f;
<a name="l01059"></a>01059   <a class="code" href="classEdgeDetect.html#67919ec1f138bd5dcbc3ad32990a16d0">LUT</a>[214].<a class="code" href="structLUTentry.html#86dd3feb468680e96a44c5405501ea8f">direction</a> = 0;
<a name="l01060"></a>01060   <span class="comment">//----------------------</span>
<a name="l01061"></a>01061   <span class="comment">//Pattern (c)</span>
<a name="l01062"></a>01062   
<a name="l01063"></a>01063   <span class="comment">// ###</span>
<a name="l01064"></a>01064   <span class="comment">// .#.</span>
<a name="l01065"></a>01065   <span class="comment">// ...</span>
<a name="l01066"></a>01066   <a class="code" href="classEdgeDetect.html#67919ec1f138bd5dcbc3ad32990a16d0">LUT</a>[7].<a class="code" href="structLUTentry.html#79e744afdd51960ebb78ef4b355555b6">ESF</a> = 0.126f;
<a name="l01067"></a>01067   <a class="code" href="classEdgeDetect.html#67919ec1f138bd5dcbc3ad32990a16d0">LUT</a>[7].<a class="code" href="structLUTentry.html#86dd3feb468680e96a44c5405501ea8f">direction</a> = 2;
<a name="l01068"></a>01068   
<a name="l01069"></a>01069   <span class="comment">// ...</span>
<a name="l01070"></a>01070   <span class="comment">// .#.</span>
<a name="l01071"></a>01071   <span class="comment">// ###</span>
<a name="l01072"></a>01072   <a class="code" href="classEdgeDetect.html#67919ec1f138bd5dcbc3ad32990a16d0">LUT</a>[224].<a class="code" href="structLUTentry.html#79e744afdd51960ebb78ef4b355555b6">ESF</a> = 0.126f;
<a name="l01073"></a>01073   <a class="code" href="classEdgeDetect.html#67919ec1f138bd5dcbc3ad32990a16d0">LUT</a>[224].<a class="code" href="structLUTentry.html#86dd3feb468680e96a44c5405501ea8f">direction</a> = 2;
<a name="l01074"></a>01074 
<a name="l01075"></a>01075   <span class="comment">// #..</span>
<a name="l01076"></a>01076   <span class="comment">// ##.</span>
<a name="l01077"></a>01077   <span class="comment">// #..</span>
<a name="l01078"></a>01078   <a class="code" href="classEdgeDetect.html#67919ec1f138bd5dcbc3ad32990a16d0">LUT</a>[41].<a class="code" href="structLUTentry.html#79e744afdd51960ebb78ef4b355555b6">ESF</a> = 0.126f;
<a name="l01079"></a>01079   <a class="code" href="classEdgeDetect.html#67919ec1f138bd5dcbc3ad32990a16d0">LUT</a>[41].<a class="code" href="structLUTentry.html#86dd3feb468680e96a44c5405501ea8f">direction</a> = 0; 
<a name="l01080"></a>01080   
<a name="l01081"></a>01081   <span class="comment">// ..#</span>
<a name="l01082"></a>01082   <span class="comment">// .##</span>
<a name="l01083"></a>01083   <span class="comment">// ..#</span>
<a name="l01084"></a>01084   <a class="code" href="classEdgeDetect.html#67919ec1f138bd5dcbc3ad32990a16d0">LUT</a>[148].<a class="code" href="structLUTentry.html#79e744afdd51960ebb78ef4b355555b6">ESF</a> = 0.126f;
<a name="l01085"></a>01085   <a class="code" href="classEdgeDetect.html#67919ec1f138bd5dcbc3ad32990a16d0">LUT</a>[148].<a class="code" href="structLUTentry.html#86dd3feb468680e96a44c5405501ea8f">direction</a> = 0;
<a name="l01086"></a>01086   <span class="comment">//----------------------</span>
<a name="l01087"></a>01087   <span class="comment">//Pattern (d)</span>
<a name="l01088"></a>01088   
<a name="l01089"></a>01089   <span class="comment">// ###</span>
<a name="l01090"></a>01090   <span class="comment">// ##.</span>
<a name="l01091"></a>01091   <span class="comment">// #..</span>
<a name="l01092"></a>01092   <a class="code" href="classEdgeDetect.html#67919ec1f138bd5dcbc3ad32990a16d0">LUT</a>[47].<a class="code" href="structLUTentry.html#79e744afdd51960ebb78ef4b355555b6">ESF</a> = 0.10f;
<a name="l01093"></a>01093   <a class="code" href="classEdgeDetect.html#67919ec1f138bd5dcbc3ad32990a16d0">LUT</a>[47].<a class="code" href="structLUTentry.html#86dd3feb468680e96a44c5405501ea8f">direction</a> = 3;
<a name="l01094"></a>01094    
<a name="l01095"></a>01095   <span class="comment">// ..#</span>
<a name="l01096"></a>01096   <span class="comment">// .##</span>
<a name="l01097"></a>01097   <span class="comment">// ###</span>
<a name="l01098"></a>01098   <a class="code" href="classEdgeDetect.html#67919ec1f138bd5dcbc3ad32990a16d0">LUT</a>[244].<a class="code" href="structLUTentry.html#79e744afdd51960ebb78ef4b355555b6">ESF</a> = 0.10f;
<a name="l01099"></a>01099   <a class="code" href="classEdgeDetect.html#67919ec1f138bd5dcbc3ad32990a16d0">LUT</a>[244].<a class="code" href="structLUTentry.html#86dd3feb468680e96a44c5405501ea8f">direction</a> = 3;
<a name="l01100"></a>01100 
<a name="l01101"></a>01101   <span class="comment">// ###</span>
<a name="l01102"></a>01102   <span class="comment">// .##</span>
<a name="l01103"></a>01103   <span class="comment">// ..#</span>
<a name="l01104"></a>01104   <a class="code" href="classEdgeDetect.html#67919ec1f138bd5dcbc3ad32990a16d0">LUT</a>[151].<a class="code" href="structLUTentry.html#79e744afdd51960ebb78ef4b355555b6">ESF</a> = 0.10f;
<a name="l01105"></a>01105   <a class="code" href="classEdgeDetect.html#67919ec1f138bd5dcbc3ad32990a16d0">LUT</a>[151].<a class="code" href="structLUTentry.html#86dd3feb468680e96a44c5405501ea8f">direction</a> = 1;
<a name="l01106"></a>01106 
<a name="l01107"></a>01107   <span class="comment">// #..</span>
<a name="l01108"></a>01108   <span class="comment">// ##.</span>
<a name="l01109"></a>01109   <span class="comment">// ###</span>
<a name="l01110"></a>01110   <a class="code" href="classEdgeDetect.html#67919ec1f138bd5dcbc3ad32990a16d0">LUT</a>[233].<a class="code" href="structLUTentry.html#79e744afdd51960ebb78ef4b355555b6">ESF</a> = 0.10f;
<a name="l01111"></a>01111   <a class="code" href="classEdgeDetect.html#67919ec1f138bd5dcbc3ad32990a16d0">LUT</a>[233].<a class="code" href="structLUTentry.html#86dd3feb468680e96a44c5405501ea8f">direction</a> = 1;
<a name="l01112"></a>01112   <span class="comment">//----------------------</span>
<a name="l01113"></a>01113   <span class="comment">//Pattern (e)</span>
<a name="l01114"></a>01114   
<a name="l01115"></a>01115   <span class="comment">// ##.</span>
<a name="l01116"></a>01116   <span class="comment">// ##.</span>
<a name="l01117"></a>01117   <span class="comment">// ...</span>
<a name="l01118"></a>01118   <a class="code" href="classEdgeDetect.html#67919ec1f138bd5dcbc3ad32990a16d0">LUT</a>[11].<a class="code" href="structLUTentry.html#79e744afdd51960ebb78ef4b355555b6">ESF</a> = 0.10f;
<a name="l01119"></a>01119   <a class="code" href="classEdgeDetect.html#67919ec1f138bd5dcbc3ad32990a16d0">LUT</a>[11].<a class="code" href="structLUTentry.html#86dd3feb468680e96a44c5405501ea8f">direction</a> = 3;
<a name="l01120"></a>01120   
<a name="l01121"></a>01121   <span class="comment">// ...</span>
<a name="l01122"></a>01122   <span class="comment">// .##</span>
<a name="l01123"></a>01123   <span class="comment">// .##</span>
<a name="l01124"></a>01124   <a class="code" href="classEdgeDetect.html#67919ec1f138bd5dcbc3ad32990a16d0">LUT</a>[208].<a class="code" href="structLUTentry.html#79e744afdd51960ebb78ef4b355555b6">ESF</a> = 0.10f;
<a name="l01125"></a>01125   <a class="code" href="classEdgeDetect.html#67919ec1f138bd5dcbc3ad32990a16d0">LUT</a>[208].<a class="code" href="structLUTentry.html#86dd3feb468680e96a44c5405501ea8f">direction</a> = 3;
<a name="l01126"></a>01126 
<a name="l01127"></a>01127   <span class="comment">// .##</span>
<a name="l01128"></a>01128   <span class="comment">// .##</span>
<a name="l01129"></a>01129   <span class="comment">// ...</span>
<a name="l01130"></a>01130   <a class="code" href="classEdgeDetect.html#67919ec1f138bd5dcbc3ad32990a16d0">LUT</a>[22].<a class="code" href="structLUTentry.html#79e744afdd51960ebb78ef4b355555b6">ESF</a> = 0.10f;
<a name="l01131"></a>01131   <a class="code" href="classEdgeDetect.html#67919ec1f138bd5dcbc3ad32990a16d0">LUT</a>[22].<a class="code" href="structLUTentry.html#86dd3feb468680e96a44c5405501ea8f">direction</a> = 1;
<a name="l01132"></a>01132   
<a name="l01133"></a>01133   <span class="comment">// ...</span>
<a name="l01134"></a>01134   <span class="comment">// ##.</span>
<a name="l01135"></a>01135   <span class="comment">// ##.</span>
<a name="l01136"></a>01136   <a class="code" href="classEdgeDetect.html#67919ec1f138bd5dcbc3ad32990a16d0">LUT</a>[104].<a class="code" href="structLUTentry.html#79e744afdd51960ebb78ef4b355555b6">ESF</a> = 0.10f;
<a name="l01137"></a>01137   <a class="code" href="classEdgeDetect.html#67919ec1f138bd5dcbc3ad32990a16d0">LUT</a>[104].<a class="code" href="structLUTentry.html#86dd3feb468680e96a44c5405501ea8f">direction</a> = 1; 
<a name="l01138"></a>01138   <span class="comment">//----------------------    </span>
<a name="l01139"></a>01139 }
</pre></div>
<p>

</div>
</div><p>
<a class="anchor" name="57edec262a4b948c6e6e70ef0801a302"></a><!-- doxytag: member="EdgeDetect::deallocateObjects" ref="57edec262a4b948c6e6e70ef0801a302" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void EdgeDetect::deallocateObjects           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

<p>Definition at line <a class="el" href="edgeDetect_8cpp_source.html#l00963">963</a> of file <a class="el" href="edgeDetect_8cpp_source.html">edgeDetect.cpp</a>.</p>

<p>References <a class="el" href="edgeDetect_8h_source.html#l00113">clusters</a>, <a class="el" href="edgeDetect_8h_source.html#l00106">edgeMagMap</a>, <a class="el" href="edgeDetect_8h_source.html#l00109">GSLCmap</a>, and <a class="el" href="edgeDetect_8h_source.html#l00103">lumMap</a>.</p>

<p>Referenced by <a class="el" href="edgeDetect_8cpp_source.html#l00219">~EdgeDetect()</a>.</p>
<div class="fragment"><pre class="fragment"><a name="l00964"></a>00964 {
<a name="l00965"></a>00965   <span class="keyword">delete</span>[] <a class="code" href="classEdgeDetect.html#2640fdd41a06c72f469e7790c38ea88d">lumMap</a>;      <a class="code" href="classEdgeDetect.html#2640fdd41a06c72f469e7790c38ea88d">lumMap</a> = NULL;
<a name="l00966"></a>00966   <span class="keyword">delete</span>[] <a class="code" href="classEdgeDetect.html#f900ff52156cd0fb2159f35a75c10d7f">edgeMagMap</a>;  <a class="code" href="classEdgeDetect.html#f900ff52156cd0fb2159f35a75c10d7f">edgeMagMap</a> = NULL;
<a name="l00967"></a>00967   <span class="keyword">delete</span>[] <a class="code" href="classEdgeDetect.html#fd33a5703bc7be4f14400b26d8004668">GSLCmap</a>;     <a class="code" href="classEdgeDetect.html#fd33a5703bc7be4f14400b26d8004668">GSLCmap</a> = NULL;
<a name="l00968"></a>00968   <span class="keyword">delete</span>[] <a class="code" href="classEdgeDetect.html#2b59cd7d4e724d761de259463c8b7425">clusters</a>;    <a class="code" href="classEdgeDetect.html#2b59cd7d4e724d761de259463c8b7425">clusters</a> = NULL;
<a name="l00969"></a>00969 }
</pre></div>
<p>

</div>
</div><p>
<a class="anchor" name="05b728eb0943f909e134842b02052565"></a><!-- doxytag: member="EdgeDetect::fillLumMapAndLumHistogram" ref="05b728eb0943f909e134842b02052565" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void EdgeDetect::fillLumMapAndLumHistogram           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

<p>Definition at line <a class="el" href="edgeDetect_8cpp_source.html#l00291">291</a> of file <a class="el" href="edgeDetect_8cpp_source.html">edgeDetect.cpp</a>.</p>

<p>References <a class="el" href="edgeDetect_8h_source.html#l00093">image</a>, <a class="el" href="edgeDetect_8h_source.html#l00096">lumHist</a>, and <a class="el" href="edgeDetect_8h_source.html#l00103">lumMap</a>.</p>

<p>Referenced by <a class="el" href="edgeDetect_8cpp_source.html#l00192">EdgeDetect()</a>.</p>
<div class="fragment"><pre class="fragment"><a name="l00292"></a>00292 {
<a name="l00293"></a>00293   <span class="keywordtype">int</span> x, y;
<a name="l00294"></a>00294   QRgb* rgb;
<a name="l00295"></a>00295   uchar* scanLine;
<a name="l00296"></a>00296   <span class="keywordtype">int</span> lumVal;
<a name="l00297"></a>00297   <span class="keywordflow">for</span>( y=0; y&lt;<a class="code" href="classEdgeDetect.html#511da5a85c2e50215d7e543ae6abb7a5">image</a>-&gt;height(); y++)
<a name="l00298"></a>00298   {   
<a name="l00299"></a>00299     scanLine = <a class="code" href="classEdgeDetect.html#511da5a85c2e50215d7e543ae6abb7a5">image</a>-&gt;scanLine(y);
<a name="l00300"></a>00300     <span class="keywordflow">for</span>( x=0; x&lt;<a class="code" href="classEdgeDetect.html#511da5a85c2e50215d7e543ae6abb7a5">image</a>-&gt;width(); x++)
<a name="l00301"></a>00301     {
<a name="l00302"></a>00302       <span class="comment">//get lum value for this pixel</span>
<a name="l00303"></a>00303       rgb = ((QRgb*)scanLine+x);
<a name="l00304"></a>00304       lumVal = qGray(*rgb);
<a name="l00305"></a>00305       
<a name="l00306"></a>00306       <span class="comment">//store in lum map</span>
<a name="l00307"></a>00307       <a class="code" href="classEdgeDetect.html#2640fdd41a06c72f469e7790c38ea88d">lumMap</a>[x + y*<a class="code" href="classEdgeDetect.html#511da5a85c2e50215d7e543ae6abb7a5">image</a>-&gt;width()] = lumVal;
<a name="l00308"></a>00308       
<a name="l00309"></a>00309       <span class="comment">//update lum histogram</span>
<a name="l00310"></a>00310       <a class="code" href="classEdgeDetect.html#efd542b963f17beeb6ef75261b78ac8a" title="luminosity and smooth luminosity histograms">lumHist</a>[ lumVal ]++;
<a name="l00311"></a>00311     }
<a name="l00312"></a>00312   }
<a name="l00313"></a>00313 }
</pre></div>
<p>

</div>
</div><p>
<a class="anchor" name="477c9053957296eb31a3283d78383b5b"></a><!-- doxytag: member="EdgeDetect::findPixelClusters" ref="477c9053957296eb31a3283d78383b5b" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void EdgeDetect::findPixelClusters           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

<p>Definition at line <a class="el" href="edgeDetect_8cpp_source.html#l00429">429</a> of file <a class="el" href="edgeDetect_8cpp_source.html">edgeDetect.cpp</a>.</p>

<p>References <a class="el" href="edgeDetect_8h_source.html#l00100">clusterPeaks</a>, <a class="el" href="edgeDetect_8h_source.html#l00113">clusters</a>, <a class="el" href="edgeDetect_8h_source.html#l00029">PixelCluster::maxLuminance</a>, <a class="el" href="edgeDetect_8h_source.html#l00028">PixelCluster::minLuminance</a>, <a class="el" href="edgeDetect_8h_source.html#l00112">numClusters</a>, and <a class="el" href="edgeDetect_8h_source.html#l00097">smoothLumHist</a>.</p>

<p>Referenced by <a class="el" href="edgeDetect_8cpp_source.html#l00192">EdgeDetect()</a>.</p>
<div class="fragment"><pre class="fragment"><a name="l00430"></a>00430 {
<a name="l00431"></a>00431   <span class="comment">//find max count</span>
<a name="l00432"></a>00432   <span class="keywordtype">int</span> maxCount = 0;
<a name="l00433"></a>00433   <span class="keywordtype">int</span> i;
<a name="l00434"></a>00434   <span class="keywordflow">for</span>(i=0; i&lt;256; i++)
<a name="l00435"></a>00435   {
<a name="l00436"></a>00436     <span class="keywordflow">if</span>(<a class="code" href="classEdgeDetect.html#3d33df65d9ab4b34082d64151a1294be">smoothLumHist</a>[i] &gt; maxCount)
<a name="l00437"></a>00437       maxCount = <a class="code" href="classEdgeDetect.html#3d33df65d9ab4b34082d64151a1294be">smoothLumHist</a>[i];
<a name="l00438"></a>00438   }
<a name="l00439"></a>00439 
<a name="l00440"></a>00440   <span class="comment">//compute JND for histogram (2% of total spread)</span>
<a name="l00441"></a>00441   <span class="keywordtype">int</span> histJND = maxCount/50;
<a name="l00442"></a>00442 
<a name="l00443"></a>00443   <span class="comment">//construct temporary array for valley locations</span>
<a name="l00444"></a>00444   <span class="comment">//1's will indicate a valley midpoint</span>
<a name="l00445"></a>00445   <span class="keywordtype">int</span> tmpValleyArray[256];
<a name="l00446"></a>00446   <span class="keywordflow">for</span>(i=0; i&lt;256; i++) { tmpValleyArray[i] = 0; }
<a name="l00447"></a>00447   
<a name="l00448"></a>00448   <span class="comment">//move across histogram finding valley midpoints</span>
<a name="l00449"></a>00449   <span class="keywordtype">int</span> curTrackedMin = <a class="code" href="classEdgeDetect.html#3d33df65d9ab4b34082d64151a1294be">smoothLumHist</a>[0];
<a name="l00450"></a>00450   
<a name="l00451"></a>00451   <span class="comment">//first and last indices tracked min was observed</span>
<a name="l00452"></a>00452   <span class="keywordtype">int</span> firstMinIndex = 0;
<a name="l00453"></a>00453   <span class="keywordtype">int</span> lastMinIndex = 0;
<a name="l00454"></a>00454   
<a name="l00455"></a>00455   <span class="comment">//only add valley midpoint if finished tracking a descent</span>
<a name="l00456"></a>00456   <span class="keywordtype">bool</span> slopeNeg = <span class="keyword">false</span>;
<a name="l00457"></a>00457   
<a name="l00458"></a>00458   <span class="keywordflow">for</span>(i = 1; i&lt;256; i++ )
<a name="l00459"></a>00459   {
<a name="l00460"></a>00460     <span class="keywordflow">if</span>( <a class="code" href="classEdgeDetect.html#3d33df65d9ab4b34082d64151a1294be">smoothLumHist</a>[i] &lt; curTrackedMin - histJND )
<a name="l00461"></a>00461     {
<a name="l00462"></a>00462       <span class="comment">//found a descent!</span>
<a name="l00463"></a>00463       slopeNeg = <span class="keyword">true</span>;
<a name="l00464"></a>00464       curTrackedMin = <a class="code" href="classEdgeDetect.html#3d33df65d9ab4b34082d64151a1294be">smoothLumHist</a>[i];
<a name="l00465"></a>00465       firstMinIndex = i;
<a name="l00466"></a>00466     }
<a name="l00467"></a>00467     <span class="comment">//starting to go up again, add last min to list</span>
<a name="l00468"></a>00468     <span class="keywordflow">else</span> <span class="keywordflow">if</span>( <a class="code" href="classEdgeDetect.html#3d33df65d9ab4b34082d64151a1294be">smoothLumHist</a>[i] &gt; curTrackedMin + histJND )
<a name="l00469"></a>00469     {
<a name="l00470"></a>00470       <span class="comment">//if finished tracing a negative slope find midpoint and set location to true</span>
<a name="l00471"></a>00471       <span class="keywordflow">if</span>(slopeNeg)
<a name="l00472"></a>00472       {
<a name="l00473"></a>00473         tmpValleyArray[ (firstMinIndex + lastMinIndex)/2 ] = 1;
<a name="l00474"></a>00474       }
<a name="l00475"></a>00475       
<a name="l00476"></a>00476       curTrackedMin = <a class="code" href="classEdgeDetect.html#3d33df65d9ab4b34082d64151a1294be">smoothLumHist</a>[i];
<a name="l00477"></a>00477       slopeNeg = <span class="keyword">false</span>;
<a name="l00478"></a>00478     }
<a name="l00479"></a>00479     <span class="keywordflow">else</span>
<a name="l00480"></a>00480     {
<a name="l00481"></a>00481       <span class="comment">//still tracking a min, update the right </span>
<a name="l00482"></a>00482       <span class="comment">//hand index. center of valley is found</span>
<a name="l00483"></a>00483       <span class="comment">//by averaging first and last min index</span>
<a name="l00484"></a>00484       lastMinIndex = i;
<a name="l00485"></a>00485     }
<a name="l00486"></a>00486   }
<a name="l00487"></a>00487   
<a name="l00488"></a>00488   <span class="comment">//count valleys</span>
<a name="l00489"></a>00489   <span class="keywordtype">int</span> numValleys = 0;
<a name="l00490"></a>00490   <span class="keywordflow">for</span>(i=0; i&lt;256; i++)
<a name="l00491"></a>00491   {
<a name="l00492"></a>00492     <span class="keywordflow">if</span>(tmpValleyArray[i] == 1 ) numValleys++;
<a name="l00493"></a>00493   }
<a name="l00494"></a>00494 
<a name="l00495"></a>00495   <span class="comment">//determine number of clusters</span>
<a name="l00496"></a>00496   <a class="code" href="classEdgeDetect.html#d9917825c8d8a4d6cf0397b3f44b443d">numClusters</a> = numValleys-1;
<a name="l00497"></a>00497   <span class="keywordflow">if</span>(tmpValleyArray[0] != 1)
<a name="l00498"></a>00498     <a class="code" href="classEdgeDetect.html#d9917825c8d8a4d6cf0397b3f44b443d">numClusters</a>++;
<a name="l00499"></a>00499   <span class="keywordflow">if</span>(tmpValleyArray[255] != 1)
<a name="l00500"></a>00500     <a class="code" href="classEdgeDetect.html#d9917825c8d8a4d6cf0397b3f44b443d">numClusters</a>++;
<a name="l00501"></a>00501   
<a name="l00502"></a>00502   <span class="comment">//allocate clusters</span>
<a name="l00503"></a>00503   <a class="code" href="classEdgeDetect.html#2b59cd7d4e724d761de259463c8b7425">clusters</a> = <span class="keyword">new</span> <a class="code" href="structPixelCluster.html">PixelCluster</a>[<a class="code" href="classEdgeDetect.html#d9917825c8d8a4d6cf0397b3f44b443d">numClusters</a>];
<a name="l00504"></a>00504   
<a name="l00505"></a>00505   <span class="comment">//automatically start first cluster</span>
<a name="l00506"></a>00506   <span class="keywordtype">int</span> cluster=0;
<a name="l00507"></a>00507   <a class="code" href="classEdgeDetect.html#2b59cd7d4e724d761de259463c8b7425">clusters</a>[cluster].<a class="code" href="structPixelCluster.html#f04a85edff17ca2875092a8c91895bc8">minLuminance</a> = 0;
<a name="l00508"></a>00508   
<a name="l00509"></a>00509   <span class="comment">//initialize left and right boundaries of all clusters</span>
<a name="l00510"></a>00510   <span class="keywordflow">for</span>(i=1; i&lt;256; i++)
<a name="l00511"></a>00511   {
<a name="l00512"></a>00512     <span class="comment">//reached next valley, end cluster</span>
<a name="l00513"></a>00513     <span class="keywordflow">if</span>( tmpValleyArray[i] == 1)
<a name="l00514"></a>00514     {
<a name="l00515"></a>00515       <a class="code" href="classEdgeDetect.html#2b59cd7d4e724d761de259463c8b7425">clusters</a>[cluster].<a class="code" href="structPixelCluster.html#990df866c018513ff1c6cda90ed44315">maxLuminance</a> = i-1;
<a name="l00516"></a>00516       cluster++;
<a name="l00517"></a>00517       <a class="code" href="classEdgeDetect.html#2b59cd7d4e724d761de259463c8b7425">clusters</a>[cluster].<a class="code" href="structPixelCluster.html#f04a85edff17ca2875092a8c91895bc8">minLuminance</a> = i;
<a name="l00518"></a>00518     }
<a name="l00519"></a>00519     <span class="comment">//end last cluster automatically at end</span>
<a name="l00520"></a>00520     <span class="keywordflow">else</span> <span class="keywordflow">if</span>(i == 255)
<a name="l00521"></a>00521     {
<a name="l00522"></a>00522       <a class="code" href="classEdgeDetect.html#2b59cd7d4e724d761de259463c8b7425">clusters</a>[cluster].<a class="code" href="structPixelCluster.html#990df866c018513ff1c6cda90ed44315">maxLuminance</a> = i;
<a name="l00523"></a>00523     }
<a name="l00524"></a>00524   }
<a name="l00525"></a>00525   
<a name="l00526"></a>00526   <span class="comment">//determine cluster peaks</span>
<a name="l00527"></a>00527   <span class="keywordflow">for</span>(cluster=0; cluster&lt;<a class="code" href="classEdgeDetect.html#d9917825c8d8a4d6cf0397b3f44b443d">numClusters</a>; cluster++)
<a name="l00528"></a>00528   {
<a name="l00529"></a>00529     <span class="comment">//find max for current cluster</span>
<a name="l00530"></a>00530     <span class="keywordtype">int</span> maxIndex = <a class="code" href="classEdgeDetect.html#2b59cd7d4e724d761de259463c8b7425">clusters</a>[cluster].<a class="code" href="structPixelCluster.html#f04a85edff17ca2875092a8c91895bc8">minLuminance</a>;
<a name="l00531"></a>00531     <span class="keywordflow">for</span>(i=<a class="code" href="classEdgeDetect.html#2b59cd7d4e724d761de259463c8b7425">clusters</a>[cluster].minLuminance; i&lt;=<a class="code" href="classEdgeDetect.html#2b59cd7d4e724d761de259463c8b7425">clusters</a>[cluster].<a class="code" href="structPixelCluster.html#990df866c018513ff1c6cda90ed44315">maxLuminance</a>; i++)
<a name="l00532"></a>00532     {
<a name="l00533"></a>00533       <span class="keywordflow">if</span>(<a class="code" href="classEdgeDetect.html#3d33df65d9ab4b34082d64151a1294be">smoothLumHist</a>[i] &gt; <a class="code" href="classEdgeDetect.html#3d33df65d9ab4b34082d64151a1294be">smoothLumHist</a>[maxIndex])
<a name="l00534"></a>00534          maxIndex = i;
<a name="l00535"></a>00535     }
<a name="l00536"></a>00536     
<a name="l00537"></a>00537     <span class="comment">//mark peaks  </span>
<a name="l00538"></a>00538     <span class="keywordtype">int</span> lumJND = 255/50;
<a name="l00539"></a>00539     <span class="keywordflow">for</span>(i=QMAX(0, maxIndex-lumJND); i&lt;QMIN(256, maxIndex+lumJND); i++)
<a name="l00540"></a>00540     { 
<a name="l00541"></a>00541       <a class="code" href="classEdgeDetect.html#5aa24028e91a394d3cd5bd807e9cd84c">clusterPeaks</a>[i] = 1; 
<a name="l00542"></a>00542     }
<a name="l00543"></a>00543   }
<a name="l00544"></a>00544 }
</pre></div>
<p>

</div>
</div><p>
<a class="anchor" name="ee7ef6f45c78c478c830c3044de4d542"></a><!-- doxytag: member="EdgeDetect::getClusterMap" ref="ee7ef6f45c78c478c830c3044de4d542" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int * EdgeDetect::getClusterMap           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

<p>Definition at line <a class="el" href="edgeDetect_8cpp_source.html#l00241">241</a> of file <a class="el" href="edgeDetect_8cpp_source.html">edgeDetect.cpp</a>.</p>

<p>References <a class="el" href="edgeDetect_8h_source.html#l00113">clusters</a>, <a class="el" href="edgeDetect_8h_source.html#l00093">image</a>, <a class="el" href="edgeDetect_8h_source.html#l00103">lumMap</a>, and <a class="el" href="edgeDetect_8h_source.html#l00112">numClusters</a>.</p>

<p>Referenced by <a class="el" href="grainEditor_8cpp_source.html#l00036">GrainEditor::GrainEditor()</a>.</p>
<div class="fragment"><pre class="fragment"><a name="l00242"></a>00242 {
<a name="l00243"></a>00243   <span class="comment">//construct map</span>
<a name="l00244"></a>00244   <span class="keywordtype">int</span>* clusterMap = <span class="keyword">new</span> <span class="keywordtype">int</span>[<a class="code" href="classEdgeDetect.html#511da5a85c2e50215d7e543ae6abb7a5">image</a>-&gt;width() * <a class="code" href="classEdgeDetect.html#511da5a85c2e50215d7e543ae6abb7a5">image</a>-&gt;height()];
<a name="l00245"></a>00245   
<a name="l00246"></a>00246   <span class="comment">//iterate over all pixels, determine cluster each pixel belongs to</span>
<a name="l00247"></a>00247   <span class="keywordtype">int</span> i, cluster;
<a name="l00248"></a>00248   <span class="keywordflow">for</span>(i=0; i&lt;<a class="code" href="classEdgeDetect.html#511da5a85c2e50215d7e543ae6abb7a5">image</a>-&gt;width()*<a class="code" href="classEdgeDetect.html#511da5a85c2e50215d7e543ae6abb7a5">image</a>-&gt;height(); i++)
<a name="l00249"></a>00249   {
<a name="l00250"></a>00250     <span class="keywordflow">for</span>(cluster=0; cluster&lt;<a class="code" href="classEdgeDetect.html#d9917825c8d8a4d6cf0397b3f44b443d">numClusters</a>; cluster++)
<a name="l00251"></a>00251     {
<a name="l00252"></a>00252       <span class="keywordflow">if</span>( <a class="code" href="classEdgeDetect.html#2640fdd41a06c72f469e7790c38ea88d">lumMap</a>[i] &gt;= <a class="code" href="classEdgeDetect.html#2b59cd7d4e724d761de259463c8b7425">clusters</a>[cluster].minLuminance &amp;&amp;
<a name="l00253"></a>00253           <a class="code" href="classEdgeDetect.html#2640fdd41a06c72f469e7790c38ea88d">lumMap</a>[i] &lt;= <a class="code" href="classEdgeDetect.html#2b59cd7d4e724d761de259463c8b7425">clusters</a>[cluster].maxLuminance )
<a name="l00254"></a>00254       {
<a name="l00255"></a>00255         clusterMap[i] = cluster;
<a name="l00256"></a>00256         <span class="keywordflow">break</span>;
<a name="l00257"></a>00257       }
<a name="l00258"></a>00258     } <span class="comment">//cluster</span>
<a name="l00259"></a>00259   } <span class="comment">//pixel</span>
<a name="l00260"></a>00260 
<a name="l00261"></a>00261   <span class="keywordflow">return</span> clusterMap;
<a name="l00262"></a>00262 }
</pre></div>
<p>

</div>
</div><p>
<a class="anchor" name="99b5e0b5becf716cfeb0ad163ad4a92f"></a><!-- doxytag: member="EdgeDetect::getClusters" ref="99b5e0b5becf716cfeb0ad163ad4a92f" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structPixelCluster.html">PixelCluster</a> * EdgeDetect::getClusters           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

<p>Definition at line <a class="el" href="edgeDetect_8cpp_source.html#l00227">227</a> of file <a class="el" href="edgeDetect_8cpp_source.html">edgeDetect.cpp</a>.</p>

<p>References <a class="el" href="edgeDetect_8h_source.html#l00113">clusters</a>.</p>
<div class="fragment"><pre class="fragment"><a name="l00228"></a>00228 { <span class="keywordflow">return</span> <a class="code" href="classEdgeDetect.html#2b59cd7d4e724d761de259463c8b7425">clusters</a>; }
</pre></div>
<p>

</div>
</div><p>
<a class="anchor" name="aa42152fcc1734d099cede699d21475b"></a><!-- doxytag: member="EdgeDetect::getEdgeImage" ref="aa42152fcc1734d099cede699d21475b" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">QImage * EdgeDetect::getEdgeImage           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

<p>Definition at line <a class="el" href="edgeDetect_8cpp_source.html#l00236">236</a> of file <a class="el" href="edgeDetect_8cpp_source.html">edgeDetect.cpp</a>.</p>

<p>References <a class="el" href="edgeDetect_8h_source.html#l00093">image</a>.</p>
<div class="fragment"><pre class="fragment"><a name="l00237"></a>00237 {
<a name="l00238"></a>00238   <span class="keywordflow">return</span> <a class="code" href="classEdgeDetect.html#511da5a85c2e50215d7e543ae6abb7a5">image</a>; 
<a name="l00239"></a>00239 }
</pre></div>
<p>

</div>
</div><p>
<a class="anchor" name="4a04903c7747f5668e7283f0e5085693"></a><!-- doxytag: member="EdgeDetect::getNumClusters" ref="4a04903c7747f5668e7283f0e5085693" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int EdgeDetect::getNumClusters           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

<p>Definition at line <a class="el" href="edgeDetect_8cpp_source.html#l00224">224</a> of file <a class="el" href="edgeDetect_8cpp_source.html">edgeDetect.cpp</a>.</p>

<p>References <a class="el" href="edgeDetect_8h_source.html#l00112">numClusters</a>.</p>

<p>Referenced by <a class="el" href="grainEditor_8cpp_source.html#l00036">GrainEditor::GrainEditor()</a>.</p>
<div class="fragment"><pre class="fragment"><a name="l00225"></a>00225 { <span class="keywordflow">return</span> <a class="code" href="classEdgeDetect.html#d9917825c8d8a4d6cf0397b3f44b443d">numClusters</a>; }
</pre></div>
<p>

</div>
</div><p>
<a class="anchor" name="303a18732250eee8f134c7be7a0e0e55"></a><!-- doxytag: member="EdgeDetect::getPeaks" ref="303a18732250eee8f134c7be7a0e0e55" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int * EdgeDetect::getPeaks           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

<p>Definition at line <a class="el" href="edgeDetect_8cpp_source.html#l00230">230</a> of file <a class="el" href="edgeDetect_8cpp_source.html">edgeDetect.cpp</a>.</p>

<p>References <a class="el" href="edgeDetect_8h_source.html#l00100">clusterPeaks</a>.</p>
<div class="fragment"><pre class="fragment"><a name="l00231"></a>00231 { <span class="keywordflow">return</span> <a class="code" href="classEdgeDetect.html#5aa24028e91a394d3cd5bd807e9cd84c">clusterPeaks</a>; }
</pre></div>
<p>

</div>
</div><p>
<a class="anchor" name="5f01a87186aeea8df552b7d5286e5cb0"></a><!-- doxytag: member="EdgeDetect::getSmoothHist" ref="5f01a87186aeea8df552b7d5286e5cb0" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int * EdgeDetect::getSmoothHist           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

<p>Definition at line <a class="el" href="edgeDetect_8cpp_source.html#l00233">233</a> of file <a class="el" href="edgeDetect_8cpp_source.html">edgeDetect.cpp</a>.</p>

<p>References <a class="el" href="edgeDetect_8h_source.html#l00097">smoothLumHist</a>.</p>
<div class="fragment"><pre class="fragment"><a name="l00234"></a>00234 { <span class="keywordflow">return</span> <a class="code" href="classEdgeDetect.html#3d33df65d9ab4b34082d64151a1294be">smoothLumHist</a>; }
</pre></div>
<p>

</div>
</div><p>
<a class="anchor" name="ffff454457969355d2f90572f96703b4"></a><!-- doxytag: member="EdgeDetect::pixelLum" ref="ffff454457969355d2f90572f96703b4" args="(int x, int y)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int EdgeDetect::pixelLum           </td>
          <td>(</td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>y</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

<p>Definition at line <a class="el" href="edgeDetect_8cpp_source.html#l00422">422</a> of file <a class="el" href="edgeDetect_8cpp_source.html">edgeDetect.cpp</a>.</p>

<p>References <a class="el" href="edgeDetect_8h_source.html#l00093">image</a>, and <a class="el" href="edgeDetect_8h_source.html#l00103">lumMap</a>.</p>

<p>Referenced by <a class="el" href="edgeDetect_8cpp_source.html#l00341">computeEdgeMagAndGSLCmaps()</a>.</p>
<div class="fragment"><pre class="fragment"><a name="l00423"></a>00423 {
<a name="l00424"></a>00424   <span class="keywordtype">int</span> clampedX = QMAX( QMIN( x, <a class="code" href="classEdgeDetect.html#511da5a85c2e50215d7e543ae6abb7a5">image</a>-&gt;width()-1), 0);
<a name="l00425"></a>00425   <span class="keywordtype">int</span> clampedY = QMAX( QMIN( y, <a class="code" href="classEdgeDetect.html#511da5a85c2e50215d7e543ae6abb7a5">image</a>-&gt;height()-1), 0);
<a name="l00426"></a>00426   <span class="keywordflow">return</span> <a class="code" href="classEdgeDetect.html#2640fdd41a06c72f469e7790c38ea88d">lumMap</a>[ clampedX + clampedY * <a class="code" href="classEdgeDetect.html#511da5a85c2e50215d7e543ae6abb7a5">image</a>-&gt;width() ];
<a name="l00427"></a>00427 }
</pre></div>
<p>

</div>
</div><p>
<a class="anchor" name="ec8bdac9c2114f092f05814ad7b4f74a"></a><!-- doxytag: member="EdgeDetect::smoothLumHistogram" ref="ec8bdac9c2114f092f05814ad7b4f74a" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void EdgeDetect::smoothLumHistogram           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

<p>Definition at line <a class="el" href="edgeDetect_8cpp_source.html#l00315">315</a> of file <a class="el" href="edgeDetect_8cpp_source.html">edgeDetect.cpp</a>.</p>

<p>References <a class="el" href="edgeDetect_8cpp.html#3c302b6c124bfdb5a873e54a346b997a">FILTER_SIZE</a>, <a class="el" href="edgeDetect_8h_source.html#l00096">lumHist</a>, and <a class="el" href="edgeDetect_8h_source.html#l00097">smoothLumHist</a>.</p>

<p>Referenced by <a class="el" href="edgeDetect_8cpp_source.html#l00192">EdgeDetect()</a>.</p>
<div class="fragment"><pre class="fragment"><a name="l00316"></a>00316 {
<a name="l00317"></a>00317 <span class="preprocessor">  #define FILTER_SIZE 5</span>
<a name="l00318"></a>00318 <span class="preprocessor"></span>  <span class="keywordtype">int</span> filter[<a class="code" href="edgeDetect_8cpp.html#3c302b6c124bfdb5a873e54a346b997a">FILTER_SIZE</a>] = {2, 5, 8, 5, 2};
<a name="l00319"></a>00319   
<a name="l00320"></a>00320   <span class="keywordtype">int</span> i,j;
<a name="l00321"></a>00321   <span class="keywordtype">int</span> filterIndex, sum, total;
<a name="l00322"></a>00322   <span class="keywordflow">for</span>(i = 0; i&lt;256; i++)
<a name="l00323"></a>00323   {
<a name="l00324"></a>00324     sum = 0;
<a name="l00325"></a>00325     total = 0;
<a name="l00326"></a>00326     
<a name="l00327"></a>00327     <span class="keywordflow">for</span>( j= -FILTER_SIZE/2; j &lt;= <a class="code" href="edgeDetect_8cpp.html#3c302b6c124bfdb5a873e54a346b997a">FILTER_SIZE</a>/2; j++)
<a name="l00328"></a>00328     {
<a name="l00329"></a>00329       <span class="keywordflow">if</span>( i+j &gt; 0 &amp;&amp; i+j &lt; 256 )
<a name="l00330"></a>00330       {
<a name="l00331"></a>00331         filterIndex = j+ <a class="code" href="edgeDetect_8cpp.html#3c302b6c124bfdb5a873e54a346b997a">FILTER_SIZE</a>/2;
<a name="l00332"></a>00332         total+= filter[filterIndex] * <a class="code" href="classEdgeDetect.html#efd542b963f17beeb6ef75261b78ac8a" title="luminosity and smooth luminosity histograms">lumHist</a>[i+j];
<a name="l00333"></a>00333         sum  += filter[filterIndex];
<a name="l00334"></a>00334       }
<a name="l00335"></a>00335     }
<a name="l00336"></a>00336     
<a name="l00337"></a>00337     <a class="code" href="classEdgeDetect.html#3d33df65d9ab4b34082d64151a1294be">smoothLumHist</a>[i] = total / sum;
<a name="l00338"></a>00338   }
<a name="l00339"></a>00339 }
</pre></div>
<p>

</div>
</div><p>
<hr><h2>Member Data Documentation</h2>
<a class="anchor" name="5aa24028e91a394d3cd5bd807e9cd84c"></a><!-- doxytag: member="EdgeDetect::clusterPeaks" ref="5aa24028e91a394d3cd5bd807e9cd84c" args="[256]" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="classEdgeDetect.html#5aa24028e91a394d3cd5bd807e9cd84c">EdgeDetect::clusterPeaks</a>[256]<code> [private]</code>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

<p>Definition at line <a class="el" href="edgeDetect_8h_source.html#l00100">100</a> of file <a class="el" href="edgeDetect_8h_source.html">edgeDetect.h</a>.</p>

<p>Referenced by <a class="el" href="edgeDetect_8cpp_source.html#l00264">allocateAndInitObjects()</a>, <a class="el" href="edgeDetect_8cpp_source.html#l00546">computeClusterStatistics()</a>, <a class="el" href="edgeDetect_8cpp_source.html#l00429">findPixelClusters()</a>, and <a class="el" href="edgeDetect_8cpp_source.html#l00230">getPeaks()</a>.</p>

</div>
</div><p>
<a class="anchor" name="2b59cd7d4e724d761de259463c8b7425"></a><!-- doxytag: member="EdgeDetect::clusters" ref="2b59cd7d4e724d761de259463c8b7425" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structPixelCluster.html">PixelCluster</a>* <a class="el" href="classEdgeDetect.html#2b59cd7d4e724d761de259463c8b7425">EdgeDetect::clusters</a><code> [private]</code>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

<p>Definition at line <a class="el" href="edgeDetect_8h_source.html#l00113">113</a> of file <a class="el" href="edgeDetect_8h_source.html">edgeDetect.h</a>.</p>

<p>Referenced by <a class="el" href="edgeDetect_8cpp_source.html#l00546">computeClusterStatistics()</a>, <a class="el" href="edgeDetect_8cpp_source.html#l00618">computeClusterThresholds()</a>, <a class="el" href="edgeDetect_8cpp_source.html#l00859">constructEdgeImage()</a>, <a class="el" href="edgeDetect_8cpp_source.html#l00963">deallocateObjects()</a>, <a class="el" href="edgeDetect_8cpp_source.html#l00429">findPixelClusters()</a>, <a class="el" href="edgeDetect_8cpp_source.html#l00241">getClusterMap()</a>, and <a class="el" href="edgeDetect_8cpp_source.html#l00227">getClusters()</a>.</p>

</div>
</div><p>
<a class="anchor" name="f900ff52156cd0fb2159f35a75c10d7f"></a><!-- doxytag: member="EdgeDetect::edgeMagMap" ref="f900ff52156cd0fb2159f35a75c10d7f" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">float* <a class="el" href="classEdgeDetect.html#f900ff52156cd0fb2159f35a75c10d7f">EdgeDetect::edgeMagMap</a><code> [private]</code>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

<p>Definition at line <a class="el" href="edgeDetect_8h_source.html#l00106">106</a> of file <a class="el" href="edgeDetect_8h_source.html">edgeDetect.h</a>.</p>

<p>Referenced by <a class="el" href="edgeDetect_8cpp_source.html#l00264">allocateAndInitObjects()</a>, <a class="el" href="edgeDetect_8cpp_source.html#l00546">computeClusterStatistics()</a>, <a class="el" href="edgeDetect_8cpp_source.html#l00341">computeEdgeMagAndGSLCmaps()</a>, <a class="el" href="edgeDetect_8cpp_source.html#l00859">constructEdgeImage()</a>, and <a class="el" href="edgeDetect_8cpp_source.html#l00963">deallocateObjects()</a>.</p>

</div>
</div><p>
<a class="anchor" name="fd33a5703bc7be4f14400b26d8004668"></a><!-- doxytag: member="EdgeDetect::GSLCmap" ref="fd33a5703bc7be4f14400b26d8004668" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int* <a class="el" href="classEdgeDetect.html#fd33a5703bc7be4f14400b26d8004668">EdgeDetect::GSLCmap</a><code> [private]</code>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

<p>Definition at line <a class="el" href="edgeDetect_8h_source.html#l00109">109</a> of file <a class="el" href="edgeDetect_8h_source.html">edgeDetect.h</a>.</p>

<p>Referenced by <a class="el" href="edgeDetect_8cpp_source.html#l00264">allocateAndInitObjects()</a>, <a class="el" href="edgeDetect_8cpp_source.html#l00341">computeEdgeMagAndGSLCmaps()</a>, <a class="el" href="edgeDetect_8cpp_source.html#l00859">constructEdgeImage()</a>, and <a class="el" href="edgeDetect_8cpp_source.html#l00963">deallocateObjects()</a>.</p>

</div>
</div><p>
<a class="anchor" name="511da5a85c2e50215d7e543ae6abb7a5"></a><!-- doxytag: member="EdgeDetect::image" ref="511da5a85c2e50215d7e543ae6abb7a5" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">QImage* <a class="el" href="classEdgeDetect.html#511da5a85c2e50215d7e543ae6abb7a5">EdgeDetect::image</a><code> [private]</code>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

<p>Definition at line <a class="el" href="edgeDetect_8h_source.html#l00093">93</a> of file <a class="el" href="edgeDetect_8h_source.html">edgeDetect.h</a>.</p>

<p>Referenced by <a class="el" href="edgeDetect_8cpp_source.html#l00264">allocateAndInitObjects()</a>, <a class="el" href="edgeDetect_8cpp_source.html#l00546">computeClusterStatistics()</a>, <a class="el" href="edgeDetect_8cpp_source.html#l00341">computeEdgeMagAndGSLCmaps()</a>, <a class="el" href="edgeDetect_8cpp_source.html#l00859">constructEdgeImage()</a>, <a class="el" href="edgeDetect_8cpp_source.html#l00291">fillLumMapAndLumHistogram()</a>, <a class="el" href="edgeDetect_8cpp_source.html#l00241">getClusterMap()</a>, <a class="el" href="edgeDetect_8cpp_source.html#l00236">getEdgeImage()</a>, and <a class="el" href="edgeDetect_8cpp_source.html#l00422">pixelLum()</a>.</p>

</div>
</div><p>
<a class="anchor" name="efd542b963f17beeb6ef75261b78ac8a"></a><!-- doxytag: member="EdgeDetect::lumHist" ref="efd542b963f17beeb6ef75261b78ac8a" args="[256]" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="classEdgeDetect.html#efd542b963f17beeb6ef75261b78ac8a">EdgeDetect::lumHist</a>[256]<code> [private]</code>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
luminosity and smooth luminosity histograms 
<p>

<p>Definition at line <a class="el" href="edgeDetect_8h_source.html#l00096">96</a> of file <a class="el" href="edgeDetect_8h_source.html">edgeDetect.h</a>.</p>

<p>Referenced by <a class="el" href="edgeDetect_8cpp_source.html#l00264">allocateAndInitObjects()</a>, <a class="el" href="edgeDetect_8cpp_source.html#l00291">fillLumMapAndLumHistogram()</a>, and <a class="el" href="edgeDetect_8cpp_source.html#l00315">smoothLumHistogram()</a>.</p>

</div>
</div><p>
<a class="anchor" name="2640fdd41a06c72f469e7790c38ea88d"></a><!-- doxytag: member="EdgeDetect::lumMap" ref="2640fdd41a06c72f469e7790c38ea88d" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int* <a class="el" href="classEdgeDetect.html#2640fdd41a06c72f469e7790c38ea88d">EdgeDetect::lumMap</a><code> [private]</code>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

<p>Definition at line <a class="el" href="edgeDetect_8h_source.html#l00103">103</a> of file <a class="el" href="edgeDetect_8h_source.html">edgeDetect.h</a>.</p>

<p>Referenced by <a class="el" href="edgeDetect_8cpp_source.html#l00264">allocateAndInitObjects()</a>, <a class="el" href="edgeDetect_8cpp_source.html#l00546">computeClusterStatistics()</a>, <a class="el" href="edgeDetect_8cpp_source.html#l00859">constructEdgeImage()</a>, <a class="el" href="edgeDetect_8cpp_source.html#l00963">deallocateObjects()</a>, <a class="el" href="edgeDetect_8cpp_source.html#l00291">fillLumMapAndLumHistogram()</a>, <a class="el" href="edgeDetect_8cpp_source.html#l00241">getClusterMap()</a>, and <a class="el" href="edgeDetect_8cpp_source.html#l00422">pixelLum()</a>.</p>

</div>
</div><p>
<a class="anchor" name="67919ec1f138bd5dcbc3ad32990a16d0"></a><!-- doxytag: member="EdgeDetect::LUT" ref="67919ec1f138bd5dcbc3ad32990a16d0" args="[256]" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structLUTentry.html">LUTentry</a> <a class="el" href="classEdgeDetect.html#67919ec1f138bd5dcbc3ad32990a16d0">EdgeDetect::LUT</a>[256]<code> [private]</code>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

<p>Definition at line <a class="el" href="edgeDetect_8h_source.html#l00090">90</a> of file <a class="el" href="edgeDetect_8h_source.html">edgeDetect.h</a>.</p>

<p>Referenced by <a class="el" href="edgeDetect_8cpp_source.html#l00859">constructEdgeImage()</a>, and <a class="el" href="edgeDetect_8cpp_source.html#l00971">constructGSLClut()</a>.</p>

</div>
</div><p>
<a class="anchor" name="c9a19ea58c96694c13a65fceddfe3153"></a><!-- doxytag: member="EdgeDetect::maxClusterSize" ref="c9a19ea58c96694c13a65fceddfe3153" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="classEdgeDetect.html#c9a19ea58c96694c13a65fceddfe3153">EdgeDetect::maxClusterSize</a><code> [private]</code>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

<p>Definition at line <a class="el" href="edgeDetect_8h_source.html#l00116">116</a> of file <a class="el" href="edgeDetect_8h_source.html">edgeDetect.h</a>.</p>

<p>Referenced by <a class="el" href="edgeDetect_8cpp_source.html#l00546">computeClusterStatistics()</a>.</p>

</div>
</div><p>
<a class="anchor" name="8af7e6ca7454475fbb278244c330e49c"></a><!-- doxytag: member="EdgeDetect::minClusterSize" ref="8af7e6ca7454475fbb278244c330e49c" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="classEdgeDetect.html#8af7e6ca7454475fbb278244c330e49c">EdgeDetect::minClusterSize</a><code> [private]</code>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

<p>Definition at line <a class="el" href="edgeDetect_8h_source.html#l00116">116</a> of file <a class="el" href="edgeDetect_8h_source.html">edgeDetect.h</a>.</p>

<p>Referenced by <a class="el" href="edgeDetect_8cpp_source.html#l00546">computeClusterStatistics()</a>.</p>

</div>
</div><p>
<a class="anchor" name="d9917825c8d8a4d6cf0397b3f44b443d"></a><!-- doxytag: member="EdgeDetect::numClusters" ref="d9917825c8d8a4d6cf0397b3f44b443d" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="classEdgeDetect.html#d9917825c8d8a4d6cf0397b3f44b443d">EdgeDetect::numClusters</a><code> [private]</code>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

<p>Definition at line <a class="el" href="edgeDetect_8h_source.html#l00112">112</a> of file <a class="el" href="edgeDetect_8h_source.html">edgeDetect.h</a>.</p>

<p>Referenced by <a class="el" href="edgeDetect_8cpp_source.html#l00546">computeClusterStatistics()</a>, <a class="el" href="edgeDetect_8cpp_source.html#l00618">computeClusterThresholds()</a>, <a class="el" href="edgeDetect_8cpp_source.html#l00859">constructEdgeImage()</a>, <a class="el" href="edgeDetect_8cpp_source.html#l00429">findPixelClusters()</a>, <a class="el" href="edgeDetect_8cpp_source.html#l00241">getClusterMap()</a>, and <a class="el" href="edgeDetect_8cpp_source.html#l00224">getNumClusters()</a>.</p>

</div>
</div><p>
<a class="anchor" name="3d33df65d9ab4b34082d64151a1294be"></a><!-- doxytag: member="EdgeDetect::smoothLumHist" ref="3d33df65d9ab4b34082d64151a1294be" args="[256]" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="classEdgeDetect.html#3d33df65d9ab4b34082d64151a1294be">EdgeDetect::smoothLumHist</a>[256]<code> [private]</code>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

<p>Definition at line <a class="el" href="edgeDetect_8h_source.html#l00097">97</a> of file <a class="el" href="edgeDetect_8h_source.html">edgeDetect.h</a>.</p>

<p>Referenced by <a class="el" href="edgeDetect_8cpp_source.html#l00264">allocateAndInitObjects()</a>, <a class="el" href="edgeDetect_8cpp_source.html#l00429">findPixelClusters()</a>, <a class="el" href="edgeDetect_8cpp_source.html#l00233">getSmoothHist()</a>, and <a class="el" href="edgeDetect_8cpp_source.html#l00315">smoothLumHistogram()</a>.</p>

</div>
</div><p>
<hr>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="edgeDetect_8h_source.html">edgeDetect.h</a><li><a class="el" href="edgeDetect_8cpp_source.html">edgeDetect.cpp</a></ul>
</div>
<hr size="1"><address style="text-align: right;"><small>Generated on Sun Aug 23 02:34:35 2009 for AlbumShaper by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.9 </small></address>
</body>
</html>