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

◆ image_rect()

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

Create a Region representing a rectangular region in an image.

Parameters
x1Top-left X coordinate.
y1Top-left Y coordinate.
x2Bottom-right X coordinate.
y2Bottom-right Y coordinate.
labelOptional label for this rectangle.
Returns
Region covering the specified image rectangle.

Definition at line 199 of file Region.hpp.

202 {
203 std::unordered_map<std::string, std::any> attrs;
204 if (!label.empty())
205 attrs["label"] = label;
206 attrs["type"] = "image_rect";
207 return Region({ x1, y1 }, { x2, y2 }, attrs);
208 }