<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="imagick.adaptivethresholdimage">
 <refnamediv>
  <refname>Imagick::adaptiveThresholdImage</refname>
  <refpurpose>Selects a threshold for each pixel based on a range of intensity</refpurpose>
 </refnamediv>

 <refsect1 role="description">
  &reftitle.description;
  <methodsynopsis>
   <modifier>public</modifier> <type>bool</type><methodname>Imagick::adaptiveThresholdImage</methodname>
   <methodparam><type>int</type><parameter>width</parameter></methodparam>
   <methodparam><type>int</type><parameter>height</parameter></methodparam>
   <methodparam><type>int</type><parameter>offset</parameter></methodparam>
  </methodsynopsis>
  <para>
   Selects an individual threshold for each pixel based on the
   range of intensity values in its local neighborhood.  This
   allows for thresholding of an image whose global intensity
   histogram doesn't contain distinctive peaks.
  </para>
 </refsect1>

 <refsect1 role="parameters">
  &reftitle.parameters;
  <para>
   <variablelist>
    <varlistentry>
     <term><parameter>width</parameter></term>
     <listitem>
      <para>
       Width of the local neighborhood.
      </para>
     </listitem>
    </varlistentry>
    <varlistentry>
     <term><parameter>height</parameter></term>
     <listitem>
      <para>
       Height of the local neighborhood.
      </para>
     </listitem>
    </varlistentry>
    <varlistentry>
     <term><parameter>offset</parameter></term>
     <listitem>
      <para>
       The mean offset
      </para>
     </listitem>
    </varlistentry>
   </variablelist>
  </para>

 </refsect1>
 <refsect1 role="returnvalues">
  &reftitle.returnvalues;
  <para>
   &imagick.return.success;
  </para>
 </refsect1>



 <refsect1 role="examples">
  &reftitle.examples;
  <para>
    <example>
      <title> <function>Imagick::adaptiveThresholdImage</function></title>
      <programlisting role="php">
      <![CDATA[
<?php
function adaptiveThresholdImage($imagePath, $width, $height, $adaptiveOffset) {
    $imagick = new \Imagick(realpath($imagePath));
    $adaptiveOffsetQuantum = intval($adaptiveOffset * \Imagick::getQuantum());
    $imagick->adaptiveThresholdImage($width, $height, $adaptiveOffsetQuantum);
    header("Content-Type: image/jpg");
    echo $imagick->getImageBlob();
}

?>
]]>
      </programlisting>
    </example>
  </para>
 </refsect1>

</refentry>

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->
