Visual Anchor
Similar to the Stabilize module, the Visual Anchor module provides a stabilization functionality used specifically for targeting scenes.The Visual Anchor module will align current images with a targeted image taken as soon as the module is inserted or when the Re-Target button is pressed. The result of the alignment is then set into variables that can be used in other modules. These variables can then be used to steer the robot directly towards the target, stop at a certain zoom factor, or just keep the servo head pointing in the same direction.
Interface
Instructions
1. Correct X translation - aligns the current image to the target image along the X axis/horizontal direction.
2. Correct Y translation - aligns the current image to the target image along the Y axis/vertical direction.
3. Correct Rotation - aligns the current image to the target image around the Z axis/rotational direction.
4. Correct Scale - aligns the current image to the target image along the Z axis/zoom direction.
5. Trigger Re-Target - specify which variable will contain a non zero/false value that when present will trigger a new target anchor to be acquired from the current image stream. This variable will immediately be set to "" once the trigger has executed and a new target has been selected. This resets the variables to zero.
6. Trigger Re-Acquire - specify which variable will contain a non zero/false value that when present will trigger a new offset to be set from the current image stream. This variable will immediately be set to "" once the trigger has executed and a new image has been acquired. This is functionally the same as re-target but does NOT set the variables to zero. This allows you to grab fresh images from the camera but still keep the original target offsets in mind. This is useful when extreme rotation or scale cause the original target to have little overlapping pixels with the current image.
7. Align Image to Target - select this checkbox if you want the current image to be aligned with the target image. This causes the current image to undergo translation, rotation, scale and zoom transforms in order to best align with the original target image.
8. Flash Target Image - if you would like to see the original target in the context then select the "Flash Target Image" checkbox. The original target will flash every 1 second to show how the current image aligns with the target image.
9. Show Target Box - draws a box that represents where the target image is within the currently viewed image. It makes best sense if the "Align Image to Target" is off.
10. Show Target as - draws a shape in a specific color at the center of the target image.
11. Connect Target to Center of Screen - draws a line from the target offset to the current screen center.
Performance Note
This module can require a significant amount of computation in order to align images correctly. To improve performance use smaller images or remove some of the alignment criteria. For example, if you are using the Visual_Anchor module in a robot traveling on the ground with a camera pointing forward you may be able to remove the Y and Rotational alignment as the robot only moves around the planar floor and does not rotate. This will help to improve performance.
Example
Target | Current |
Aligned (gray is target) | Current |
First test: Switch on your camera, insert the module, press Re-Target and then move your camera slowly. Notice the black areas around the image that are the artifacts of the alignment process? Try rotating the camera and notice the image stays the right way up!
Click here to load a configuration to move the Traxster Robot forward until the scene scale is 2x. You will have to edit the Traxster module and specify your appropriate COM port AND edit the Visual Anchor and press Re-Target when the Traxster is positioned where you want it to move forward.
Click here to load a configuration that will track the X axis movement as you twist the camera. This process can be used as a visual compass to tell how far you have turned. We found 90' to be around 600 pixels.
Variables
ANCHOR_X - the X pixel translation is needed from current to target ANCHOR_Y - the Y pixel translation is needed from current to target ANCHOR_ROTATION - the rotation in degrees (0-360) needed from current to target ANCHOR_SCALE - the scaling needed from current to target. 1.0 is no scale.
See Also
Stabilize
Align_Image
New Post |
Visual_Anchor Related Forum Posts | Last post | Posts | Views |
Visual Anchor values jump on Re-Acquire
Visual Anchor re-acquire produces jumps in the anchor numbers. I tried to upload an AVI demonstrating this but it kept hanging s... |
11 year | 2 | 2536 |
Panorama
STeven, I am so impressed with your product and support. This program is exactly what I needed for... |
13 year | 2 | 3234 |
\"Virtual Reality\"
I was wondering if there is anyway to create a "virtual reality" system. I want to start very simple. I... |
13 year | 6 | 4358 |
Variable Values on VBScript
Hello, I am doing a visual odometry for 3 robots with a camera (determinate the X,Y,theta - positio... |
14 year | 14 | 6858 |
visual anchor
Hi Stephen, I wanted to ask you before I try something that I may tie myself in a knot over to get your input.&nbs... |
15 year | 12 | 4562 |
Motion Detection
Hi, Is it possible to have a displacement estimation between two frame with the roboreal... |
15 year | 2 | 3435 |
Image Module Problem
Hello Steven, [image1] [image2] I’m trying to align/regi... |
15 year | 9 | 4786 |
Forum image upload seems to fail
Hello STeven, I can't seem to get any of my jpeg fil... |
15 year | 4 | 3513 |
Just a test for image transfer sizes
This is only a test. [image1]... |
15 year | 2 | 3560 |