| 63 | } |
| 64 | |
| 65 | double update_guess ( |
| 66 | correlation_tracker& tracker, |
| 67 | py::array img, |
| 68 | const drectangle& bounding_box |
| 69 | ) |
| 70 | { |
| 71 | if (is_image<unsigned char>(img)) |
| 72 | { |
| 73 | return tracker.update(numpy_image<unsigned char>(img), bounding_box); |
| 74 | } |
| 75 | else if (is_image<rgb_pixel>(img)) |
| 76 | { |
| 77 | return tracker.update(numpy_image<rgb_pixel>(img), bounding_box); |
| 78 | } |
| 79 | else |
| 80 | { |
| 81 | throw dlib::error("Unsupported image type, must be 8bit gray or RGB image."); |
| 82 | } |
| 83 | } |
| 84 | |
| 85 | double update_guess_rec ( |
| 86 | correlation_tracker& tracker, |
no test coverage detected