<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://boofcv.org/index.php?action=history&amp;feed=atom&amp;title=Example_Detect_Aztec_Code</id>
	<title>Example Detect Aztec Code - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://boofcv.org/index.php?action=history&amp;feed=atom&amp;title=Example_Detect_Aztec_Code"/>
	<link rel="alternate" type="text/html" href="https://boofcv.org/index.php?title=Example_Detect_Aztec_Code&amp;action=history"/>
	<updated>2026-06-24T02:49:26Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.36.2</generator>
	<entry>
		<id>https://boofcv.org/index.php?title=Example_Detect_Aztec_Code&amp;diff=3252&amp;oldid=prev</id>
		<title>Peter at 16:49, 10 November 2022</title>
		<link rel="alternate" type="text/html" href="https://boofcv.org/index.php?title=Example_Detect_Aztec_Code&amp;diff=3252&amp;oldid=prev"/>
		<updated>2022-11-10T16:49:33Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 16:49, 10 November 2022&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l15&quot;&gt;Line 15:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 15:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Relevant Examples/Tutorials:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Relevant Examples/Tutorials:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* [https://www.ninox360.com/barcode-scanner 2D Barcode Webapp]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* [[Example_Render_Aztec_Code|Rendering Aztec Codes]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* [[Example_Render_Aztec_Code|Rendering Aztec Codes]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* [[Example_Detect_QR_Code|QR Codes]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* [[Example_Detect_QR_Code|QR Codes]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Peter</name></author>
	</entry>
	<entry>
		<id>https://boofcv.org/index.php?title=Example_Detect_Aztec_Code&amp;diff=3215&amp;oldid=prev</id>
		<title>Peter at 00:32, 3 September 2022</title>
		<link rel="alternate" type="text/html" href="https://boofcv.org/index.php?title=Example_Detect_Aztec_Code&amp;diff=3215&amp;oldid=prev"/>
		<updated>2022-09-03T00:32:15Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 00:32, 3 September 2022&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;center&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;center&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;gallery widths=&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;807px &lt;/del&gt;heights=&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;331px&lt;/del&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;gallery widths=&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;350px &lt;/ins&gt;heights=&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;350px&lt;/ins&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;File:Example_aztec_code_scan.jpg | Aztec Code marker detected on a ticket.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;File:Example_aztec_code_scan.jpg | Aztec Code marker detected on a ticket.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/gallery&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/gallery&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Peter</name></author>
	</entry>
	<entry>
		<id>https://boofcv.org/index.php?title=Example_Detect_Aztec_Code&amp;diff=3212&amp;oldid=prev</id>
		<title>Peter: Created page with &quot;&lt;center&gt; &lt;gallery widths=807px heights=331px&gt; File:Example_aztec_code_scan.jpg | Aztec Code marker detected on a ticket. &lt;/gallery&gt; &lt;/center&gt;  [https://en.wikipedia.org/wiki/A...&quot;</title>
		<link rel="alternate" type="text/html" href="https://boofcv.org/index.php?title=Example_Detect_Aztec_Code&amp;diff=3212&amp;oldid=prev"/>
		<updated>2022-09-03T00:28:14Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;&amp;lt;center&amp;gt; &amp;lt;gallery widths=807px heights=331px&amp;gt; File:Example_aztec_code_scan.jpg | Aztec Code marker detected on a ticket. &amp;lt;/gallery&amp;gt; &amp;lt;/center&amp;gt;  [https://en.wikipedia.org/wiki/A...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;gallery widths=807px heights=331px&amp;gt;&lt;br /&gt;
File:Example_aztec_code_scan.jpg | Aztec Code marker detected on a ticket.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[https://en.wikipedia.org/wiki/Aztec_Code Aztec Codes] are popular in transportation and related industries. They can encode a lot of information and don&amp;#039;t require a quite zone around the marker. However, due to the lack of easily identified landmarks, larger markers are harder to scan.&lt;br /&gt;
&lt;br /&gt;
Example Code:&lt;br /&gt;
* [https://github.com/lessthanoptimal/BoofCV/blob/v0.41/examples/src/main/java/boofcv/examples/fiducial/ExampleDetectAztecCode.java ExampleDetectAztecCode]&lt;br /&gt;
&lt;br /&gt;
Concepts:&lt;br /&gt;
* Fiducials&lt;br /&gt;
* QR Codes&lt;br /&gt;
&lt;br /&gt;
Relevant Examples/Tutorials:&lt;br /&gt;
* [[Example_Render_Aztec_Code|Rendering Aztec Codes]]&lt;br /&gt;
* [[Example_Detect_QR_Code|QR Codes]]&lt;br /&gt;
* [[Example_Detect_Micro_QR_Code|Micro QR Codes]]&lt;br /&gt;
&lt;br /&gt;
= Example Code =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
/**&lt;br /&gt;
 * Shows you how to detect an Aztec Code inside an image. BoofCV provides a lot of information about the marker and&lt;br /&gt;
 * provides an accurate location of the finder pattern. For example, you can get the number of bit errors which&lt;br /&gt;
 * were encountered while reading and will return failed detections with the reason they failed.&lt;br /&gt;
 *&lt;br /&gt;
 * @author Peter Abeles&lt;br /&gt;
 */&lt;br /&gt;
public class ExampleDetectAztecCode {&lt;br /&gt;
	public static void main( String[] args ) {&lt;br /&gt;
		BufferedImage input = UtilImageIO.loadImageNotNull(UtilIO.pathExample(&amp;quot;fiducial/aztec/image01.jpg&amp;quot;));&lt;br /&gt;
		GrayU8 gray = ConvertBufferedImage.convertFrom(input, (GrayU8)null);&lt;br /&gt;
&lt;br /&gt;
		var config = new ConfigAztecCode();&lt;br /&gt;
//		config.considerTransposed = false; // by default, it will consider incorrectly encoded markers. Faster if false&lt;br /&gt;
		AztecCodePreciseDetector&amp;lt;GrayU8&amp;gt; detector = FactoryFiducial.aztec(config, GrayU8.class);&lt;br /&gt;
&lt;br /&gt;
		detector.process(gray);&lt;br /&gt;
&lt;br /&gt;
		// Gets a list of all the qr codes it could successfully detect and decode&lt;br /&gt;
		List&amp;lt;AztecCode&amp;gt; detections = detector.getDetections();&lt;br /&gt;
&lt;br /&gt;
		// Print the encoded messages&lt;br /&gt;
		for (AztecCode marker : detections) {&lt;br /&gt;
			System.out.println(&amp;quot;message: &amp;#039;&amp;quot; + marker.message + &amp;quot;&amp;#039;&amp;quot;);&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// Visualize the found markers in the image&lt;br /&gt;
		Graphics2D g2 = input.createGraphics();&lt;br /&gt;
		int strokeWidth = Math.max(4, input.getWidth()/200); // in large images the line can be too thin&lt;br /&gt;
		g2.setColor(Color.GREEN);&lt;br /&gt;
		g2.setStroke(new BasicStroke(strokeWidth));&lt;br /&gt;
		for (AztecCode marker : detections) {&lt;br /&gt;
			VisualizeShapes.drawPolygon(marker.bounds, true, 1, g2);&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// List of objects it thinks might be a QR Code but failed for various reasons&lt;br /&gt;
		List&amp;lt;AztecCode&amp;gt; failures = detector.getFailures();&lt;br /&gt;
		g2.setColor(Color.RED);&lt;br /&gt;
		for (AztecCode marker : failures) {&lt;br /&gt;
			// If it failed to decode the mode then there&amp;#039;s a decent change of it being a false negative&lt;br /&gt;
			if (marker.failure.ordinal() &amp;lt; AztecCode.Failure.MODE_ECC.ordinal())&lt;br /&gt;
				continue;&lt;br /&gt;
&lt;br /&gt;
			VisualizeShapes.drawPolygon(marker.bounds, true, 1, g2);&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		ShowImages.showWindow(input, &amp;quot;Example Aztec Codes&amp;quot;, true);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Peter</name></author>
	</entry>
</feed>