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

Function run_pvs_box

examples/main_image.cpp:281–299  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

279}
280
281static void run_pvs_box(app_state& app) {
282 if (!app.image_encoded) return;
283 if (!app.has_pvs_box) return;
284 snprintf(app.status, sizeof(app.status), "Running PVS (box)...");
285 app.busy = true;
286
287 sam3_pvs_params pvs;
288 pvs.pos_points = app.pos_points;
289 pvs.neg_points = app.neg_points;
290 pvs.box = app.pvs_box;
291 pvs.use_box = true;
292 pvs.multimask = app.multimask;
293
294 app.result = sam3_segment_pvs(*app.state, *app.model, pvs);
295 snprintf(app.status, sizeof(app.status), "PVS (box): %d masks.",
296 (int)app.result.detections.size());
297 app.busy = false;
298 build_overlay(app);
299}
300
301static void export_masks(const app_state& app) {
302 for (size_t i = 0; i < app.result.detections.size(); ++i) {

Callers 1

mainFunction · 0.85

Calls 2

sam3_segment_pvsFunction · 0.85
build_overlayFunction · 0.85

Tested by

no test coverage detected