Exercise 1: Birdwatching (PR44)¶
You will open part of a video by its name, let mcdonald do the whole job with one button, and see how it tells a bird by the beat of its wings.
- Time: about 25 to 35 minutes, nearly all of it the computer working.
- Space: an 87 MB download, and about 0.3 GB for the frames you open.
- You need: mcdonald 0.3.7 or newer, installed and set up (Install).
The video¶
PR44 is five minutes of infrared video from a US military camera, filmed in 2020. The person who reported it gave no description. The record says the camera follows "an area of contrast" for about three minutes, and then zooms out while it keeps following it. You can read the whole record on its DVIDS page. You will look at 14 seconds of it, from 4:25.97 to 4:39.97, as the camera zooms out.
The video also has sound. The record says the sound "does not relate to the visual content", so this exercise leaves it out.
In the window¶
- Start the window: type
mcdonald-guiin a terminal, or use the mcdonald icon ifmcdonald setupadded one. - On the first page, press Open by catalog name…, type
PR44, and press OK. - mcdonald asks whether to download PR44 from DVIDS. Press Yes.
- The page Select the video segment opens. Click in the box beside Set start, type
7980and press Enter. Then click in the box beside Set end, type8400and press Enter. The line under the boxes should say 4:25.97 to 4:39.97. Press Play segment to watch it: a small bright spot drifts across the middle of the picture while the view widens. Leave How many objects are you looking for? at I don't know, and press Open this segment. - mcdonald saves those frames as pictures, with a bar on the right that shows how far it has got.
- In the Measure the object box on the right, press Begin. Three lights under the button show the steps. Find looks for things that move against the background, Follow follows the likeliest one from frame to frame, and Measure works out how it moved and writes a report. Nothing is asked on the way. This is the long part: about 20 to 25 minutes.
- The report appears on the right, under the button, with a small bird beside its first line. Under it is a card called Measure the sound. It measures the sound track, which is another exercise, so you can leave it for now.
On the command line¶
These are the same three steps, for a terminal or an AI agent. First, find what moves in those frames:
mcdonald look PR44 --n0 7980 --n1 8400 --propose
This downloads PR44 the first time, saves the frames, and looks for things that move against the
background. It takes about 7 minutes. It lists 3 things, best first, and draws them in the
picture pr44/pr44_look_proposals_7980_8400.png. Open that picture. Thing 1 is the bright spot
the camera follows.
Under the list, it prints a line that starts to take one:. Here it is, shortened:
to take one: mcdonald mark PR44 --no-window --link --set object@7983=690.0,542.0 … --set object@8397=1043.0,582.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 puts marks on thing 1 and follows it from frame to frame. It should say
"446 of 446 frames linked, 7982–8427": it follows the spot a little past the end of your
segment, and the next step measures only the frames you chose. 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:
mcdonald run PR44 --marks pr44/pr44_marks.json --n0 7980 --n1 8400 --skip integrity
--skip integrity leaves out the slowest check, as the window does. This takes about
20 minutes. The report is pr44/pr44_case.md.
To have an AI agent do it, you can give it this prompt:
Please use the mcdonald toolkit to analyze the PR44 video released under PURSUE, following https://github.com/haqqmisra/mcdonald/blob/main/docs/exercises/01-pr44.md. Run
mcdonald readmeto get started.
What you should get¶
Both ways give the same conclusion and the same numbers. The report starts:
Beats like a bird. A bird is the leading explanation: its brightness beats at 3.1 Hz, the rate of a wingbeat, a rhythm of its own and not the video's (a tumbling body or a blinking light would beat too, and nothing here tells them apart); the object moved about 22 pixels a second against the background, and its real speed and size cannot be found from this video alone.
The window's report card also says it followed the spot on 419 frames (frames 7982 to 8400), and that the beat is 3.1 Hz. If your segment starts or ends a little differently, for example because you dragged the handles, the speed may come out a pixel or two different, but the beat should still be 3.1 Hz. If it starts a second or more earlier, Find may also take a brief bright flash near the start as a second object, and you get two report cards: the bird's says the same as above, and the flash's says No physical conclusion.
What it means¶
- A beat is a rise and fall in brightness. As a bird's wings go up and down, it shows the camera more and less of itself, so it looks brighter and dimmer in turn. Here the spot does that about 3.1 times a second. mcdonald takes 2 to 25 times a second as a wingbeat's rate: large birds beat their wings slowly, small ones fast.
- Its own, not the video's. Press Full report and find the picture with a blue line and a grey one. The blue line is the spot's brightness, which rises and falls in a steady rhythm by about a quarter. The grey line is the background just beside it, which stays flat. On the right, the blue line has one tall, narrow peak at 3.07 Hz. The dotted line is the video's own rhythm, from the way it was saved, and the peak is far from it. So the beat belongs to the spot.
- The leading explanation, not proof. A tumbling body or a blinking light also beats. The report says so, and calls a bird the leading explanation, not the answer.
- Something moves with it. Press More on the card: mcdonald found a dark spot about 14 pixels from the bright one that stays with it through the stretch. It notes it there, not in the first line, and does not say what it is.
- The speed is only on the screen. The camera follows the spot, so it moves only about 22 pixels a second in the picture. To turn that into a real speed you need how wide the camera sees, how far away the spot was, and how the camera moved. The record gives none of these, so mcdonald does not guess.
- Check the track by eye. The report card says Track not yet checked by eye. 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. On
the command line, open
pr44/pr44_all_frames.jpg, then runmcdonald report pr44/pr44_case.json --i-looked. Nothing is measured again. The report stops calling its numbers not yet sure.
Next, try Exercise 2: A ship for a ruler, where something of known size in the picture turns the speed on the screen into a real speed.
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.