<?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_Micro_QR_Code</id>
	<title>Example Detect Micro QR 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_Micro_QR_Code"/>
	<link rel="alternate" type="text/html" href="https://boofcv.org/index.php?title=Example_Detect_Micro_QR_Code&amp;action=history"/>
	<updated>2026-05-14T22:27:45Z</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_Micro_QR_Code&amp;diff=3253&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_Micro_QR_Code&amp;diff=3253&amp;oldid=prev"/>
		<updated>2022-11-10T16:49:50Z</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;* [[Tutorial_QRCodes|Tutorial 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;* [[Tutorial_QRCodes|Tutorial QR 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_Render_Micro_QR_Code|Rendering Micro 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_Render_Micro_QR_Code|Rendering Micro 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_Micro_QR_Code&amp;diff=3179&amp;oldid=prev</id>
		<title>Peter at 03:32, 18 January 2022</title>
		<link rel="alternate" type="text/html" href="https://boofcv.org/index.php?title=Example_Detect_Micro_QR_Code&amp;diff=3179&amp;oldid=prev"/>
		<updated>2022-01-18T03:32:47Z</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 03:32, 18 January 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;&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 widths=807px heights=331px&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 widths=807px heights=331px&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;File:Example_micro_qr.jpg | Micro QR Code markers &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;of different &lt;/del&gt;sizes are detected and &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;out lned &lt;/del&gt;in red &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;are detected in this image&lt;/del&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;File:Example_micro_qr.jpg | Micro QR Code markers &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;with various &lt;/ins&gt;sizes are detected and &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;outlined &lt;/ins&gt;in red.&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;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;/table&gt;</summary>
		<author><name>Peter</name></author>
	</entry>
	<entry>
		<id>https://boofcv.org/index.php?title=Example_Detect_Micro_QR_Code&amp;diff=3130&amp;oldid=prev</id>
		<title>Peter: Created page with &quot;&lt;center&gt; &lt;gallery widths=807px heights=331px&gt; File:Example_micro_qr.jpg | Micro QR Code markers of different sizes are detected and out lned in red are detected in this image....&quot;</title>
		<link rel="alternate" type="text/html" href="https://boofcv.org/index.php?title=Example_Detect_Micro_QR_Code&amp;diff=3130&amp;oldid=prev"/>
		<updated>2022-01-17T22:13:05Z</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_micro_qr.jpg | Micro QR Code markers of different sizes are detected and out lned in red are detected in this image....&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_micro_qr.jpg | Micro QR Code markers of different sizes are detected and out lned in red are detected in this image.&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/QR_code#Micro_QR_code Micro QR Codes] are designed to be smaller and more space efficient than regular QR codes. They are not as compact as Datamatrix, but have an easier to identify locator pattern making them more appropriate in complex scenes.&lt;br /&gt;
&lt;br /&gt;
Example Code:&lt;br /&gt;
* [https://github.com/lessthanoptimal/BoofCV/blob/v0.40/examples/src/main/java/boofcv/examples/fiducial/ExampleDetectMicroQrCode.java ExampleDetectMicroQrCode.java]&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;
* [[Tutorial_QRCodes|Tutorial QR Codes]]&lt;br /&gt;
* [[Example_Render_Micro_QR_Code|Rendering Micro QR Codes]]&lt;br /&gt;
* [[Example_Detect_QR_Code|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 a Micro QR Code inside an image and process the extracted data. Much of the information that&lt;br /&gt;
 * is computed while detecting and decoding a QR Code is saved inside the {@link MicroQrCode} class. This can be useful&lt;br /&gt;
 * for application developers.&lt;br /&gt;
 *&lt;br /&gt;
 * @author Peter Abeles&lt;br /&gt;
 */&lt;br /&gt;
public class ExampleDetectMicroQrCode {&lt;br /&gt;
	public static void main( String[] args ) {&lt;br /&gt;
		BufferedImage input = UtilImageIO.loadImageNotNull(UtilIO.pathExample(&amp;quot;fiducial/microqr/image01.jpg&amp;quot;));&lt;br /&gt;
		GrayU8 gray = ConvertBufferedImage.convertFrom(input, (GrayU8)null);&lt;br /&gt;
&lt;br /&gt;
		var config = new ConfigMicroQrCode();&lt;br /&gt;
//		config.considerTransposed = false; // by default, it will consider incorrectly encoded markers. Faster if false&lt;br /&gt;
		MicroQrCodeDetector&amp;lt;GrayU8&amp;gt; detector = FactoryFiducial.microqr(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;MicroQrCode&amp;gt; detections = detector.getDetections();&lt;br /&gt;
&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 (MicroQrCode qr : detections) {&lt;br /&gt;
			// The message encoded in the marker&lt;br /&gt;
			System.out.println(&amp;quot;message: &amp;#039;&amp;quot; + qr.message + &amp;quot;&amp;#039;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
			// Visualize its location in the image&lt;br /&gt;
			VisualizeShapes.drawPolygon(qr.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;MicroQrCode&amp;gt; failures = detector.getFailures();&lt;br /&gt;
		g2.setColor(Color.RED);&lt;br /&gt;
		for (MicroQrCode qr : failures) {&lt;br /&gt;
			// If the &amp;#039;cause&amp;#039; is ERROR_CORRECTION or later it might a real QR Code&lt;br /&gt;
			if (qr.failureCause.ordinal() &amp;lt; QrCode.Failure.ERROR_CORRECTION.ordinal())&lt;br /&gt;
				continue;&lt;br /&gt;
&lt;br /&gt;
			VisualizeShapes.drawPolygon(qr.bounds, true, 1, g2);&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		ShowImages.showWindow(input, &amp;quot;Example Micro QR 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>