MCPcopy Create free account
hub / github.com/PABannier/sam3.cpp / export_masks

Function export_masks

examples/main_image.cpp:301–309  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

299}
300
301static 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
312static bool screen_to_image(const app_state& app, float sx, float sy,

Callers 1

mainFunction · 0.85

Calls 1

sam3_save_maskFunction · 0.85

Tested by

no test coverage detected