Fiducial
The Fiducial module provides you with an easy way to identify a particular marker within the current image view.
Fiducials are commonly known as "markers that are easy to identify" and are typically added
to an environment where localization and navigation are needed for robots using machine vision.
Fiducial detection and recognition differs from that of generic object recognition as some assumptions are
made on the type of object being detected. For example, a black and white fiducial can be detected without
needing color, and can be easily separated from the background due to its high contrast nature. Fiducials
are also typically 2D planar objects that have very distinct corners or shapes. Identifying these traits in
the environment helps to reduce the "clutter" of other objects and ensures better identification reliability.
Thanks to the planar nature of fiducials they can be placed on the floor, ceiling or walls and still be
detected correctly without any recalibration of the camera. By knowing the basic shape of a fiducial machine
vision techniques can account for the perspective and affine distortion (i.e. a fiducial rotated in X and Y plane)
to a considerable degree while still maintaining recognition. Is is for this reason, along with their barcode
like nature, that fiducials are frequently used for navigation and localization.
There are 6 parameters that localize a fiducial in space. Luckily, due to the shape and planar nature
of the fiducial these 6 parameters can be determined very quickly and allow the processing to run at very
near camera speed. This has an advantage on moving robots that need to process their environment before
it changes.
Once you know the identity of a fiducial you can know approximately where you are. Having the fiducial in
sight helps the robot to know where it is with respect to the fiducial and can use the fiducial as a target
for navigation based on scale, rotation and translation.
The Fiducial module provides a way to easily recognize fiducials in your environment. We have included 15 test
fiducials in the Fiducials folder along with the RoboRealm download that you can print out to experiment with.
If you don't have a printer just bring them up on your screen and point your camera towards it!
Note that these are graphical files that can be modified (or more created) as needed. Also note the one poster
like fiducial. The only requirement for the fiducial is that it be surrounded by a white surface with
an inner black square and contain inner elements that can distinguish it from other Fiducials. If you have
posters that satisfy this requirement then you already have fiducials on your
walls!
Interface
Instructions
1. Train - Press the train button and enter the full path to the Fiducials folder that you downloaded from RoboRealm.
This will typically be c:\Program Files\RoboRealm\Fiducials\. Press the START button to start training. After it is
complete press the ok button.
2. Display - You should know notice the fiducials being recognized in the main RoboRealm window. Matches are
displayed as green whilst candidate regions that do not match are in purple. Note that the 'name' of a fiducial
is the name of the image filename without the extension. So you can change the names by changing the filenames
and re-training.
3. Attributes - By default the Filename and Confidence are displayed. You can add or remove information from
being displayed by changing the checkboxes in the Display area. Note if too much information is displayed you
might want to change the Font size to a smaller size.
- Filename - the name of the fiducial.
- Confidence - how strongly the module believes this fiducial matches one in the database folder.
- Coordinates - the location of the matched fiducial.
- X Translation - the X location with respect to the center of the screen of the fiducial.
- Y Translation - the Y location with respect to the center of the screen of the fiducial.
- Size - the size of the fiducial relative to that in the database.
- X Rotation - the rotation in the X axis of the fiducial (pan)
- Y Rotation - the rotation in the Y axis of the fiducial (tilt)
- Orientation - the Z rotation or angle of the fiducial (spin)
4. Box Color - You can change the match and test box color by changing the Matched Box Color and Test Box Color respectively.
5. Filter Confidence - Many candidate squares do pass the basic fiducial requirements but do not match
with a known fiducial very well. You can remove those unwanted matches by increasing the Min Confidence. This
removes bad matches from being made.
6. Filter Size - Each recognized fiducial has a scale associated with it that can be used to remove larger or smaller
matches.
7. Filter Orientation - by default fiducials are recognized in any orientation. You can use the Filter Orientation to
remove those fiducials outside of your desired orientation. For example, 15, 345 would remove any fiducial +=15 degrees
from that what is in the database.
8. Filter Threshold - you can decide on how many fiducials you want to work with. Specifying a number in the Filter
Threshold will display the best X fiducials found in the image.
9. Stabilization - When moving the camera motion blurring can cause incorrect low confidence matches to appear. By
increasing the Occurrence Threshold you are requiring a fiducial to appear and continue to appear for a set number
of frames before being reported as a match. This essentially removes the "flickering" of low matched fiducials
that can cause noise in the results. Note that if you are working with static images you will need to set this
to zero!
10. Perspective - Due to the depth of field of the camera perspective will be apparent in the fiducial square. You
need to specify what this depth of field is for your camera in order for the fiducial's angles to be extracted
correctly. The manufacturer of your camera will normally know this value. If you do not have access to this value
you can empirically determine this by placing a fiducial at a known angle to the camera (for example 45 deg X rotation)
and adjusting the depth of field FL value up or down until the X rotation correctly reads 45.
11. Variables - To use the results of the fiducial module in your own application or in other RoboRealm modules
you can select that the fiducial array be created. This array has all the collected information about a
detect fiducial. See below for the array format.
12. Display Results - By default No Change is selected which does not modify the current image in any way other
than annotating the fiducials with the above colors. If you want to use the results in other modules you can
select to see
- Colored - displays only the fiducials with their original pixel colors
- Inverted - displays everything else but the fiducial (which is blacked out).
- White Mask - white where the fiducials are, black everywhere else
- Black Mask - black where the fiducials are, white everywhere else
Example
Variables
FIDUCIALS - contains an array of detected fiducials.
The array contains blocks of 17 values per detected fiducial. The
elements are as follows:
The FIDUCIALS array is composed of 17 numbers as follows:
Offset Contents
0 Match Confidence 0-100
1 Point 1 X coordinate
2 Point 1 Y coordinate
3 Point 2 X coordinate
4 Point 2 Y coordinate
5 Point 3 X coordinate
6 Point 3 Y coordinate
7 Point 4 X coordinate
8 Point 4 Y coordinate
9 Translation in X
10 Translation in Y
11 Scale 0-100
12 Rotation in X (radians)
13 Rotation in Y (radians)
14 Orientation (Rotation in Z, radians)
15 Path start index
16 Length of path
For example, to print out all found fiducials use the VBScript module
and the following script.
fiducials = GetArrayVariable("FIDUCIALS")
names = GetStrVariable("FIDUCIALS_PATH")
if isArray(fiducials) then
if ubound(fiducials) > 0 then
for i=0 to ubound(fiducials)-1 step 17
nstart = fiducials(i+15)
nend = fiducials(i+16)
write "Conf: " & fiducials(i) & "% Path: " & _
mid(names, nstart, nend) & vbCRLF
next
end if
end if
For ease of access the most confident fiducials' information is
also available in the following variables
FIDUCIAL_CONFIDENCE - the confidence of the best matched fiducial
FIDUCIAL_NAME - the name of the matched fiducial
FIDUCIAL_FILENAME - the filename of the fiducial
FIDUCIAL_FOLDER_X - the folder sequence that the fiducial is in
(replace X with 1, 2, etc.)
FIDUCIAL_SIZE - the size of the best matched fiducial
FIDUCIAL_X_COORD - the x location relative to center screen of
the best matched fiducial
FIDUCIAL_Y_COORD - the y location relative to center screen of
the best matched fiducial
FIDUCIAL_ORIENTATION - the orientation (spin) of the best fiducial
FIDUCIAL_X_ROTATION - the x rotation (pan) of the best fiducial
FIDUCIAL_Y_ROTATION - the y rotation (tilt) of the best fiducial
See Also
Shape Matching
Blob Filter
For more information
ARToolkit (also uses fiducials!)
ARToolkit Patternmaker (compatible with RoboRealm!)
|