Skip to main content

FindFrame

Find frames that satisfy the specified constraints.

This command enables visual operations, using the operations parameter.

Images are returned as blobs in the array of blobs.

Parameters

  • [optional] with_label
  • [optional] video_ref: Reference to a video within which the frames are searched for.
  • [optional] blobs: indicates whether the pixel data will be returned as part of the response (Default: false).
  • [optional] operations
  • [optional] in_frame_number_range
  • [optional] in_time_offset_range
  • [optional] in_time_fraction_range
  • [optional] frame_numbers: Indicate if frame numbers should be returned as a part of the response. (Default: false)
  • [optional] time_offsets: Indicate if time offsets should be returned as a part of the response. (Default: false)
  • [optional] time_fractions: Indicate if time fractions should be returned as a part of the response. (Default: false)
  • [optional] labels: indicates whether or not the label associated with the Frame will be retrieved
  • [optional] as_format: Specify the format of the returned blobs ["jpg", "png"]. (Default: "jpg")

Details import Componentgroupbysourcedetails from './_group_by_source_details.mdx';

Examples

Find frames which has the "topic" property equal to "car chase", and retrieve "topic" and "movie title" properties for each frame. Note that the search is performed with no regard to the videos the frames are connected to.


[{
"FindFrame": {
"constraints": {
"topic": ["==", "car chase"]
},
"results": {
"list": ["topic", "movie title"]
}
}
}]

Successful response:


[{
"FindFrame": {
"returned": 1,
"status": 0,
"entities": [{
"topic": "car chase",
"movie title": "Megamind"
}]
}
}]

Similar to the above, except the search is performed over the frames that are connected to videos that have property "movie rating" equal to "PG13":

Find videos with the property "movie rating" equal to "PG13", then find frames that are connected to the videos and have property "topic" equal to "car chase". Returned properties of the frames are "topic" and "movies title".


[{
"FindVideo": {
"_ref": 1,
"constraints": {
"movie rating": ["==", "PG13"]
}
}
}, {
"FindFrame": {
"is_connected_to": {
"ref": 1
},
"constraints": {
"topic": ["==", "car chase"]
},
"results": {
"list": ["topic", "movie title"]
}
}
}]

Successful response:


[{
"FindVideo": {
"returned": 0,
"status": 0
}
}, {
"FindFrame": {
"returned": 1,
"status": 0,
"entities": [{
"topic": "car chase",
"movie title": "Megamind"
}]
}
}]