Mech-DLK SDK (C++) 3.0.0
Mech-DLK SDK (C++) Reference Documentation
 
Loading...
Searching...
No Matches
mmind::dl::MBbox Struct Reference

#include <MBbox.h>

Classes

struct  ExtraInfo
 

Public Member Functions

 MBbox ()=default
 
 MBbox (float startX, float startY, float endX, float endY, float confidence, int labelIndex, const std::string &labelName, bool recoverToFixedSize=false, const std::vector< float > &confidenceSeq={})
 
float width () const
 
float height () const
 
float area () const
 
std::vector< float > centerPoint () const
 

Public Attributes

float startX {0.0}
 
float startY {0.0}
 
float endX {0.0}
 
float endY {0.0}
 
bool recoverToFixedSize {false}
 
struct mmind::dl::MBbox::ExtraInfo extraInfo
 

Detailed Description

Definition at line 32 of file MBbox.h.

Constructor & Destructor Documentation

◆ MBbox() [1/2]

mmind::dl::MBbox::MBbox ( )
default

◆ MBbox() [2/2]

mmind::dl::MBbox::MBbox ( float startX,
float startY,
float endX,
float endY,
float confidence,
int labelIndex,
const std::string & labelName,
bool recoverToFixedSize = false,
const std::vector< float > & confidenceSeq = {} )
inline

Definition at line 35 of file MBbox.h.

37 {})
40 {
41 extraInfo.confidence = confidence;
42 extraInfo.labelIndex = labelIndex;
43 extraInfo.labelName = labelName;
44 extraInfo.confidenceSeq = confidenceSeq;
45 }
float startY
Definition MBbox.h:52
float startX
Definition MBbox.h:51
bool recoverToFixedSize
Definition MBbox.h:56
struct mmind::dl::MBbox::ExtraInfo extraInfo

Member Function Documentation

◆ area()

float mmind::dl::MBbox::area ( ) const
inline

Definition at line 48 of file MBbox.h.

48{ return width() * height(); }
float width() const
Definition MBbox.h:46
float height() const
Definition MBbox.h:47

◆ centerPoint()

std::vector< float > mmind::dl::MBbox::centerPoint ( ) const
inline

Definition at line 49 of file MBbox.h.

49{ return {(endX + startX) / 2, (endY + startY) / 2}; }

◆ height()

float mmind::dl::MBbox::height ( ) const
inline

Definition at line 47 of file MBbox.h.

47{ return endY - startY; }

◆ width()

float mmind::dl::MBbox::width ( ) const
inline

Definition at line 46 of file MBbox.h.

46{ return endX - startX; }

Member Data Documentation

◆ endX

float mmind::dl::MBbox::endX {0.0}

Definition at line 53 of file MBbox.h.

53{0.0};

◆ endY

float mmind::dl::MBbox::endY {0.0}

Definition at line 54 of file MBbox.h.

54{0.0};

◆ extraInfo

struct mmind::dl::MBbox::ExtraInfo mmind::dl::MBbox::extraInfo

◆ recoverToFixedSize

bool mmind::dl::MBbox::recoverToFixedSize {false}

Definition at line 56 of file MBbox.h.

56{false};

◆ startX

float mmind::dl::MBbox::startX {0.0}

Definition at line 51 of file MBbox.h.

51{0.0};

◆ startY

float mmind::dl::MBbox::startY {0.0}

Definition at line 52 of file MBbox.h.

52{0.0};

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