Skip to main content

in_rectangle

The in_rectangle parameter is used to specify the constraints on the position of a region of interest (RoI).

[{
"FindImage": {
"_ref": 1,
"constraints": {
"unique_id": ["==", 34]
},
"blobs": true
}
}, {
"FindBoundingBox": {
"image_ref": 1,
"blobs": false,
"coordinates": true,
"labels": true,
"in_rectangle": {
"x": 100,
"y": 0,
"width": 500,
"height": 500
},
"results": {
"list": ["id"]
}
}
}]

Successful response:

[{
"FindImage": {
"blobs_start": 0,
"returned": 1,
"status": 0
}
}, {
"FindBoundingBox": {
"entities": [{
"_coordinates": {
"height": 40,
"width": 40,
"x": 120,
"y": 50
},
"_label": "Dog",
"id": null
}],
"returned": 1,
"status": 0
}
}]

where x and y are the coordinates of the upper left corner of the rectangle and w and h are the width and height.

If in_rectangle is specified, the RoIs returned must be fully within the boundaries indicated by the given rectangle parameters.