other:dsx:locate3d:tutorials:track_objects_using_points_of_interest
Track Objects using Points of Interest
Before you can use Locate3D to track objects using points of interest, you must first use other DSX programs to define certain elements of the object:
- Use Surface3D to digitize the bead locations in the object's image data. These will be stored as points of interest (POIs) in the subject file, with the 3D coordinates expressed in the image data's reference frame. See the wiki entry for the **Points of Interest** widget in Surface3D for more details. You need at least three points of interest in each object you want to track.
- Use xManager to modify the radius and color of each POI. The radius is the radius of the physical bead, in the image data units (usually mm). It is important to set the bead size correctly because Locate3D uses it to determine how big the bead should appear in the X-ray images. The POI color is used in the Locate3D graphical interface to make it easier to distinguish between the POIs.
- Use Orient3D to define a local coordinate system for the object, using the object's surface model. When Locate3D computes the object poses from the POI locations, the poses will be expressed as the transform from the X-ray lab frame to the object's local coordinate system (LCS). Follow this tutorial for more details: How To: Define the LCS of an Object.
You are now ready to use Locate3D:
- Launch Locate3D and load the subject file.
- Select the appropriate session, configuration, and trial.
- Select the object you want to track.
- Use the time slider to go to a reporting time where the beads are easy to identify.
- Digitize all the beads for the object at this reporting time. See the How To: Digitize Points of Interest tutorial for instructions on how to do this.
- Go to the next reporting time and digitize all of the beads.
- Go to a third reporting time near or next to the first two and digitize all of the beads.
- You now have three time stamps of POI poses. If the bead motion is not too fast or abrupt, and the beads are not too close together, you can try to have Locate3D automatically locate the beads in the other X-ray frames. Realistically, you will probably need to digitize them in more key frames throughout the trial in order to have Locate3D auto-identify them in all of the remaining frames.
- Try using the auto-identification feature (called propagation) on a small range of reporting times. In the **Points of Interest** widget, set the Propagate Range to a range of 10 to 15 reporting times surrounding the times you just digitized.
- Select Tools→Propagate POIs. For each POI in the object, Locate3D will fit GCV splines to the XYZ coordinates of its existing poses and then for each reporting time in the range that does not already have a pose, the splines will be interpolated to calculate a predicted location of the POI. The neighborhood around this point is then searched for the optimal POI center, as described in the wiki entry for this command.
- Scroll through the frames and check the results. If you need to delete POI poses, open the **POI Graphs** widget and select and delete the bad poses. To display a POI's poses in the graphs, check its graph checkbox in the **Points of Interest** widget. See the wiki entry for the **POI Graphs** widget for details on how to select and delete poses from the graphs.
- If propagation worked well, increase the range and propagate over the additional reporting times. If it did not work well, you can:
- change the value of the //Propagation Search Factor// parameter
- manually digitize the beads for more reporting times, in order to improve the spline interpolation
- Once you have tracked the POIs in all of the frames, save their 2D locations (in the X-ray images) and 3D locations (in the X-ray lab frame) using the File→Save POI Locations command.
- You are now ready to compute object poses. For each reporting time that you tracked, you have a set of bead coordinates in the object's local coordinate system (these are stored in the subject file) and a set of bead coordinates in the X-ray lab frame (that you just digitized). Locate3D uses a least-squares algorithm to calculate the transform from one set of coordinates to the other. This gives the pose of the object's local coordinate system in the X-ray lab frame. To run this algorithm, select Tools→Compute Object Poses From POIs.
- Save the object poses to a text file. Select File→Save Object Poses. You can also use the Save Object Transforms command to save the poses as 4×4 transforms.
- Save the subject file with links to all of the newly created data files. Select File→Save Subject.
other/dsx/locate3d/tutorials/track_objects_using_points_of_interest.txt · Last modified: 2024/07/17 11:44 by sgranger