| 299 | } |
| 300 | |
| 301 | static void export_masks(const app_state& app) { |
| 302 | for (size_t i = 0; i < app.result.detections.size(); ++i) { |
| 303 | char path[256]; |
| 304 | snprintf(path, sizeof(path), "mask_%02d.png", (int)i); |
| 305 | if (sam3_save_mask(app.result.detections[i].mask, path)) { |
| 306 | fprintf(stderr, "Exported %s\n", path); |
| 307 | } |
| 308 | } |
| 309 | } |
| 310 | |
| 311 | // Convert screen position to image coordinates |
| 312 | static bool screen_to_image(const app_state& app, float sx, float sy, |
no test coverage detected