Jetson Inference
DNN Vision Library
detectNet::Detection Struct Reference

Object Detection result. More...

#include <detectNet.h>

Public Member Functions

float Width () const
 Calculate the height of the object. More...
 
float Height () const
 Calculate the area of the object. More...
 
float Area () const
 Calculate the width of the bounding box. More...
 
void Center (float *x, float *y) const
 Return true if the coordinate is inside the bounding box. More...
 
bool Contains (float x, float y) const
 Return true if the bounding boxes intersect and exceeds area % threshold. More...
 
bool Intersects (const Detection &det, float areaThreshold=0.0f) const
 Return true if the bounding boxes intersect and exceeds area % threshold. More...
 
bool Intersects (float x1, float y1, float x2, float y2, float areaThreshold=0.0f) const
 Return the area of the bounding box intersection. More...
 
float IntersectionArea (const Detection &det) const
 Return the area of the bounding box intersection. More...
 
float IntersectionArea (float x1, float y1, float x2, float y2) const
 Return true if the bounding boxes overlap. More...
 
bool Overlaps (const Detection &det) const
 Return true if the bounding boxes overlap. More...
 
bool Overlaps (float x1, float y1, float x2, float y2) const
 Expand the bounding box if they overlap (return true if so) More...
 
bool Expand (float x1, float y1, float x2, float y2)
 Expand the bounding box if they overlap (return true if so) More...
 
bool Expand (const Detection &det)
 Reset all member variables to zero. More...
 
void Reset ()
 Default constructor. More...
 
 Detection ()
 

Static Public Member Functions

static float Width (float x1, float x2)
 Calculate the height of the bounding box. More...
 
static float Height (float y1, float y2)
 Calculate the area of the bounding box. More...
 
static float Area (float x1, float y1, float x2, float y2)
 Return the center of the object. More...
 

Public Attributes

uint32_t Instance
 Index of this unique object instance. More...
 
uint32_t ClassID
 Class index of the detected object. More...
 
float Confidence
 Confidence value of the detected object. More...
 
float Left
 Left bounding box coordinate (in pixels) More...
 
float Right
 Right bounding box coordinate (in pixels) More...
 
float Top
 Top bounding box cooridnate (in pixels) More...
 
float Bottom
 Bottom bounding box coordinate (in pixels) More...
 

Detailed Description

Object Detection result.

Constructor & Destructor Documentation

◆ Detection()

detectNet::Detection::Detection ( )
inline

Member Function Documentation

◆ Area() [1/2]

float detectNet::Detection::Area ( ) const
inline

Calculate the width of the bounding box.

◆ Area() [2/2]

static float detectNet::Detection::Area ( float  x1,
float  y1,
float  x2,
float  y2 
)
inlinestatic

Return the center of the object.

◆ Center()

void detectNet::Detection::Center ( float *  x,
float *  y 
) const
inline

Return true if the coordinate is inside the bounding box.

◆ Contains()

bool detectNet::Detection::Contains ( float  x,
float  y 
) const
inline

Return true if the bounding boxes intersect and exceeds area % threshold.

◆ Expand() [1/2]

bool detectNet::Detection::Expand ( float  x1,
float  y1,
float  x2,
float  y2 
)
inline

Expand the bounding box if they overlap (return true if so)

◆ Expand() [2/2]

bool detectNet::Detection::Expand ( const Detection det)
inline

Reset all member variables to zero.

◆ Height() [1/2]

float detectNet::Detection::Height ( ) const
inline

Calculate the area of the object.

◆ Height() [2/2]

static float detectNet::Detection::Height ( float  y1,
float  y2 
)
inlinestatic

Calculate the area of the bounding box.

◆ IntersectionArea() [1/2]

float detectNet::Detection::IntersectionArea ( const Detection det) const
inline

Return the area of the bounding box intersection.

◆ IntersectionArea() [2/2]

float detectNet::Detection::IntersectionArea ( float  x1,
float  y1,
float  x2,
float  y2 
) const
inline

Return true if the bounding boxes overlap.

◆ Intersects() [1/2]

bool detectNet::Detection::Intersects ( const Detection det,
float  areaThreshold = 0.0f 
) const
inline

Return true if the bounding boxes intersect and exceeds area % threshold.

◆ Intersects() [2/2]

bool detectNet::Detection::Intersects ( float  x1,
float  y1,
float  x2,
float  y2,
float  areaThreshold = 0.0f 
) const
inline

Return the area of the bounding box intersection.

◆ Overlaps() [1/2]

bool detectNet::Detection::Overlaps ( const Detection det) const
inline

Return true if the bounding boxes overlap.

◆ Overlaps() [2/2]

bool detectNet::Detection::Overlaps ( float  x1,
float  y1,
float  x2,
float  y2 
) const
inline

Expand the bounding box if they overlap (return true if so)

◆ Reset()

void detectNet::Detection::Reset ( )
inline

Default constructor.

◆ Width() [1/2]

float detectNet::Detection::Width ( ) const
inline

Calculate the height of the object.

◆ Width() [2/2]

static float detectNet::Detection::Width ( float  x1,
float  x2 
)
inlinestatic

Calculate the height of the bounding box.

Member Data Documentation

◆ Bottom

float detectNet::Detection::Bottom

Bottom bounding box coordinate (in pixels)

Calculate the width of the object

◆ ClassID

uint32_t detectNet::Detection::ClassID

Class index of the detected object.

◆ Confidence

float detectNet::Detection::Confidence

Confidence value of the detected object.

◆ Instance

uint32_t detectNet::Detection::Instance

Index of this unique object instance.

◆ Left

float detectNet::Detection::Left

Left bounding box coordinate (in pixels)

◆ Right

float detectNet::Detection::Right

Right bounding box coordinate (in pixels)

◆ Top

float detectNet::Detection::Top

Top bounding box cooridnate (in pixels)


The documentation for this struct was generated from the following file: