UAT 456 Artificial Intelligence, Machine Learning and Computer Vision for UAS

Worksheet 11 A pipeline that receives, checks and records frames

Lab 3 hAssesses CLO8, CLO7

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

  1. Record at least 30 s of slow flight and read it with VideoCapture, logging the arrival time of each frame
  2. Report missing frames, the real frame rate and the longest gap as in Example 1
  3. Time the group's processing stage, feed it to the queue simulator and choose a queue size with reasons
  4. Add the quality gate, tune thresholds on real frames and show three dropped frames with causes
  5. Try three filters on a frame with added noise and measure how much of the line or edge is left
  6. Separate a dominant colour with HSV and compare with a hand-drawn area

Record of results

Table 1 Frame times and missing frames
VideoFrames received / sentReal frame rate (fps)Longest gap (ms)Drone movement (m, px)
Table 2 Queue simulation
Queue sizePolicyProcessed (%)Mean latency (ms)p95 (ms)
Table 3 Quality gate, filters and HSV
Frame or filterSharpness against referenceClipped pixels (%)Mean brightnessFeature keptAccept or drop

Questions

  1. Why must key frames be chosen by time rather than frame order? Use the longest gap in Table 1.

  2. 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?

  3. Why must the sharpness threshold be relative, and why must an over-exposed frame be dropped even though it scores high sharpness?

  4. 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

CLO8 Develop drone image and video applications with OpenCV and Python for inspection, navigation, surveying and intelligent systems, including image-based measurement with its uncertainty. CLO7 Select and compare computer vision techniques (image and video processing, edge and feature detection, image matching, detection, classification, segmentation and tracking) to fit the problem, the data and the limits of an application. (CLOs are a web-team draft; the course owner sets the final ones.)

Instructors: answers and teaching notes for this worksheet are in the teaching pack