< Previous | Contents | Manuals Home | Boris FX | Next >

depends on the file type being written (used mainly for EXR). Returns 1 for success, 0 for failure: if you don't check the value, be sure to assign this to a dummy to prevent unwanted output.

AprilTags

You can access SynthEyes’s AprilTags recognition system through Sizzle, as the AprilTags user interface is a Sizzle script. You should examine that script for example code. It consists of two interface objects, a detector and a result object. The Scene.AprilTagDetector() function creates the detector based on a tag family to be looked for; see the reference for that above for details.

Some of the detailed AprilTags internal controls are presented here on the chance that you want to experiment with them; see AprilTags own documentation for details (in apriltag.h).

The detector object implements the following:

.Analyze(image) Analyze the given image, which is typically from Shot.Image(), and return a list of AprilTag result objects.

.blur Blur setting

.decimate Decimation level

.family Family number (read only, set at creation)

.sharpen Sharpen setting

.threads Number of threads used in the AprilTags thread pool (typically a few over the number of processor cores). Must be set before the first Analyze().

.totalWidth Total width/height of this AprilTag family, in blocks.

.widthAtBorder Width/height of this AprilTag family at the main square border, in blocks.

The AprilTag result object contains information about a discovered tag, which can be examined via various attributes.

.center The image coordinates of the center of the detected tag. See the AprilTags script for conversion to u/v coordinates used in SynthEyes.

.Corner(corner#) The coordinates of the given corner of the specified tag, allowing the position of the four corners (1..4) to be read out.

.errbits The number of incorrect bits in the code; with more than one the detection is almost certainly spurious.

.fov The field of view of the camera on this frame. Required for .Pose() information, not for 2-D

.Center() and .Corner() information.

.imgwid Width of the image the tag was detected in.

.imghei Height of the image the tag was detected in.

.Map(point) Maps a point in tag-surface coordinates (+/-1 with 0,0 at the center) to AprilTag image coordinates.

.pose The transform of the tag versus the camera. See the AprilTags script for one use of this. Note that .fov and .tagsize must be set for this to be at all accurate, and the tag must likely be a good fraction of the size of the image for it to have useful accuracy.

.quality A quality index on the detection, 0..1, roughly contrast between bright and dark pixels in the tag.

.tagsize The length, in your choice of units, of each side of the square of the physical AprilTags. Again, this is the size of the square, not the size of the overall tag, which may include data bits outside the square.

©2023 Boris FX, Inc. — UNOFFICIAL — Converted from original PDF.