(frame_a, frame_b, roi=None)
| 48 | |
| 49 | |
| 50 | def calculate_frame_delta(frame_a, frame_b, roi=None) -> float: |
| 51 | if roi: |
| 52 | raise RuntimeError("TODO") |
| 53 | assert frame_a.shape == frame_b.shape |
| 54 | num_pixels = frame_a.shape[0] * frame_a.shape[1] |
| 55 | return numpy.sum(numpy.abs(frame_b - frame_a)) / num_pixels |
| 56 | |
| 57 | |
| 58 | # TODO: Reduce code duplication here and in `conftest.py` |
nothing calls this directly
no outgoing calls
no test coverage detected