ImgDetections

Both YoloDetectionNetwork and MobileNetDetectionNetwork output this message. This message contains a list of detections, which contains label, confidence, and the bounding box information (xmin, ymin, xmax, ymax).

Reference

class depthai.ImgDetections

ImgDetections message. Carries normalized detection results

property detections

Detections

getData(self: object) → numpy.ndarray[numpy.uint8]

Get non-owning reference to internal buffer

Returns

Reference to internal buffer

getRaw(self: depthai.ADatatype)depthai.RawBuffer
getSequenceNum(self: depthai.ImgDetections)int

Retrieves sequence number

getTimestamp(self: depthai.ImgDetections)datetime.timedelta

Retrieves timestamp related to dai::Clock::now()

getTimestampDevice(self: depthai.ImgDetections)datetime.timedelta

Retrieves timestamp directly captured from device’s monotonic clock, not synchronized to host time. Used mostly for debugging

setData(*args, **kwargs)

Overloaded function.

  1. setData(self: depthai.Buffer, arg0: List[int]) -> None

Parameter data:

Copies data to internal buffer

  1. setData(self: depthai.Buffer, arg0: numpy.ndarray[numpy.uint8]) -> None

Parameter data:

Copies data to internal buffer

setSequenceNum(self: depthai.ImgDetections, arg0: int)depthai.ImgDetections

Retrieves image sequence number

setTimestamp(self: depthai.ImgDetections, arg0: datetime.timedelta)depthai.ImgDetections

Sets image timestamp related to dai::Clock::now()

setTimestampDevice(self: depthai.ImgDetections, arg0: datetime.timedelta)depthai.ImgDetections

Sets image timestamp related to dai::Clock::now()

class dai::ImgDetections : public dai::Buffer

ImgDetections message. Carries normalized detection results

Public Functions

ImgDetections()

Construct ImgDetections message.

ImgDetections(std::shared_ptr<RawImgDetections> ptr)
~ImgDetections() = default
ImgDetections &setTimestamp(std::chrono::time_point<std::chrono::steady_clock, std::chrono::steady_clock::duration> timestamp)

Sets image timestamp related to dai::Clock::now()

ImgDetections &setTimestampDevice(std::chrono::time_point<std::chrono::steady_clock, std::chrono::steady_clock::duration> timestamp)

Sets image timestamp related to dai::Clock::now()

ImgDetections &setSequenceNum(int64_t sequenceNum)

Retrieves image sequence number

Public Members

std::vector<ImgDetection> &detections

Detections.

Private Functions

std::shared_ptr<RawBuffer> serialize() const override

Private Members

RawImgDetections &dets

Got questions?

Head over to Discussion Forum for technical support or any other questions you might have.