if (yolo_runtime_infer_image(runtime, &image, &options, &results, &error) != 0)
return 2;
uint32_t count = 0;
yolo_result_set_get_count(results, &count);
/* Read task-specific values with yolo_result_set_get_*(). */
yolo_result_set_release(results);
yolo_runtime_destroy(runtime);
```
For Seg, select MIN_AREA_RECT, MIN_ENCLOSING_CIRCLE, MEAN_DIAMETER_CIRCLE or ROBUST_FIT_CIRCLE (YOLO_SEG_GEOMETRY_ prefix). Mask views and all other result-set
owned data remain valid until `yolo_result_set_release()`.
## Direct mask and RGB examples
See `examples/cpp/main.cpp` for direct calls to all 16 public APIs and `docs/RGB_MASK.md` for the mask ownership/pixel decode walkthrough. C/C++ Seg examples always compose RGB in memory without a flag or image file.
See [MODEL_CONFIG.md](MODEL_CONFIG.md#roi-使用说明whlt-与只传-lt) for WHLT, default 800×736 plus LT, and runnable Windows/RK3588 examples. Both ROI helpers are header-only; ABI remains 5.