Choosing a resolution and capture interval requires understanding the trade-offs among storage, field of view, and frame rate.
Before practice
01 How much does storage increase with higher resolution?
Description
Before compression, it is proportional to width × height × channels × bytes per channel.
02 Why can requested FPS differ from recorded FPS?
Description
It depends on exposure, acquisition, conversion, and storage time, as well as the execution environment. Measure it using timestamps.
Execution conditions
Inputs: a generated image and timestamps. The real capture example uses Picamera2 on Raspberry Pi OS. If it is not installed in the OS, run sudo apt install python3-picamera2 in a terminal.
Use the 120×160×3 uint8 RGB image generated by the provided NumPy code.
Procedure
Record the dimensions, channels, data type, and nbytes.
Display the image reduced with [::2,::2] alongside the original.
Compare the spatial size ratio with the ratio of stored array bytes.
Results to retain
Original and reduced images, and a statistics table.
Items to record and points to check
Video
shape
dtype
Array bytes
Ratio to original
Points to check
Did you avoid calling the array byte count the JPEG file size?
Did you check how halving both axes changes the pixel count?
2. Calculate frame rate from timestamps
Starting conditions
Use the acquisition timestamps s.
Procedure
Use np.diff(timestamp) to calculate the five frame intervals. Calculate observed FPS as the reciprocal of the mean of these five intervals.
List each interval alongside the reference s, and mark the start and end times of the longest interval. Plot interval number on the x-axis and frame interval [s] on the y-axis.
Record the assumed requested rate of 30 FPS, the calculated observed FPS, and the number of frames in the timestamp record as separate items.
Results to retain
A table for 5 intervals and an interval plot.
Items to record and points to check
Interval
Δt [s]
1/Δt by interval [Hz]
Observed delay
Points to check
Did you distinguish the total frame count divided by the last timestamp from the interval-based value?
Did you check the timestamp units?
3. Region of interest and configuration choices
Starting conditions
Select row=20:80, col=40:120 of the original frame as the ROI, and compare it with the reduced full image.
Procedure
Record the ROI coordinates and size, and the size of the reduced full image.
Explain the differences in the field of view and detail preserved by the two.
If actual camera frames and a frame rate are available, add one image captured using the same principles, and record the backend and resolution.
Results to retain
ROI and reduced images, and 3 sentences explaining your configuration choices.
Items to record and points to check
Method
Region and resolution
Preserved field of view
Remaining detail
Points to check
Did you distinguish NumPy rows and columns from image x and y coordinates?
Did you label results as hardware results only if you added real image capture?