UAT 456 Artificial Intelligence, Machine Learning and Computer Vision for UAS
Worksheet 11 A pipeline that receives, checks and records frames
Objective
Measure real frame times, choose a queue size and drop policy, check frame quality, and choose a filter by measuring the feature that must be kept
Equipment and materials
- Training drone with camera, or sample video from the lecturer
- Computer with Python and OpenCV
- The module 11 example code
Safety
- If flying to record, fly within CAAT conditions in visual line of sight, keep people clear, check batteries and propellers before flight, and do not record faces unnecessarily
- If using the lecturer's sample video or images, it is desk work with no flying
Steps
- Record at least 30 s of slow flight and read it with VideoCapture, logging the arrival time of each frame
- Report missing frames, the real frame rate and the longest gap as in Example 1
- Time the group's processing stage, feed it to the queue simulator and choose a queue size with reasons
- Add the quality gate, tune thresholds on real frames and show three dropped frames with causes
- Try three filters on a frame with added noise and measure how much of the line or edge is left
- Separate a dominant colour with HSV and compare with a hand-drawn area
Record of results
| Video | Frames received / sent | Real frame rate (fps) | Longest gap (ms) | Drone movement (m, px) |
|---|---|---|---|---|
| Queue size | Policy | Processed (%) | Mean latency (ms) | p95 (ms) |
|---|---|---|---|---|
| Frame or filter | Sharpness against reference | Clipped pixels (%) | Mean brightness | Feature kept | Accept or drop |
|---|---|---|---|---|---|
Questions
Why must key frames be chosen by time rather than frame order? Use the longest gap in Table 1.
What is the load of your processing stage, what happens with an unbounded queue, and which queue size and policy did you choose for navigation and for inspection?
Why must the sharpness threshold be relative, and why must an over-exposed frame be dropped even though it scores high sharpness?
Which filter kept your line or edge best, and why may the lowest RMSE not be the filter to choose?
Check before you hand in
What to hand in
- Frame-time table and missing frames
- Queue simulation results and the reason for the choice
- Report of frames accepted and dropped with examples
- Filter comparison table and HSV result