GII/ROBOBO — pull request #11 by kenkeiras (2014-08-02 15:42:29+00:00)
Title: Basic april tag support

Basic java-based april tag detection (at this time hardcoded for family 36h11), and a message publishing node.

April tag detection uses `java.awt.BufferedImage` (unavailable in android), as a temporary workaround a prebuilt jar is provided, to build it apply the following patch on the april tag sources

diff --git a/java/src/april/tag/TagDetector.java b/java/src/april/tag/TagDetector.java
index 0a8dd01..d20f5e7 100644
--- a/java/src/april/tag/TagDetector.java
+++ b/java/src/april/tag/TagDetector.java
@@ -244,6 +244,12 @@ public class TagDetector implements AbstractTagDetector
**/
public ArrayList process(BufferedImage im, double opticalCenter[])
{
+ return processFloat(new FloatImage(im), opticalCenter);
+ }
+
+ /** Detect the features in the specified float image. **/
+ public ArrayList processFloat(FloatImage fimOrig, double opticalCenter[])
+ {
this.opticalCenter = opticalCenter;

// This is a very long function, but it can't really be
@@ -253,8 +259,6 @@ public class TagDetector implements AbstractTagDetector
///////////////////////////////////////////////////////////
// Step one. Preprocess image (convert to float (grayscale)
// and low pass if necessary.)
- FloatImage fimOrig = new FloatImage(im);
-
FloatImage fim = fimOrig;
if (sigma > 0) {
int filtsz = ((int) Math.max(3, 3*sigma)) | 1;