FFmpeg
Data Structures | Macros | Functions
detection_bbox.h File Reference
#include "rational.h"
#include "avassert.h"
#include "frame.h"

Go to the source code of this file.

Data Structures

struct  AVDetectionBBox
 
struct  AVDetectionBBoxHeader
 

Macros

#define AV_DETECTION_BBOX_LABEL_NAME_MAX_SIZE   64
 
#define AV_NUM_DETECTION_BBOX_CLASSIFY   4
 At most 4 classifications based on the detected bounding box. More...
 

Functions

static av_always_inline AVDetectionBBoxav_get_detection_bbox (const AVDetectionBBoxHeader *header, unsigned int idx)
 
AVDetectionBBoxHeaderav_detection_bbox_alloc (uint32_t nb_bboxes, size_t *out_size)
 Allocates memory for AVDetectionBBoxHeader, plus an array of. More...
 
AVDetectionBBoxHeaderav_detection_bbox_create_side_data (AVFrame *frame, uint32_t nb_bboxes)
 Allocates memory for AVDetectionBBoxHeader, plus an array of. More...
 

Macro Definition Documentation

◆ AV_DETECTION_BBOX_LABEL_NAME_MAX_SIZE

#define AV_DETECTION_BBOX_LABEL_NAME_MAX_SIZE   64

Definition at line 36 of file detection_bbox.h.

◆ AV_NUM_DETECTION_BBOX_CLASSIFY

#define AV_NUM_DETECTION_BBOX_CLASSIFY   4

At most 4 classifications based on the detected bounding box.

For example, we can get max 4 different attributes with 4 different DNN models on one bounding box. classify_count is zero if no classification.

Definition at line 50 of file detection_bbox.h.

Function Documentation

◆ av_get_detection_bbox()

static av_always_inline AVDetectionBBox* av_get_detection_bbox ( const AVDetectionBBoxHeader header,
unsigned int  idx 
)
static

◆ av_detection_bbox_alloc()

AVDetectionBBoxHeader* av_detection_bbox_alloc ( uint32_t  nb_bboxes,
size_t *  out_size 
)

Allocates memory for AVDetectionBBoxHeader, plus an array of.

nb_bboxes

AVDetectionBBox, and initializes the variables. Can be freed with a normal av_free() call.

Parameters
nb_bboxesnumber of AVDetectionBBox structures to allocate
out_sizeif non-NULL, the size in bytes of the resulting data array is written here.

Definition at line 22 of file detection_bbox.c.

Referenced by av_detection_bbox_create_side_data().

◆ av_detection_bbox_create_side_data()

AVDetectionBBoxHeader* av_detection_bbox_create_side_data ( AVFrame frame,
uint32_t  nb_bboxes 
)

Allocates memory for AVDetectionBBoxHeader, plus an array of.

nb_bboxes

AVDetectionBBox, in the given AVFrame

as AVFrameSideData of type AV_FRAME_DATA_DETECTION_BBOXES and initializes the variables.

Definition at line 52 of file detection_bbox.c.

Referenced by dnn_detect_fill_side_data(), dnn_detect_post_proc_ssd(), and dnn_detect_post_proc_tf().

frame
these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several the filter must be ready for frames arriving randomly on any input any filter with several inputs will most likely require some kind of queuing mechanism It is perfectly acceptable to have a limited queue and to drop frames when the inputs are too unbalanced request_frame For filters that do not use the this method is called when a frame is wanted on an output For a it should directly call filter_frame on the corresponding output For a if there are queued frames already one of these frames should be pushed If the filter should request a frame on one of its repeatedly until at least one frame has been pushed Return or at least make progress towards producing a frame
Definition: filter_design.txt:264