Track Objects allows tracking objects throughout sequential frames of a series of images, so that from frame to frame each object maintains a unique identity in the output measurements
This module must be placed downstream of a module that identifies objects (e.g.,
IdentifyPrimaryObjects).
TrackObjects will associate each object with the same object in the frames before and after. This allows the study of objects' lineages and the timing and characteristics of dynamic events in movies.
Images in CellProfiler are processed sequentially by frame (whether loaded as a series of images or a movie file). To process a collection of http://d1zymp9ayga15t.cloudfront.net/images/movies, you will need to do the following:
- Define each individual movie using metadata either contained within the image file itself or as part of the images nomenclature or folder structure. Please see the Metadata module for more details on metadata collection and usage.
- Group the movies to make sure that each image sequence is handled individually. Please see the Groups module for more details on the proper use of metadata for grouping.
For complete details, see
Help > Creating a Project > Loading Image Stacks and Movies.
For an example pipeline using TrackObjects, see the CellProfiler Examples webpage.
Available measurements
Object measurements - Label: Each tracked object is assigned a unique identifier (label). Results of splits or merges are seen as new objects and assigned a new label.
- ParentImageNumber, ParentObjectNumber: The ImageNumber and ObjectNumber of the parent object in the prior frame. For a split, each child object will have the label of the object it split from. For a merge, the child will have the label of the closest parent.
- TrajectoryX, TrajectoryY: The direction of motion (in x and y coordinates) of the object from the previous frame to the current frame.
- DistanceTraveled: The distance traveled by the object from the previous frame to the current frame (calculated as the magnitude of the trajectory vectors).
- Displacement: The shortest distance traveled by the object from its initial starting position to the position in the current frame. That is, it is the straight-line path between the two points.
- IntegratedDistance: The total distance traveled by the object during the lifetime of the object.
- Linearity: A measure of how linear the object trajectity is during the object lifetime. Calculated as (displacement from initial to final location)/(integrated object distance). Value is in range of [0,1].
- Lifetime: The number of frames an objects has existed. The lifetime starts at 1 at the frame when an object appears, and is incremented with each frame that the object persists. At the final frame of the image set/movie, the lifetimes of all remaining objects are output.
- FinalAge: Similar to LifeTime but is only output at the final frame of the object's life (or the movie ends, whichever comes first). At this point, the final age of the object is output; no values are stored for earlier frames. This is useful if you want to plot a histogram of the object lifetimes; all but the final age can be ignored or filtered out.
Image measurements
- LostObjectCount: Number of objects that appear in the previous frame but have no identifiable child in the current frame.
- NewObjectCount: Number of objects that appear in the current frame but have no identifiable parent in the previous frame.
- SplitObjectCount: Number of objects in the current frame that resulted from a split from a parent object in the previous frame.
- MergedObjectCount: Number of objects in the current frame that resulted from the merging of child objects in the previous frame.
See also: Any of the Measure modules, IdentifyPrimaryObjects, Groups.
Settings:
Choose a tracking method
When trying to track an object in an image,
TrackObjects will search within a maximum
specified distance (see the
distance within which to search setting)
of the object's location in the previous image, looking for a "match".
Objects that match are assigned the same number, or label, throughout the
entire movie.
There are several options for the method used to find a match. Choose
among these options based on which is most consistent from frame
to frame of your movie.
- Overlap: Compares the amount of spatial overlap between identified objects in
the previous frame with those in the current frame. The object with the
greatest amount of spatial overlap will be assigned the same number (label). Recommended
when there is a high degree of overlap of an object from one frame to the next,
which is the case for movies with high frame rates relative to object motion.
- Distance: Compares the distance between each identified
object in the previous frame with that of the current frame. The
closest objects to each other will be assigned the same number (label).
Distances are measured from the perimeter of each object. Recommended
for cases where the objects are not very crowded but where Overlap
does not work sufficiently well, which is the case
for movies with low frame rates relative to object motion.
- Measurements: Compares each object in the
current frame with objects in the previous frame based on a particular
feature you have measured for the objects (for example, a particular intensity or shape measurement that can distinguish nearby objects). The object
with the closest-matching measurement will be selected as a match and will be
assigned the same number (label). This selection requires that you run the
specified Measure module previous to this module in the pipeline so
that the measurement values can be used to track the objects.
- LAP: Uses the linear assignment problem (LAP) framework. The
linear assignment problem (LAP) algorithm (Jaqaman et al., 2008)
addresses the challenges of high object density, motion heterogeneity,
temporary disappearances, and object merging and splitting.
The algorithm first links objects between consecutive frames and then links
the resulting partial trajectories into complete trajectories. Both steps are formulated
as global combinatorial optimization problems whose solution identifies the overall
most likely set of object trajectories throughout a movie.
Tracks are constructed from an image sequence by detecting objects in each
frame and linking objects between consecutive frames as a first step. This step alone
may result in incompletely tracked objects due to the appearance and disappearance
of objects, either in reality or apparently because of noise and imaging limitations.
To correct this, you may apply an optional second step which closes temporal gaps
between tracked objects and captures merging and splitting events. This step takes
place at the end of the analysis run.
References
- Jaqaman K, Loerke D, Mettlen M, Kuwata H, Grinstein S, Schmid SL, Danuser G. (2008)
"Robust single-particle tracking in live-cell time-lapse sequences."
Nature Methods 5(8),695-702.
(link)
- Jaqaman K, Danuser G. (2009) "Computational image analysis of cellular dynamics:
a case study based on particle tracking." Cold Spring Harb Protoc. 2009(12):pdb.top65.
(link)
Select the objects to track
Select the objects to be tracked by this module.
Select object measurement to use for tracking
(Used only if Measurements is the tracking method)
Select which type of measurement (category) and which specific feature from the
Measure module will be used for tracking. Select the feature name from
the popup box or see each Measure module's help for the list of
the features measured by that module. If necessary, you will also be asked
to specify additional details such as the
image from which the measurements originated or the measurement scale.
Maximum pixel distance to consider matches
Objects in the subsequent frame will be considered potential matches if
they are within this distance. To determine a suitable pixel distance, you can look
at the axis increments on each image (shown in pixel units) or
use the distance measurement tool. To measure distances in an open image, use the "Measure
length" tool under Tools in the display window menu bar. If you click on an image
and drag, a line will appear between the two endpoints, and the distance between them shown at the right-most
portion of the bottom panel.
Select display option
The output image can be saved as:
- Color Only: A color-labeled image, with each tracked
object assigned a unique color
- Color and Number: Same as above but with the tracked object
number superimposed.
Save color-coded image?
Select
Yes to retain the image showing the tracked objects
for later use in the pipeline. For example, a common use is for quality control purposes
saving the image with the
SaveImages module.
Please note that if you are using the second phase of the LAP method,
the final labels are not assigned until after the pipeline has
completed the analysis run. That means that saving the color-coded image
will only show the penultimate result and not the final product.
.
Name the output image
(Used only if saving the color-coded image)
Enter a name to give the color-coded image of tracked labels.
Select the motion model
(Used only if the LAP tracking method is applied)
This setting controls how to predict an object's position in
the next frame, assuming that each object moves randomly with
a frame-to-frame variance in position that follows a Gaussian
distribution.
- Random: A model in which objects move due to
Brownian Motion or a similar process where the variance in position
differs between objects. Use this model if the objects move with some
random jitter around a stationary location.
- Velocity: A model in which the object moves with
a velocity. Both velocity and position (after correcting for
velocity) vary following a Gaussian distribution. Use this model if
the objects move along a spatial trajectory in some direction over time.
- Both: TrackObjects will predict each
object's position using both models and use the model with the
lowest penalty to join an object in one frame with one in another. Use this
option if both models above are applicable over time.
Number of standard deviations for search radius
(Used only if the LAP tracking method is applied)
TrackObjects will estimate the variance of the error
between the observed and predicted positions of an object for
each movement model. It will constrain the search for matching
objects from one frame to the next to the standard deviation
of the error times the number of standard
deviations that you enter here.
Search radius limit, in pixel units (Min,Max)
(Used only if the LAP tracking method is applied)
Care must be taken to adjust the upper limit appropriate to the data.
TrackObjects derives a search radius based on the error
estimation. Potentially, the module can make an erroneous assignment
with a large error, leading to a large estimated error for
the object in the next frame. Conversely, the module can arrive
at a small estimated error by chance, leading to a maximum radius
that does not track the object in a subsequent frame. The radius
limit constrains the maximum radius to reasonable values.
The lower limit should be set to a radius (in pixels) that is a
reasonable displacement for any object from one frame to the next.
The upper limit should be set to the maximum reasonable
displacement under any circumstances.
Run the second phase of the LAP algorithm?
(Used only if the LAP tracking method is applied)
Select
Yes to run the second phase of the LAP algorithm
after processing all images. Select
No to omit the
second phase or to perform the second phase when running the module
as a data tool.
Since object tracks may start and end not only because of the true appearance
and disappearance of objects, but also because of apparent disappearances due
to noise and limitations in imaging, you may want to run the second phase
which attempts to close temporal gaps between tracked objects and tries to
capture merging and splitting events.
For additional details on optimizing the LAP settings, refer to Jaqaman K, Danuser G.
"Computational image analysis of cellular dynamics: a case study based on particle
tracking." Cold Spring Harb Protocols 2009(12)
(link),
in particular the section "Adjustment of control parameters and
diagnostics for track evaluation."
Gap cost
(Used only if the LAP tracking method is applied and the second phase is run)
This setting assigns a cost to keeping a gap caused
when an object is missing from one of the frames of a track (the
alternative to keeping the gap is to bridge it by connecting
the tracks on either side of the missing frames).
The cost of bridging a gap is the distance, in pixels, of the
displacement of the object between frames.
Recommendations:
- Set the gap cost higher if tracks from objects in previous
frames are being erroneously joined, across a gap, to tracks from
objects in subsequent frames.
- Set the cost lower if tracks
are not properly joined due to gaps caused by mis-segmentation.
Split alternative cost
(Used only if the LAP tracking method is applied and the second phase is run)
This setting is the cost of keeping two tracks distinct
when the alternative is to make them into one track that
splits. A split occurs when an object in one frame is assigned
to the same track as two objects in a subsequent frame.
The split cost takes two components into account:
- The area of the split object relative to the area of
the resulting objects.
- The displacement of the resulting
objects relative to the position of the original object.
The split cost is roughly measured in pixels. The split alternative cost is
(conceptually) subtracted from the cost of making the split.
Recommendations:
- The split cost should be set lower if objects are being split
that should not be split.
- The split cost should be set higher if objects
that should be split are not.
Merge alternative cost
(Used only if the LAP tracking method is applied and the second phase is run)
This setting is the cost of keeping two tracks
distinct when the alternative is to merge them into one.
A merge occurs when two objects in one frame are assigned to
the same track as a single object in a subsequent frame.
The merge score takes two components into account:
- The area of the two objects
to be merged relative to the area of the resulting objects.
- The displacement of the original objects relative to the final
object.
The merge cost is measured in pixels. The merge
alternative cost is (conceptually) subtracted from the
cost of making the merge.
Recommendations:
- Set the merge alternative cost lower if objects are being
merged when they should otherwise be kept separate.
- Set the merge alternative cost
higher if objects that are not merged should be merged.
Maximum gap displacement, in frames
(Used only if the LAP tracking method is applied and the second phase is run)
This setting acts as a filter for unreasonably large
displacements during the second phase.
Recommendations:
- The maximum gap displacement should be set to roughly
the maximum displacement of an object's center from frame to frame. An object that makes large
frame-to-frame jumps should have a higher value for this setting than one that only moves slightly.
- Be aware that the LAP algorithm will run more slowly with a higher maximum gap displacement
value, since the higher this value, the more objects that must be compared at each step.
- Objects that would have been tracked between successive frames for a lower maximum displacement
may not be tracked if the value is set higher.
Maximum split score
(Used only if the LAP tracking method is applied and the second phase is run)
This setting acts as a filter for unreasonably large
split scores. The split score has two components:
- The area of the initial object relative to the area of the
two objects resulting from the split.
- The distances between the original and resulting objects.
Recommendations:
- The LAP algorithm will run more slowly with a maximum split score value.
- Objects that would have been split at a lower maximum split score will not be considered for splitting.
Maximum merge score
(Used only if the LAP tracking method is applied and the second phase is run)
This setting acts as a filter for unreasonably large
merge scores. The merge score has two components:
- The area of the resulting merged object relative to the area of the
two objects to be merged.
- The distances between the objects to be merged and the resulting object.
Recommendations:
- The LAP algorithm will run more slowly with a higher maximum merge score value.
- Objects that would have been merged at a lower maximum merge score will not be considered for merging.
Maximum gap
(Used only if the LAP tracking method is applied and the second phase is run)
Care must be taken to adjust this setting appropriate to the data.
This setting controls the maximum number of frames that can
be skipped when merging a gap caused by an unsegmented object.
These gaps occur when an image is mis-segmented and identification
fails to find an object in one or more frames.
Recommendations:
- Set the maximum gap higher in order to have more chance of correctly recapturing an object after
erroneously losing the original for a few frames.
- Set the maximum gap lower to reduce the chance of erroneously connecting to the wrong object after
correctly losing the original object (e.g., if the cell dies or moves off-screen).
Filter objects by lifetime?
Select
Yes if you want objects to be filtered by their
lifetime, i.e., total duration in frames. This is useful for
marking objects which transiently appear and disappear, such
as the results of a mis-segmentation.
Recommendations:
- This operation does not actually delete the filtered object,
but merely removes its label from the tracked object list;
the filtered object's per-object measurements are retained.
- An object can be filtered only if it is tracked as an unique object.
Splits continue the lifetime count from their parents, so the minimum
lifetime value does not apply to them.
Filter using a minimum lifetime?
(Used only if objects are filtered by lifetime)
Select Yes to filter the object on the basis of a minimum number of frames.
Minimum lifetime
Enter the minimum number of frames an object is permitted to persist. Objects
which last this number of frames or lower are filtered out.
Filter using a maximum lifetime?
(Used only if objects are filtered by lifetime)
Select Yes to filter the object on the basis of a maximum number of frames.
Maximum lifetime
Enter the maximum number of frames an object is permitted to persist. Objects
which last this number of frames or more are filtered out.