MayaFlux 0.1.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ video_region()

static Region MayaFlux::Kakshya::Region::video_region ( uint64_t  start_frame,
uint64_t  end_frame,
uint64_t  x1,
uint64_t  y1,
uint64_t  x2,
uint64_t  y2,
const std::string &  label = "" 
)
inlinestatic

Create a Region representing a region in a video (frames and spatial rectangle).

Parameters
start_frameStart frame index (inclusive).
end_frameEnd frame index (inclusive).
x1Top-left X coordinate.
y1Top-left Y coordinate.
x2Bottom-right X coordinate.
y2Bottom-right Y coordinate.
labelOptional label for this region.
Returns
Region covering the specified video region.

Definition at line 221 of file Region.hpp.

226 {
227 std::unordered_map<std::string, std::any> attrs;
228 if (!label.empty())
229 attrs["label"] = label;
230 attrs["type"] = "video_region";
231 return Region({ start_frame, x1, y1 },
232 { end_frame, x2, y2 }, attrs);
233 }