ARToolKit NFT is able to recognize and track natural features of photos and documents, specifically, **planar textured surfaces**. However, to accomplish this, ARToolKit NFT requires that the visual appearance of the surface is known in advance. Thus, the system has to be trained with a surface in advance to recognize and track the surface. The output of this training is a set of data that can be used for realtime tracking in application using the ARToolKit SDK.
The following constraints apply to surfaces which can be used with ARToolKit NFT.
The ARToolKit NFT tracker, does not require augmenting the image with Natural Feature Tracking with Fiducial Markers to implement NFT tracking. But, for increased efficiency and robustness, fiducial markers can be used along with NFT markers as part of the dataset when using the NFT tracker.
A good example of an NFT image is “pinball.jpg” (found under the path: [downloaded ARToolKit SDK root directory]/doc/Marker images).
The NFT tracker works by looking for a known feature points defined by a dataset, which is a representative descriptor of the image you want to track. This section will guide you to producing a high-quality soft-copy image for NFT tracking.
Care must be taken to ensure that the image supplied to the training tools is not too big (wasteful of memory, disk and CPU during tracking) and not too small (of insufficient detail to allow tracking when the camera is close to the image). Whether starting from a pre-existing print, or a soft-copy image, the considerations for resolution and target size are the same:
For example, borderless A4 at 150 dpi is 1240 pixels wide and 1754 pixels tall. Borderless US Letter at 150 dpi is 1275 pixels wide and 1650 pixels tall. If producing from digital artwork at 1:1 scale, you can use image size from that artwork.
If the measurements are in millimeters, you can convert to inches by dividing by 25.4 millimeters per inch:
inches = millimeters / 25.4 millimeters per inch
In many cases, it may be simplest to start with a hardcopy image of the surface to be tracked. Further considerations for starting with a hardcopy image:
If using a scanner or camera that needs a “resolution” setting, you can just directly use the maximum resolution calculated by the checkResolution tool (found under the path: [downloaded ARToolKit SDK root directory]/bin).
If using a scanner or camera that expresses resolution in terms of dots per inch, calculate the required pixel resolution. The calculation:
width in pixels = width in inches * dots per inch height in pixels = height in inches * dots per inch
If using a scanner or camera that requires a “megapixels” setting, calculate the required width and height in pixels (above) , then multiply these together and divide the result by 1,000,000. Example:
640 width in pixels * 480 height in pixels = 307,200 pixels of resolution 307,200 pixels / 1,000,000 pixels/megapixel = ~0.31 megapixels of resolution
After scanning or photography is completed, check that the resulting digital image is not blurred and has sufficient contrast. Washed-out blurry images work very poorly in the NFT training process.
Using soft-copy digital artwork as input to the training process versus using the printed hardcopy of the digital art can result in significant differences in trained features that will reduce the robustness of the tracking of the final hardcopy surface. Also, if the scale of the artwork soft-copy used in the training process differs from the scale of the final hardcopy surface used for tracking, misleading tracking can result. Therefore, it's recommended to start the training process by printing the digital artwork soft-copy and use the resulting printed hardcopy as the eventual input soft-copy image for the training process.
Producing the digital image for tracking from pre-existing digital artwork is simple. First print the digital artwork referring to the two previous sections. After printing your digital artwork, check that the print is the correct size. Also, check that the print matches the artwork in terms of contrast, absence of print defects, etc.
Now that you have an image you wish to use with NFT, you must create the dataset (train the image). Surface training uses NFT Utilities for ARToolKit included in the ARToolKit package. These utilities must be run from the command line. On Linux / OS X open a terminal window and cd to the bin directory. On Windows, this means you must open a “cmd” console and cd to the bin directory.
Most of the operation of the training utility programs proceeds without much input from the user, but there is one important decision required prior to starting the training utility; that is selecting the resolutions at which features of the image will be extracted. (Generally, features are extracted at three or more resolutions to cope with the fact that dots in the image will appear at different resolution to the software depending on how close or far away the camera is from the image.)
For a typical webcam operating at VGA (640×480) resolution and tracking at handheld-distance from the surface, a range of resolutions between 20 dpi and 120 dpi is a good starting point. If using a higher-resolution webcam or tracking much closer to the surface, higher resolutions will be required. Note: that there is no point in using resolutions higher than the actual resolution of the final printed surface!
The utility application “NFT Utilities for ARToolKit” (found under the path: [downloaded ARToolKit SDK root directory]/bin) can help with the decision of what values to use as minimum and maximum resolutions.
After completing a training pass, it will pay to come back to the choice of image set resolutions and experiment with different minimum and maximum resolutions. The choice depends greatly on the way in which you intend to use ARToolKit for tracking, and your source images.
If you have further questions, you should ask questions to the ARToolKit community on the forum.
The same NFT dataset generation tools are shared between all supported ARToolKit desktop and mobile platforms. Dataset generation is performed using a single integrated tool “”NFT Utilities for ARToolKit“”.
After setting any required video configuration, launch the genTexData tool:
In the first step, the source image is resampled at multiple resolutions, generating an image set (.iset) file. This contains raw image data that will be loaded into the app at runtime for tracking.
You may be prompted for the source image resolution, as well as the range of resolutions you wish to use for tracking. (See the preceding section for advice on how to choose a good set of resolutions to use.) Enter the minimum and maximum resolutions at the terminal prompt. You can enter decimal values (numbers with a '.'). These values can also be manually specified on the command line. (See the list of command line options below.)
Once the image set and feature sets have been generated, you can use the NFT Utilities for ARToolKit utilities to examine the output of the training process.
By examining the output of dispFeatureSet, you can immediately see a number of things about the image used:
The easiest means of testing NFT datasets you have trained in live tracking is to run them using the nftSimple - NFT Example program.
Whether working from supplied printed material or a print from digital artwork, eventually the user needs an actual surface to hold in front of the camera to recognize and track the trained image.
The soft-copy image is printed using a high-quality color printer, on low-gloss paper. It is important that the image surface is kept as flat as possible. Small amounts of curvature can be coped with by the tracker to some degree, but flat is best. Where possible, the print should be on or affixed to a physical prop that keeps it flat.
For Example: If you were printing a label to be attached to a product, the label should be applied to a flat area of the product. The curved surface of a bottle or can would not be suitable, and alternatives could include the packaging holding the bottle or can, or on a flat label or tag attached to the product. If mounting in a book, surfaces should be printed on heavy card and bound with board-book, ring or spiral binding. If used as an unbound card, affix to the card with a dry glue (e.g. a glue stick or an industrial dry adhesive).
Last modified: 2016/02/15 05:41 (external edit)