in_rectangle

in_rectangle restricts a query to regions of interest (RoIs) fully within a rectangle. The x and y coordinates locate its upper-left corner; width and height define its dimensions.

[{
    "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,
        "entities": [{
            "_blob_index": 0,
            "_class": "Images"
        }],
        "returned": 1,
        "status": 0
    }
}, {
    "FindBoundingBox": {
        "entities": [{
            "_class": "Annotations",
            "_coordinates": {
                "height": 40,
                "width": 40,
                "x": 120,
                "y": 50
            },
            "_label": "Dog",
            "id": null
        }],
        "returned": 1,
        "status": 0
    }
}]