loading

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 is 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. If you would like training to happen automatically whenever a file is added, updated or deleted from the specified folder select the 'Monitor Folder' checkbox.

2. Display - Fiducials that are found will be highlighted in the main RoboRealm window. Matches are displayed as green and 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. 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 that 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 of the fiducial with respect to the center of the screen of the fiducial.
  • Y Translation - the Y location of the fiducial 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 of the fiducial in the X axis of the fiducial (tilt)
  • Y Rotation - the rotation of the fiducial in the Y axis of the fiducial (pan)
  • Orientation - the Z rotation or angle of the fiducial (spin)
  • Contrast - range between lowest and highest intensity value within fiducial. The higher the better.

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/X/Y - 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. You can use the X and Y rotation filters to remove fiducials that are rotated into the image plan (i.e. slightly twisted or flipped).

8. Filter Threshold - you can decide 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. Filter Contrast - As the module attempts to ignore lighting as much as possible it is capable of pulling in fiducial matches that have very little contrast. Using the contrast filter can help to remove those false recognitions by ensuring that enough contrast exists in the fiducial before attempting recognition.

11. Field of View - In order to provide accurate distance information the module needs to know how large a field of view the camera can see. If you do not know this value, hold the fiducial at a known distance from the camera and adjust the field of view until the distance is correct. Note that this is the Vertical Field of View.

12. Focal Length - Due to the focal length of the camera, perspective will be apparent in the fiducial square. You need to specify what this focal length 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 out of plane angle to the camera (for example 45 deg X rotation) and adjusting the focal length FL value up or down until the X rotation correctly reads 45.

13. Focal Length Error Color - When a fiducial is detected and matches but cannot create a correct parameterization of the fiducial (i.e. what rotations, translations, perspective is the fiducial experiencing) the module will NOT record the fiducial and display the specified error color around the Fiducial. When this happens, you will need to review your focal length setting as this is often the cause of the parameterization failure. This is typically experienced with Fiducials that are rotated out of plane (X or Y axis) where perspective becomes apparent and the correct FL setting becomes required.

14. Physical Fiducial Width/Height - In order to determine the distance to the fiducial the actual size (in whatever units you want the distance to be) needs to be entered. For example, if you print out a fiducial such that it takes up most of a page, then the actual measurement would be around 7 inches. You can simply use a ruler to measure the actual size (width and height are normally the same) and enter those measurements. If you enter inches then the distance value will also be in inches, if you enter meters, then the distance value will also be in meters.

15. 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 detected fiducial. See below for the array format.

16. 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

Notes

Parameters

Why do you need to enter in both Camera Field of View and Focal Length? Are they not related to each other? Yes they are, the issue is that in order to relate them we'd need to know the actual sensor size in your camera (e.g. a 35mm camera has a film size of 35mm). As this is difficult to know, having both parameters estimated using the actual camera and known angle/distance of the fiducial is an easier approach.

Recognition

One assumption the module makes is that the Fiducial can be extracted from the rest of the image reliably. This can sometimes fail in the simplest of ways and care should be taken to understand what might cause recognition to fail. In the most common case, there might be something in front or on the fiducial which is subtle enough to seem trivial but causes the image segmentation to fail. For example, the following two images are very similar but the first will occasionally fail detection due to the clip that is of similar dark color to the fiducial which causes the inner fiducial dark area to become connected to outside the fiducial. This breaks the rule of needing a white border around the fiducial.

Bad Good

Examples

SourceFiducial
Download a zip file that includes training data and example robofile for the above image examples.

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 largest fiducial's information is
also available in the following variables

FIDUCIAL_CONFIDENCE - the confidence of the best matched fiducial
FIDUCIAL_CONTRAST - the amount of contrast in the fiducial
FIDUCIAL_DISTANCE - the distance to the fiducial given the specified camera properties
FIDUCIAL_FILENAME - the filename of the fiducial
FIDUCIAL_FOLDER_X - the folder sequence that the best fiducial is in (replace X with 1, 2, etc.)
FIDUCIAL_NAME - the name of the matched fiducial
FIDUCIAL_ORIENTATION - the orientation (spin) of the best fiducial
FIDUCIAL_PATH - a string array of all the names of matched fiducials as specified by entry #15 in
                the FIDUCIALS array
FIDUCIAL_SIZE - the size of the best matched fiducial
FIDUCIAL_WIDTH - the width of the best matched fiducial
FIDUCIAL_HEIGHT - the height of the best matched fiducial
FIDUCIAL_X1_COORD - x coordinate of first box corner of the best matched fiducial
FIDUCIAL_X2_COORD - x coordinate of second box corner of the best matched fiducial
FIDUCIAL_X3_COORD - x coordinate of third box corner of the best matched fiducial
FIDUCIAL_X4_COORD - x coordinate of fourth box corner of the best matched fiducial
FIDUCIAL_X_COORD - the x location relative to center screen of the best matched fiducial
FIDUCIAL_X_ROTATION - the x rotation (tilt) of the best fiducial
FIDUCIAL_X_TRANS - x axis translation of the fiducial
FIDUCIAL_Y1_COORD - y coordinate of first box corner of the best matched fiducial
FIDUCIAL_Y2_COORD - y coordinate of second box corner of the best matched fiducial
FIDUCIAL_Y3_COORD - y coordinate of third box corner of the best matched fiducial
FIDUCIAL_Y4_COORD - y coordinate of fourth box corner of the best matched fiducial
FIDUCIAL_Y_COORD - the y location relative to center screen of the best matched fiducial
FIDUCIAL_Y_ROTATION - the y rotation (pan) of the best fiducial
FIDUCIAL_Y_TRANS - y axis translation of the fiducial

FIDUCIAL_CONFIDENCE_ARRAY - an array of confidence values of all matched fiducials
FIDUCIAL_CONTRAST_ARRAY - an array of contrast values of all matched fiducials
FIDUCIAL_DISTANCE_ARRAY - an array of distance to the fiducial given the specified camera
                          properties of all matched fiducials
FIDUCIAL_NAME_ARRAY - an array of all the names of matched fiducials
FIDUCIAL_ORIENTATION_ARRAY - an array containing the orientation (spin) of the all matched fiducials
FIDUCIAL_SIZE_ARRAY - an array containing the size of the all matched fiducials
FIDUCIAL_WIDTH_ARRAY - an array containing the width of the all matched fiducial
FIDUCIAL_HEIGHT_ARRAY - an array containing the height of the all matched fiducial
FIDUCIAL_X1_COORD_ARRAY - an array containing x coordinate of first box corner of all matched fiducials
FIDUCIAL_X2_COORD_ARRAY - an array containing x coordinate of second box corner of all matched fiducials
FIDUCIAL_X3_COORD_ARRAY - an array containing x coordinate of third box corner of all matched fiducials
FIDUCIAL_X4_COORD_ARRAY - an array containing x coordinate of fourth box corner of all matched fiducials
FIDUCIAL_X_COORD_ARRAY - an array containing the x location relative to center screen of all matched
                         fiducials
FIDUCIAL_X_ROTATION_ARRAY - an array of the x rotation (tilt) of all matched fiducials
FIDUCIAL_X_TRANS_ARRAY - an array of the x axis translation of all matched fiducials
FIDUCIAL_Y1_COORD_ARRAY - an array containing y coordinate of first box corner of all matched fiducials
FIDUCIAL_Y2_COORD_ARRAY - an array containing y coordinate of second box corner of all matched fiducials
FIDUCIAL_Y3_COORD_ARRAY - an array containing y coordinate of third box corner of all matched fiducials
FIDUCIAL_Y4_COORD_ARRAY - an array containing y coordinate of fourth box corner of all matched fiducials
FIDUCIAL_Y_COORD_ARRAY - an array containing the y location relative to center screen of all matched
                         fiducials
FIDUCIAL_Y_ROTATION_ARRAY - an array of the y rotation (pan) of all matched fiducials
FIDUCIAL_Y_TRANS_ARRAY - an array of the y axis translation of all matched fiducials

See Also


Shape Matching
Blob Filter

For more information


ARToolkit (also uses fiducials!)
ARToolkit Patternmaker (compatible with RoboRealm!)

 New Post 

Fiducial Related Forum PostsLast postPostsViews
circular dot pattern fiducial
I am trying to use a circle pattern as a fiducial. I can not seem to get RR to match this. The circles are back li...
6 year 0 1497
dot pattern match
I am trying to use a circle pattern as a fiducial. I can not seem to get RR to match this. The circles are back li...
6 year 0 1363
Fiducials - 32/64 bit windows
When I run Fiducial module over [Example.jpg] on 64-bit Windows 7 ... I get 3 fiducials found and "findings" are "stable" (in ea...
7 year 11 2401
Fiducial Module Causes RR to Crash
I have several problems with the fiducial module.  I created a simple robo file that contains only one entry, which is...
7 year 0 1627
fiducial module - issues getting practical results
Hi guys, I have a personal license and I've just bought a commercial license for a particular appli...
8 year 7 2599
How to overlay one pet
Hi, i would like to know how would be possible to make a text overline over a pet, a dog for example. How can i do that?
8 year 2 2256
Fiducial array with two fiducials - issue
I am attempting to read the array variables from the fiducial array module. When a single fiducial is present, the...
8 year 6 2721
Get distance of multiple Fiducials
Hello, I am currently working on a robot which uses cameras and fiducials on the wall to localize i...
9 year 2 2621
Challenges with fiducial recognition when on the ground
We are having trouble getting the Fiducial marker module to recognize markers that are on the ground.  We have been ab...
10 year 3 2567
the magic behind Fiducial
I am curious about the algorithm behind the recognition of Fiducials. What visual features have been extracted, and can we use n...
10 year 2 2700
Fiducial Orientation.
Hi, We are testing RR (v 2.50.31) for fiducial recognition and we have a problem with the Orientati...
11 year 5 3642