Exercise 3: A known field of view (PR113)¶
You will measure a spot that crosses a video in about a tenth of a second, then tell mcdonald how wide the camera sees. It then gives how fast the spot turns across the view, and what its speed would be at each distance.
- Time: about 10 minutes.
- Space: a 67 MB download, and about 43 MB for the frames you open.
- You need: mcdonald 0.3.7 or newer, installed and set up (Install).
The video¶
PR113 is three minutes of video, which the record says was likely filmed by a US military infrared camera in 1996. In it, "an area of contrast transits the sensor field-of-view, entering near the upper right corner and exiting near the lower left corner of the frame", at about 0:14. You can read the whole record on its DVIDS page. You will look at two seconds of it, from 0:12.63 to 0:14.63.
The camera draws lines with numbers on them across the picture: its angle marks. From them, an earlier analysis of this video worked out that one degree spans about 35.4 pixels on the screen, so the picture's 1,920 pixels span about 54 degrees. That is the camera's field of view: how wide it sees, from left to right. You will give it to mcdonald.
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
PR113, and press OK. - mcdonald asks whether to download PR113 from DVIDS. Press Yes.
- The page Select the video segment opens. Click in the box beside Set start, type
380and press Enter. Then click in the box beside Set end, type440and press Enter. The line under the boxes should say 0:12.63 to 0:14.63. The spot is there for only four frames, 408 to 411, so it is easy to miss when the video plays. 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, Follow and Measure. Nothing is asked on the way. This takes about 3 minutes.
- The report appears on the right, under the button. Its first line gives a speed in pixels a second: a speed on the screen. Under it is a card called Measure the sound, which is another exercise, so you can leave it for now.
- Now give the field of view. Under the report's first lines, press Add what you know. In
the box Horizontal field of view (FOV), type
54. Press Work out the speed. A second or two later the first line changes, and three new rows are on the card.
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 PR113 --n0 380 --n1 440 --propose
This downloads PR113 the first time, saves the frames, and looks for things that move against the
background. It takes about 2 minutes. It lists 7 things, best first, and draws them in the picture
pr113/pr113_look_proposals_380_440.png. All seven are "weak": Find is not sure of any of them,
so look at the picture yourself. Thing 1 is the dark spot seen on frames 408 to 411, moving 141
pixels each frame: the one the record describes.
Under the list, it prints a line that starts to take one:. Here it is, shortened:
to take one: mcdonald mark PR113 --no-window --link --set object@408=1007.9,317.3 --set object@411=700.9,605.6 --why "proposal 1 of 7 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 "4 of 4 frames linked, 408–411". 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 2 minutes:
mcdonald run PR113 --marks pr113/pr113_marks.json --n0 380 --n1 440 --skip integrity
And give it the field of view, as the window's Work out the speed does. This takes a few seconds:
mcdonald report pr113/pr113_case.json --fov 54
To have an AI agent do it, you can give it this prompt:
Please use the mcdonald toolkit to analyze the PR113 video released under PURSUE, following https://github.com/haqqmisra/mcdonald/blob/main/docs/exercises/03-pr113.md. Run
mcdonald readmeto get started.
What you should get¶
Both ways give the same conclusion and the same numbers. Before you give the field of view, the report starts:
No physical conclusion. The object moved about 4269 pixels a second in the image, and its real speed and size cannot be found from this video alone.
After you give it, it starts:
Indeterminate, range needed. The object moved about 130° a second in the image and is 21 pixels across (0.64°); what it is depends on how far away it is: as a bird (0.2–2 m) it would be 18–180 m away and moving at least 41–410 m/s across the line of sight; as a weather balloon (2 m), 180 m away and 410 m/s; as a fighter jet (17 m), 1.5 km away and 3,500 m/s.
The window's report card also says it followed the spot on 4 frames (frames 408 to 411), at 142.3 pixels a frame. After you give the field of view, three rows are added: Field of view 54.0°, Scale 1884 px/rad, and Turn rate 2.27 rad/s. The question on the card changes to "Its real speed needs the distance to the object".
What it means¶
- From pixels to angles. Once mcdonald knows that the picture spans 54 degrees, it can turn pixels into angles. The spot turns across the view at 2.27 radians a second, about 130 degrees a second: it crosses the whole picture in less than half a second.
- A speed still needs a distance. How fast something turns across your view depends on how far away it is: a fly near your face and a plane far off can turn across it at the same rate. The speed is the turn rate times the distance. The record gives no distance, so the first line says Indeterminate, range needed.
- What it would be at each distance. The first line puts three things where their sizes would be. A bird would be 18 to 180 meters away. A 2-meter weather balloon would have to be about 180 meters away, going about 400 meters a second: faster than sound. A 17-meter fighter jet would be about 1.5 kilometers away, going about 3,500 meters a second. Unless the spot was small and close, it was very fast. The speeds are the least it could be going at each distance: they count only the motion across your view. Press Full report and find the picture called "Size (left) and speed (right) against distance": its one line shows the same thing at every distance.
- Try a distance. Press Change on the card, type
3in Distance to the object with kilometers beside it, and press Work out the speed. The first line now says Supersonic motion: at 3 kilometers the spot is about 33 meters across, about a fighter jet's size, and moving at least 6,800 meters a second across your view. That is the least it could be going, so it is faster than sound however it moved toward or away from the camera. Try0.1(100 meters): about 1.1 meters across and at least 230 meters a second, under the speed of sound, and the first line says Indeterminate, angle needed, because motion toward or away from the camera could still make it faster. The record gives no distance; this only shows what one would tell you. - 54 degrees and the angle marks. The earlier analysis gave a turn rate of 2.10 radians a
second, from the angle marks themselves. mcdonald turns a field of view into pixels the way a
camera lens does, and that differs a little from stretching the marks straight across the
picture, so it gives 2.27. On the command line you can give the marks instead of the field of
view:
mcdonald report pr113/pr113_case.json --graticule 35.4gives 2.10. - 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 each frame, with a ring where
mcdonald followed the spot. If the ring is on the spot in all four frames, press I looked.
On the command line, open
pr113/pr113_all_frames.jpg, then runmcdonald report pr113/pr113_case.json --i-looked.
Next, try Exercise 4: Six at once, where you tell mcdonald how many objects you are looking for.
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.