← Computer Vision for EveryoneToolsInVisionLearning Center
Video Tracking · Lesson 42

Associate Detections Through Time

Two cars cross in the camera view.

Read the full lesson and open its transcript below. A narrated video will be added after production.

Lesson overview

What you will learn

Two cars cross in the camera view.

  1. A practical question
  2. The useful idea
  3. Work through the example
  4. Limits and next step
01

A practical question

Three cars appear in one frame and three in the next. Which new box belongs to which earlier car? Association uses evidence such as predicted position, box overlap, and visual appearance to link observations.

02

The useful idea

If two cars cross, nearest position alone can swap their identities. If a car is briefly hidden, overlap may vanish even though the car returns. A motion prediction helps, but it must be checked against the real scene and timestamps.

03

Work through the example

Draw each proposed track in a different color over several frames. Look closely when cars pass each other or one turns into a parking bay. A plausible path on one frame pair can still produce an identity switch over the sequence. Suppose two similar cars pass near each other. The closest box in the next frame is not automatically the same car; motion direction and appearance can help, but both can be uncertain. Draw predicted locations for each track and compare them with the new detections. Leave an identity unresolved if the evidence is weak. An incorrect assignment can persist for many frames, so a cautious gap may be better than a neat but false continuous trail. Now check the idea on a concrete example: Compare predicted positions and visual similarity before assigning track IDs. A possible trap is worth naming: The nearest box can belong to the wrong car during a crossing. This supports a careful conclusion: Data association links a new detection to a previous track using motion and appearance evidence. At the crossing, follow each car's position in several frames before assigning a continuing label. A visually similar neighbor may be closer for one instant. Mark an uncertain identity rather than forcing the system to draw a smooth but false path.

04

Limits and next step

Record the association rule and ambiguous intervals. Next, we'll plan what the tracker should do when an object is missed or temporarily hidden.

Worked example

Compare predicted positions and visual similarity before assigning track IDs.

Knowledge check

Quick check: test your understanding

Try it yourself: Consider this case: Compare predicted positions and visual similarity before assigning track IDs. Explain how you would check the result. In your answer, address this limitation: The nearest box can belong to the wrong car during a crossing.

Check the reasoning

Data association links a new detection to a previous track using motion and appearance evidence. The nearest box can belong to the wrong car during a crossing.

What is the main idea behind associate detections through time?

Data association links a new detection to a previous track using motion and appearance evidence.

How is it used in the example?

Compare predicted positions and visual similarity before assigning track IDs.

What limitation should be checked?

The nearest box can belong to the wrong car during a crossing.

Further reading

Programming Computer Vision with Python — Jan Erik Solem.

Original ToolsInVision teaching examples. Editorial approach · Suggest a correction

Accessible referenceLesson 42 transcript311 words · Narration ready for the upcoming videoOpen transcript

Three cars appear in one frame and three in the next. Which new box belongs to which earlier car? Association uses evidence such as predicted position, box overlap, and visual appearance to link observations.

If two cars cross, nearest position alone can swap their identities. If a car is briefly hidden, overlap may vanish even though the car returns. A motion prediction helps, but it must be checked against the real scene and timestamps.

Draw each proposed track in a different color over several frames. Look closely when cars pass each other or one turns into a parking bay. A plausible path on one frame pair can still produce an identity switch over the sequence. Suppose two similar cars pass near each other. The closest box in the next frame is not automatically the same car; motion direction and appearance can help, but both can be uncertain. Draw predicted locations for each track and compare them with the new detections. Leave an identity unresolved if the evidence is weak. An incorrect assignment can persist for many frames, so a cautious gap may be better than a neat but false continuous trail. Now check the idea on a concrete example: Compare predicted positions and visual similarity before assigning track IDs. A possible trap is worth naming: The nearest box can belong to the wrong car during a crossing. This supports a careful conclusion: Data association links a new detection to a previous track using motion and appearance evidence. At the crossing, follow each car's position in several frames before assigning a continuing label. A visually similar neighbor may be closer for one instant. Mark an uncertain identity rather than forcing the system to draw a smooth but false path.

Record the association rule and ambiguous intervals. Next, we'll plan what the tracker should do when an object is missed or temporarily hidden.