image enhancement.htm

来自「是一部关于java高级图像处理的的一本入门书」· HTM 代码 · 共 1,553 行 · 第 1/5 页

HTM
1,553
字号
  href="http://java.sun.com/products/java-media/jai/forDevelopers/jai1_0_1guide-unc/Image-enhance.doc.html#69599">Listing 
  7-4</A> shows an example of the construction of a multi-banded byte lookup 
  table.
  <P><CAPTION><FONT size=-1><B><A name=69599>
  <CENTER><FONT size=-1><B><I>Listing 7-4 </I><IMG 
  src="Image Enhancement.files/sm-blank.gif" border=0> Example Multi-band Lookup 
  Table</B></FONT></CENTER></A>
  <P></B></FONT></CAPTION>
  <HR>
  <TR valign="top"><TD><PRE>     // Create the table data.
     byte[][] tableData = new byte[3][0x10000];
     for (int i = 0; i &lt; 0x10000; i++) {
     tableData[0][i] = (byte)(i &gt;&gt; 8); // this may be different
     tableData[1][i] = (byte)(i &gt;&gt; 8); // for each band
     tableData[2][i] = (byte)(i &gt;&gt; 8);
     }
</PRE><TR valign="top"><TD><PRE>     // Create a LookupTableJAI object to be used with the
     // "lookup" operator.
     LookupTableJAI table = new LookupTableJAI(tableData);
</PRE>
  <HR>

  <P>
  <TABLE border=0>
    <TBODY>
    <TR>
      <TD><IMG src="Image Enhancement.files/cistine.gif"></TD>
      <TD>
        <HR>
        <B>API:</B> <CODE>javax.media.jai.LookupTableJAI </CODE>
        <HR>
      </TD></TR></TBODY></TABLE><PRE><UL>
<LI>LookupTableJAI(byte[][] data)
<P></P></LI></UL></PRE>
  <DL><A name=56728>
    <DT>
    <DD>constructs a multi-banded byte lookup table with an index offset for 
    each band of 0.
    <P>
    <TABLE cellPadding=3 border=3>
      <CAPTION><FONT size=-1><B></B></FONT></CAPTION>
      <TBODY>
      <TR vAlign=top>
        <TD><EM>Parameters</EM>: 
          <P></P>
        <TD><CODE>data</CODE> 
          <P></P>
        <TD>The multi-banded byte data in [band][index] format 
          <P></P></TR></TBODY></TABLE></A>
    <P></P></DD></DL><PRE><UL>
<LI>LookupTableJAI(byte[][] data, int offset)
<P></P></LI></UL></PRE>
  <DL><A name=56737>
    <DT>
    <DD>constructs a multi-banded byte lookup table where all bands have the 
    same index offset.
    <P>
    <TABLE cellPadding=3 border=3>
      <CAPTION><FONT size=-1><B></B></FONT></CAPTION>
      <TBODY>
      <TR vAlign=top>
        <TD rowSpan=2><EM>Parameters</EM>: 
          <P></P>
        <TD><CODE>data</CODE> 
          <P></P>
        <TD>The multi-banded byte data in [band][index] format 
          <P></P>
      <TR vAlign=top>
        <TD><CODE>offset</CODE> 
          <P></P>
        <TD>The common offset for all bands 
          <P></P></TR></TBODY></TABLE></A>
    <P></P></DD></DL><PRE><UL>
<LI>LookupTableJAI(byte[][] data, int[] offsets)
<P></P></LI></UL></PRE>
  <DL><A name=56752>
    <DT>
    <DD>constructs a multi-banded byte lookup table where each band has a 
    different index offset.
    <P>
    <TABLE cellPadding=3 border=3>
      <CAPTION><FONT size=-1><B></B></FONT></CAPTION>
      <TBODY>
      <TR vAlign=top>
        <TD rowSpan=2><EM>Parameters</EM>: 
          <P></P>
        <TD><CODE>data</CODE> 
          <P></P>
        <TD>The multi-banded byte data in [band][index] format 
          <P></P>
      <TR vAlign=top>
        <TD><CODE>offsets</CODE> 
          <P></P>
        <TD>The offsets for the bands 
          <P></P></TR></TBODY></TABLE></A>
    <P></P></DD></DL><PRE><UL>
<LI>LookupTableJAI(short[][] data, boolean isUShort)
<P></P></LI></UL></PRE>
  <DL><A name=56793>
    <DT>
    <DD>constructs a multi-banded short or unsigned short lookup table. The 
    index offset for each band is 0
    <P>
    <TABLE cellPadding=3 border=3>
      <CAPTION><FONT size=-1><B></B></FONT></CAPTION>
      <TBODY>
      <TR vAlign=top>
        <TD rowSpan=2><EM>Parameters</EM>: 
          <P></P>
        <TD><CODE>data</CODE> 
          <P></P>
        <TD>The multi-banded short data in [band][index] format. 
          <P></P>
      <TR vAlign=top>
        <TD><CODE>isUShort</CODE> 
          <P></P>
        <TD>True if the data type is <CODE>DataBuffer.TYPE_USHORT</CODE>; 
          false if the data type is <CODE>DataBuffer.TYPE_SHORT</CODE>. 
          <P></P></TR></TBODY></TABLE></A>
    <P></P></DD></DL><PRE><UL>
<LI>LookupTableJAI(short[][] data, int offset, boolean isUShort)
<P></P></LI></UL></PRE>
  <DL><A name=56808>
    <DT>
    <DD>constructs a multi-banded short or unsigned short lookup table where all 
    bands have the same index offset
    <P>
    <TABLE cellPadding=3 border=3>
      <CAPTION><FONT size=-1><B></B></FONT></CAPTION>
      <TBODY>
      <TR vAlign=top>
        <TD rowSpan=3><EM>Parameters</EM>: 
          <P></P>
        <TD><CODE>data</CODE> 
          <P></P>
        <TD>The multi-banded short data in [band][index] format 
          <P></P>
      <TR vAlign=top>
        <TD><CODE>offset</CODE> 
          <P></P>
        <TD>The common offset for all bands 
          <P></P>
      <TR vAlign=top>
        <TD><CODE>isUShort</CODE> 
          <P></P>
        <TD>True if the data type is <CODE>DataBuffer.TYPE_USHORT</CODE>; 
          false if the data type is <CODE>DataBuffer.TYPE_SHORT</CODE>. 
          <P></P></TR></TBODY></TABLE></A>
    <P></P></DD></DL><PRE><UL>
<LI>LookupTableJAI(short[][] data, int[] offsets, boolean isUShort)
<P></P></LI></UL></PRE>
  <DL><A name=56829>
    <DT>
    <DD>constructs a multi-banded short or unsigned short lookup table where 
    each band has a different index offset
    <P>
    <TABLE cellPadding=3 border=3>
      <CAPTION><FONT size=-1><B></B></FONT></CAPTION>
      <TBODY>
      <TR vAlign=top>
        <TD rowSpan=3><EM>Parameters</EM>: 
          <P></P>
        <TD><CODE>data</CODE> 
          <P></P>
        <TD>The multi-banded short data in [band][index] format 
          <P></P>
      <TR vAlign=top>
        <TD><CODE>offset</CODE> 
          <P></P>
        <TD>The offsets for the bands 
          <P></P>
      <TR vAlign=top>
        <TD><CODE>isUShort</CODE> 
          <P></P>
        <TD>True if the data type is <CODE>DataBuffer.TYPE_USHORT</CODE>; 
          false if the data type is <CODE>DataBuffer.TYPE_SHORT</CODE>. 
          <P></P></TR></TBODY></TABLE></A>
    <P></P></DD></DL><PRE><UL>
<LI>LookupTableJAI(int[][] data)
<P></P></LI></UL></PRE>
  <DL><A name=56866>
    <DT>
    <DD>constructs a multi-banded int lookup table. The index offset for each 
    band is 0
    <P>
    <TABLE cellPadding=3 border=3>
      <CAPTION><FONT size=-1><B></B></FONT></CAPTION>
      <TBODY>
      <TR vAlign=top>
        <TD><EM>Parameters</EM>: 
          <P></P>
        <TD><CODE>data</CODE> 
          <P></P>
        <TD>The multi-banded int data in [band][index] format 
          <P></P></TR></TBODY></TABLE></A>
    <P></P></DD></DL><PRE><UL>
<LI>LookupTableJAI(int[][] data, int offset)
<P></P></LI></UL></PRE>
  <DL><A name=56868>
    <DT>
    <DD>constructs a multi-banded int lookup table where all bands have the same 
    index offset
    <P>
    <TABLE cellPadding=3 border=3>
      <CAPTION><FONT size=-1><B></B></FONT></CAPTION>
      <TBODY>
      <TR vAlign=top>
        <TD rowSpan=2><EM>Parameters</EM>: 
          <P></P>
        <TD><CODE>data</CODE> 
          <P></P>
        <TD>The multi-banded int data in [band][index] format 
          <P></P>
      <TR vAlign=top>
        <TD><CODE>offset</CODE> 
          <P></P>
        <TD>The common offset for all bands 
          <P></P></TR></TBODY></TABLE></A>
    <P></P></DD></DL><PRE><UL>
<LI>LookupTableJAI(int[][] data, int[] offsets)
<P></P></LI></UL></PRE>
  <DL><A name=56883>
    <DT>
    <DD>constructs a multi-banded int lookup table where each band has a 
    different index offset
    <P>
    <TABLE cellPadding=3 border=3>
      <CAPTION><FONT size=-1><B></B></FONT></CAPTION>
      <TBODY>
      <TR vAlign=top>
        <TD rowSpan=2><EM>Parameters</EM>: 
          <P></P>
        <TD><CODE>data</CODE> 
          <P></P>
        <TD>The multi-banded int data in [band][index] format 
          <P></P>
      <TR vAlign=top>
        <TD><CODE>offset</CODE> 
          <P></P>
        <TD>The offsets for the bands 
          <P></P></TR></TBODY></TABLE></A>
    <P></P></DD></DL><PRE><UL>
<LI>LookupTableJAI(float[][] data)
<P></P></LI></UL></PRE>
  <DL><A name=56907>
    <DT>
    <DD>constructs a multi-banded float lookup table. The index offset for each 
    band is 0
    <P>
    <TABLE cellPadding=3 border=3>
      <CAPTION><FONT size=-1><B></B></FONT></CAPTION>
      <TBODY>
      <TR vAlign=top>
        <TD><EM>Parameters</EM>: 
          <P></P>
        <TD><CODE>data</CODE> 
          <P></P>
        <TD>The multi-banded float data in [band][index] format 
          <P></P></TR></TBODY></TABLE></A>
    <P></P></DD></DL><PRE><UL>
<LI>LookupTableJAI(float[][] data, int offset)
<P></P></LI></UL></PRE>
  <DL><A name=56916>
    <DT>
    <DD>constructs a multi-banded float lookup table where all bands have the 
    same index offset
    <P>
    <TABLE cellPadding=3 border=3>
      <CAPTION><FONT size=-1><B></B></FONT></CAPTION>
      <TBODY>
      <TR vAlign=top>
        <TD rowSpan=2><EM>Parameters</EM>: 
          <P></P>
        <TD><CODE>data</CODE> 
          <P></P>
        <TD>The multi-banded float data in [band][index] format 
          <P></P>
      <TR vAlign=top>
        <TD><CODE>offset</CODE> 
          <P></P>
        <TD>The common offset for all bands 
          <P></P></TR></TBODY></TABLE></A>
    <P></P></DD></DL><PRE><UL>
<LI>LookupTableJAI(float[][] data, int[] offsets)
<P></P></LI></UL></PRE>
  <DL><A name=56931>
    <DT>
    <DD>constructs a multi-banded float lookup table where each band has a 
    different index offset
    <P>
    <TABLE cellPadding=3 border=3>
      <CAPTION><FONT size=-1><B></B></FONT></CAPTION>
      <TBODY>
      <TR vAlign=top>
        <TD rowSpan=2><EM>Parameters</EM>: 
          <P></P>
        <TD><CODE>data</CODE> 
          <P></P>
        <TD>The multi-banded float data in [band][index] format 
          <P></P>
      <TR vAlign=top>
        <TD><CODE>offset</CODE> 
          <P></P>
        <TD>The offsets for the bands 
          <P></P></TR></TBODY></TABLE></A>
    <P></P></DD></DL><PRE><UL>
<LI>LookupTableJAI(double[][] data)
<P></P></LI></UL></PRE>
  <DL><A name=569

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?