Try adding current javadoc to SVN
[zxing.git] / docs / javadoc / com / google / zxing / MultiFormatReader.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2 <!--NewPage-->
3 <HTML>
4 <HEAD>
5 <!-- Generated by javadoc (build 1.6.0_13) on Fri Jun 26 13:12:28 EDT 2009 -->
6 <TITLE>
7 MultiFormatReader
8 </TITLE>
9
10 <META NAME="date" CONTENT="2009-06-26">
11
12 <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
13
14 <SCRIPT type="text/javascript">
15 function windowTitle()
16 {
17     if (location.href.indexOf('is-external=true') == -1) {
18         parent.document.title="MultiFormatReader";
19     }
20 }
21 </SCRIPT>
22 <NOSCRIPT>
23 </NOSCRIPT>
24
25 </HEAD>
26
27 <BODY BGCOLOR="white" onload="windowTitle();">
28 <HR>
29
30
31 <!-- ========= START OF TOP NAVBAR ======= -->
32 <A NAME="navbar_top"><!-- --></A>
33 <A HREF="#skip-navbar_top" title="Skip navigation links"></A>
34 <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
35 <TR>
36 <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
37 <A NAME="navbar_top_firstrow"><!-- --></A>
38 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
39   <TR ALIGN="center" VALIGN="top">
40   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
41   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
42   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
43   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
44   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
45   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
46   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
47   </TR>
48 </TABLE>
49 </TD>
50 <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
51 </EM>
52 </TD>
53 </TR>
54
55 <TR>
56 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
57 &nbsp;<A HREF="../../../com/google/zxing/MonochromeBitmapSource.html" title="interface in com.google.zxing"><B>PREV CLASS</B></A>&nbsp;
58 &nbsp;<A HREF="../../../com/google/zxing/MultiFormatWriter.html" title="class in com.google.zxing"><B>NEXT CLASS</B></A></FONT></TD>
59 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
60   <A HREF="../../../index.html?com/google/zxing/MultiFormatReader.html" target="_top"><B>FRAMES</B></A>  &nbsp;
61 &nbsp;<A HREF="MultiFormatReader.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
62 &nbsp;<SCRIPT type="text/javascript">
63   <!--
64   if(window==top) {
65     document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
66   }
67   //-->
68 </SCRIPT>
69 <NOSCRIPT>
70   <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
71 </NOSCRIPT>
72
73
74 </FONT></TD>
75 </TR>
76 <TR>
77 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
78   SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
79 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
80 DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
81 </TR>
82 </TABLE>
83 <A NAME="skip-navbar_top"></A>
84 <!-- ========= END OF TOP NAVBAR ========= -->
85
86 <HR>
87 <!-- ======== START OF CLASS DATA ======== -->
88 <H2>
89 <FONT SIZE="-1">
90 com.google.zxing</FONT>
91 <BR>
92 Class MultiFormatReader</H2>
93 <PRE>
94 java.lang.Object
95   <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>com.google.zxing.MultiFormatReader</B>
96 </PRE>
97 <DL>
98 <DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../com/google/zxing/Reader.html" title="interface in com.google.zxing">Reader</A></DD>
99 </DL>
100 <HR>
101 <DL>
102 <DT><PRE>public final class <B>MultiFormatReader</B><DT>extends java.lang.Object<DT>implements <A HREF="../../../com/google/zxing/Reader.html" title="interface in com.google.zxing">Reader</A></DL>
103 </PRE>
104
105 <P>
106 MultiFormatReader is a convenience class and the main entry point into the library for most uses.
107  By default it attempts to decode all barcode formats that the library supports. Optionally, you
108  can provide a hints object to request different behavior, for example only decoding QR codes.
109 <P>
110
111 <P>
112 <DL>
113 <DT><B>Author:</B></DT>
114   <DD>Sean Owen, dswitkin@google.com (Daniel Switkin)</DD>
115 </DL>
116 <HR>
117
118 <P>
119
120 <!-- ======== CONSTRUCTOR SUMMARY ======== -->
121
122 <A NAME="constructor_summary"><!-- --></A>
123 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
124 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
125 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
126 <B>Constructor Summary</B></FONT></TH>
127 </TR>
128 <TR BGCOLOR="white" CLASS="TableRowColor">
129 <TD><CODE><B><A HREF="../../../com/google/zxing/MultiFormatReader.html#MultiFormatReader()">MultiFormatReader</A></B>()</CODE>
130
131 <BR>
132 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
133 </TR>
134 </TABLE>
135 &nbsp;
136 <!-- ========== METHOD SUMMARY =========== -->
137
138 <A NAME="method_summary"><!-- --></A>
139 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
140 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
141 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
142 <B>Method Summary</B></FONT></TH>
143 </TR>
144 <TR BGCOLOR="white" CLASS="TableRowColor">
145 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
146 <CODE>&nbsp;<A HREF="../../../com/google/zxing/Result.html" title="class in com.google.zxing">Result</A></CODE></FONT></TD>
147 <TD><CODE><B><A HREF="../../../com/google/zxing/MultiFormatReader.html#decode(com.google.zxing.MonochromeBitmapSource)">decode</A></B>(<A HREF="../../../com/google/zxing/MonochromeBitmapSource.html" title="interface in com.google.zxing">MonochromeBitmapSource</A>&nbsp;image)</CODE>
148
149 <BR>
150 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This version of decode honors the intent of Reader.decode(MonochromeBitmapSource) in that it
151  passes null as a hint to the decoders.</TD>
152 </TR>
153 <TR BGCOLOR="white" CLASS="TableRowColor">
154 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
155 <CODE>&nbsp;<A HREF="../../../com/google/zxing/Result.html" title="class in com.google.zxing">Result</A></CODE></FONT></TD>
156 <TD><CODE><B><A HREF="../../../com/google/zxing/MultiFormatReader.html#decode(com.google.zxing.MonochromeBitmapSource, java.util.Hashtable)">decode</A></B>(<A HREF="../../../com/google/zxing/MonochromeBitmapSource.html" title="interface in com.google.zxing">MonochromeBitmapSource</A>&nbsp;image,
157        java.util.Hashtable&nbsp;hints)</CODE>
158
159 <BR>
160 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Decode an image using the hints provided.</TD>
161 </TR>
162 <TR BGCOLOR="white" CLASS="TableRowColor">
163 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
164 <CODE>&nbsp;<A HREF="../../../com/google/zxing/Result.html" title="class in com.google.zxing">Result</A></CODE></FONT></TD>
165 <TD><CODE><B><A HREF="../../../com/google/zxing/MultiFormatReader.html#decodeWithState(com.google.zxing.MonochromeBitmapSource)">decodeWithState</A></B>(<A HREF="../../../com/google/zxing/MonochromeBitmapSource.html" title="interface in com.google.zxing">MonochromeBitmapSource</A>&nbsp;image)</CODE>
166
167 <BR>
168 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Decode an image using the state set up by calling setHints() previously.</TD>
169 </TR>
170 <TR BGCOLOR="white" CLASS="TableRowColor">
171 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
172 <CODE>&nbsp;void</CODE></FONT></TD>
173 <TD><CODE><B><A HREF="../../../com/google/zxing/MultiFormatReader.html#setHints(java.util.Hashtable)">setHints</A></B>(java.util.Hashtable&nbsp;hints)</CODE>
174
175 <BR>
176 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This method adds state to the MultiFormatReader.</TD>
177 </TR>
178 </TABLE>
179 &nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
180 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
181 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
182 <TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
183 </TR>
184 <TR BGCOLOR="white" CLASS="TableRowColor">
185 <TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
186 </TR>
187 </TABLE>
188 &nbsp;
189 <P>
190
191 <!-- ========= CONSTRUCTOR DETAIL ======== -->
192
193 <A NAME="constructor_detail"><!-- --></A>
194 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
195 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
196 <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
197 <B>Constructor Detail</B></FONT></TH>
198 </TR>
199 </TABLE>
200
201 <A NAME="MultiFormatReader()"><!-- --></A><H3>
202 MultiFormatReader</H3>
203 <PRE>
204 public <B>MultiFormatReader</B>()</PRE>
205 <DL>
206 </DL>
207
208 <!-- ============ METHOD DETAIL ========== -->
209
210 <A NAME="method_detail"><!-- --></A>
211 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
212 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
213 <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
214 <B>Method Detail</B></FONT></TH>
215 </TR>
216 </TABLE>
217
218 <A NAME="decode(com.google.zxing.MonochromeBitmapSource)"><!-- --></A><H3>
219 decode</H3>
220 <PRE>
221 public <A HREF="../../../com/google/zxing/Result.html" title="class in com.google.zxing">Result</A> <B>decode</B>(<A HREF="../../../com/google/zxing/MonochromeBitmapSource.html" title="interface in com.google.zxing">MonochromeBitmapSource</A>&nbsp;image)
222               throws <A HREF="../../../com/google/zxing/ReaderException.html" title="class in com.google.zxing">ReaderException</A></PRE>
223 <DL>
224 <DD>This version of decode honors the intent of Reader.decode(MonochromeBitmapSource) in that it
225  passes null as a hint to the decoders. However, that makes it inefficient to call repeatedly.
226  Use setHints() followed by decodeWithState() for continuous scan applications.
227 <P>
228 <DD><DL>
229 <DT><B>Specified by:</B><DD><CODE><A HREF="../../../com/google/zxing/Reader.html#decode(com.google.zxing.MonochromeBitmapSource)">decode</A></CODE> in interface <CODE><A HREF="../../../com/google/zxing/Reader.html" title="interface in com.google.zxing">Reader</A></CODE></DL>
230 </DD>
231 <DD><DL>
232 <DT><B>Parameters:</B><DD><CODE>image</CODE> - The pixel data to decode
233 <DT><B>Returns:</B><DD>The contents of the image
234 <DT><B>Throws:</B>
235 <DD><CODE><A HREF="../../../com/google/zxing/ReaderException.html" title="class in com.google.zxing">ReaderException</A></CODE> - Any errors which occurred</DL>
236 </DD>
237 </DL>
238 <HR>
239
240 <A NAME="decode(com.google.zxing.MonochromeBitmapSource, java.util.Hashtable)"><!-- --></A><H3>
241 decode</H3>
242 <PRE>
243 public <A HREF="../../../com/google/zxing/Result.html" title="class in com.google.zxing">Result</A> <B>decode</B>(<A HREF="../../../com/google/zxing/MonochromeBitmapSource.html" title="interface in com.google.zxing">MonochromeBitmapSource</A>&nbsp;image,
244                      java.util.Hashtable&nbsp;hints)
245               throws <A HREF="../../../com/google/zxing/ReaderException.html" title="class in com.google.zxing">ReaderException</A></PRE>
246 <DL>
247 <DD>Decode an image using the hints provided. Does not honor existing state.
248 <P>
249 <DD><DL>
250 <DT><B>Specified by:</B><DD><CODE><A HREF="../../../com/google/zxing/Reader.html#decode(com.google.zxing.MonochromeBitmapSource, java.util.Hashtable)">decode</A></CODE> in interface <CODE><A HREF="../../../com/google/zxing/Reader.html" title="interface in com.google.zxing">Reader</A></CODE></DL>
251 </DD>
252 <DD><DL>
253 <DT><B>Parameters:</B><DD><CODE>image</CODE> - The pixel data to decode<DD><CODE>hints</CODE> - The hints to use, clearing the previous state.
254 <DT><B>Returns:</B><DD>The contents of the image
255 <DT><B>Throws:</B>
256 <DD><CODE><A HREF="../../../com/google/zxing/ReaderException.html" title="class in com.google.zxing">ReaderException</A></CODE> - Any errors which occurred</DL>
257 </DD>
258 </DL>
259 <HR>
260
261 <A NAME="decodeWithState(com.google.zxing.MonochromeBitmapSource)"><!-- --></A><H3>
262 decodeWithState</H3>
263 <PRE>
264 public <A HREF="../../../com/google/zxing/Result.html" title="class in com.google.zxing">Result</A> <B>decodeWithState</B>(<A HREF="../../../com/google/zxing/MonochromeBitmapSource.html" title="interface in com.google.zxing">MonochromeBitmapSource</A>&nbsp;image)
265                        throws <A HREF="../../../com/google/zxing/ReaderException.html" title="class in com.google.zxing">ReaderException</A></PRE>
266 <DL>
267 <DD>Decode an image using the state set up by calling setHints() previously. Continuous scan
268  clients will get a <b>large</b> speed increase by using this instead of decode().
269 <P>
270 <DD><DL>
271 </DL>
272 </DD>
273 <DD><DL>
274 <DT><B>Parameters:</B><DD><CODE>image</CODE> - The pixel data to decode
275 <DT><B>Returns:</B><DD>The contents of the image
276 <DT><B>Throws:</B>
277 <DD><CODE><A HREF="../../../com/google/zxing/ReaderException.html" title="class in com.google.zxing">ReaderException</A></CODE> - Any errors which occurred</DL>
278 </DD>
279 </DL>
280 <HR>
281
282 <A NAME="setHints(java.util.Hashtable)"><!-- --></A><H3>
283 setHints</H3>
284 <PRE>
285 public void <B>setHints</B>(java.util.Hashtable&nbsp;hints)</PRE>
286 <DL>
287 <DD>This method adds state to the MultiFormatReader. By setting the hints once, subsequent calls
288  to decodeWithState(image) can reuse the same set of readers without reallocating memory. This
289  is important for performance in continuous scan clients.
290 <P>
291 <DD><DL>
292 </DL>
293 </DD>
294 <DD><DL>
295 <DT><B>Parameters:</B><DD><CODE>hints</CODE> - The set of hints to use for subsequent calls to decode(image)</DL>
296 </DD>
297 </DL>
298 <!-- ========= END OF CLASS DATA ========= -->
299 <HR>
300
301
302 <!-- ======= START OF BOTTOM NAVBAR ====== -->
303 <A NAME="navbar_bottom"><!-- --></A>
304 <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
305 <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
306 <TR>
307 <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
308 <A NAME="navbar_bottom_firstrow"><!-- --></A>
309 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
310   <TR ALIGN="center" VALIGN="top">
311   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
312   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
313   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
314   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
315   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
316   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
317   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
318   </TR>
319 </TABLE>
320 </TD>
321 <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
322 <script type="text/javascript"> var gaJsHost = (("https:" == document.location.protocol) ?  "https://ssl." : "http://www."); document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); </script> <script type="text/javascript"> var pageTracker = _gat._getTracker("UA-788492-5"); pageTracker._initData(); pageTracker._trackPageview(); </script></EM>
323 </TD>
324 </TR>
325
326 <TR>
327 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
328 &nbsp;<A HREF="../../../com/google/zxing/MonochromeBitmapSource.html" title="interface in com.google.zxing"><B>PREV CLASS</B></A>&nbsp;
329 &nbsp;<A HREF="../../../com/google/zxing/MultiFormatWriter.html" title="class in com.google.zxing"><B>NEXT CLASS</B></A></FONT></TD>
330 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
331   <A HREF="../../../index.html?com/google/zxing/MultiFormatReader.html" target="_top"><B>FRAMES</B></A>  &nbsp;
332 &nbsp;<A HREF="MultiFormatReader.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
333 &nbsp;<SCRIPT type="text/javascript">
334   <!--
335   if(window==top) {
336     document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
337   }
338   //-->
339 </SCRIPT>
340 <NOSCRIPT>
341   <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
342 </NOSCRIPT>
343
344
345 </FONT></TD>
346 </TR>
347 <TR>
348 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
349   SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
350 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
351 DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
352 </TR>
353 </TABLE>
354 <A NAME="skip-navbar_bottom"></A>
355 <!-- ======== END OF BOTTOM NAVBAR ======= -->
356
357 <HR>
358
359 </BODY>
360 </HTML>