|
|
Algorithm 1: Steps for analyzing urinalysis dipstick video |
|
| Initialization |
| Step 1: Create template image |
| Step 2: Measure relative offsets between dipstick pads and timing sticker |
| (a) straighten image |
| (b) determine offsets |
| Step 3: Capture and store reference chart data |
| Analysis |
| Step 1: Correct aspect ratio of video |
| if aspect ratio <= 1 |
| then rotate image by 90° |
| end |
| Step 2: Identify start time and correct video orientation |
| for each frame |
| Calculate normalized cross-correlation (NCC) |
| if maximum of NCC >= threshold (0.85) |
| start timer |
| correct orientation |
| continue |
| end |
| end |
| Step 3: Record and analyze the results |
| for each dipstick pad |
| (a) identify frame for readout time |
| (b) straighten image |
| (c) locate dipstick pad and record color |
| (d) compare measured color to reference chart end |
| end |
|