MayaFlux 0.4.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 227 of file Region.hpp.

232 {
233 std::unordered_map<std::string, std::any> attrs;
234 if (!label.empty())
235 attrs["label"] = label;
236 attrs["type"] = "video_region";
237 return Region({ start_frame, x1, y1 },
238 { end_frame, x2, y2 }, attrs);
239 }