Skip to content

Exercise 2: A ship for a ruler (PR149)

You will measure a fast spot that crosses a video, then use a ship in the same picture as a ruler, so that mcdonald can turn its speed on the screen into a real speed.

  • Time: about 15 to 20 minutes, nearly all of it the computer working.
  • Space: a 55 MB download, and about 0.1 GB for the frames you open.
  • You need: mcdonald 0.3.7 or newer, installed and set up (Install).

The video

PR149 is 51 seconds of infrared video from a US military camera, filmed in 2023. The record says that in the first four seconds "an area of contrast transits the frame from the bottom right edge to the lower left edge", and that the camera then turns to follow it. You can read the whole record on its DVIDS page. You will look at the first five seconds, from 0:00.00 to 0:04.97.

A cargo ship sits in the middle of the picture. It looks like a bulk carrier of the size called Handymax, which is 150 to 200 meters long. This exercise takes 175 meters, the middle of that. On the screen the ship is about 920 pixels long, as an earlier analysis of this video measured it.

In the window

  1. Start the window: type mcdonald-gui in a terminal, or use the mcdonald icon if mcdonald setup added one.
  2. On the first page, press Open by catalog name…, type PR149, and press OK.
  3. mcdonald asks whether to download PR149 from DVIDS. Press Yes.
  4. The page Select the video segment opens. The box beside Set start already says frame 1. Click in the box beside Set end, type 150 and press Enter. The line under the boxes should say 0:00.00 to 0:04.97. Press Play segment to watch it: a small bright spot crosses from right to left, low in the picture, below the ship. Leave How many objects are you looking for? at I don't know, and press Open this segment.
  5. mcdonald saves those frames as pictures, with a bar on the right that shows how far it has got.
  6. In the Measure the object box on the right, press Begin. Three lights under the button show the steps: Find, Follow and Measure. Nothing is asked on the way. This takes about 10 to 15 minutes.
  7. The report appears on the right, under the button. Its first line gives a speed in pixels a second: a speed on the screen.
  8. Now use the ship. Under the report's first lines, press Add what you know. Fill in two boxes:
  9. Physical length of a reference in the picture: type 175, with meters in the box beside it (it starts at meters).
  10. and its length in pixels on the screen: type 920. (Or press Measure on the video and drag along the ship from one end to the other. Your own measurement goes in the box, and the speed then comes out a little different.)

Press Work out the speed. A second or two later the card has a speed in meters a second.

On the command line

These are the same steps, for a terminal or an AI agent. First, find what moves in those frames:

mcdonald look PR149 --n0 1 --n1 150 --propose

This downloads PR149 the first time, saves the frames, and looks for things that move against the background. It takes about 3 minutes. It lists 3 things, best first, and draws them in the picture pr149/pr149_look_proposals_1_150.png. Thing 1 is "strong": the bright spot that crosses the picture. Things 2 and 3 are "weak".

Under the list, it prints a line that starts to take one:. Here it is, shortened:

to take one:  mcdonald mark PR149 --no-window --link --set object@17=1637.5,893.2 … --set object@95=78.0,669.0 --why "proposal 1 of 3 from look --propose (…); I looked at its strip and it is the object because ..."

Copy the command (everything after to take one:), replace the ... at the end with your own reason, and run it. It should say "70 of 81 frames linked, 16–96". Marks set this way are recorded as an agent's choice, with your reason, and the report says so. That is expected.

Then measure it, over the same frames. This takes about 8 minutes:

mcdonald run PR149 --marks pr149/pr149_marks.json --n0 1 --n1 150 --skip integrity

And give it the ship, as the window's Work out the speed does. This takes a few seconds:

mcdonald report pr149/pr149_case.json --ref-px 920 --ref-m 175

To have an AI agent do it, you can give it this prompt:

Please use the mcdonald toolkit to analyze the PR149 video released under PURSUE, following https://github.com/haqqmisra/mcdonald/blob/main/docs/exercises/02-pr149.md. Run mcdonald readme to get started.

What you should get

Both ways give the same conclusion and the same numbers. Before you add the ship, the report starts:

No physical conclusion. The object moved about 604 pixels a second in the image, and its real speed and size cannot be found from this video alone.

After you add the ship, it starts:

Subsonic motion. The object moved at most about 115 m/s across the line of sight, relative to the camera's platform, if it is no farther away than the thing of known size: under the speed of sound (Mach 0.33).

The window's report card also says it followed the spot on 70 frames (frames 16 to 96), at 20.1 pixels a frame. After you add the ship, a row says Relative speed, across: 115 m/s × R_obj/R_ref: 115 m/s, times how much farther the spot is than the ship.

What it means

  • No physical conclusion, until the ship. Pixels a second are a speed on the screen, not a real one, so the first report has no physical conclusion. The ship gives the meters.
  • The ship is a ruler. At the ship, 920 pixels of the screen are 175 meters. The spot moves 604 pixels a second, which is about two thirds of a ship's length a second. At the ship's distance that is about 115 meters a second, or about 260 miles an hour.
  • Only at the ship's distance. A ruler in the picture works only at its own distance. If the spot is nearer the camera than the ship, the same pixels are fewer meters, and it is slower. If it is farther away, it is faster. The report says so in its first line.
  • Subsonic motion. So if the spot is no farther away than the ship, 115 m/s is the most it can be moving across the picture: about a third of the speed of sound (Mach 0.33). It is not moving faster than sound across the line of sight. This is the main thing the ship tells you, as the JAIS Technical Note showed for this video. Its motion toward or away from the camera is not measured.
  • The ship's length is a choice. Press Change on the card, type 150 for the ship's length, and press Work out the speed again: about 98 m/s. With 200 it is about 131 m/s. Either way it is under the speed of sound. The answer is only as good as what you give it, and the report keeps what you gave.
  • It is a relative speed. The aircraft with the camera was moving too, and this speed includes its motion.
  • Not yet checked by eye. The card has a line that says nobody has checked the track by eye yet, and the report says so at its top. Press Full report and find the track sheet: a small picture of every frame, with a ring where mcdonald followed the spot. If the ring is on the spot in every frame, press I looked, and the line goes away. On the command line, open pr149/pr149_all_frames.jpg, then run mcdonald report pr149/pr149_case.json --i-looked.
  • Something moves with it. Press More on the card: mcdonald found a faint dark spot that stays with the bright one along the way, about 250 pixels behind it. It notes it there, not in the first line, and does not say what it is.

Next, try Exercise 3: A known field of view.

Tell us how it went

Please send us your result, whether or not it matched. Tell us what the report's first lines said, how long it took, and anything that was hard to follow.