SpatialImgDetections¶
Similar to ImgDetections, but this message includes XYZ coordinates of the detected objects as well.
Both YoloSpatialDetectionNetwork and MobileNetSpatialDetectionNetwork output this message.
Examples of functionality¶
Reference¶
-
class
depthai.
SpatialImgDetections
SpatialImgDetections message. Carries detection results together with spatial location data
-
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.SpatialImgDetections) → int Retrieves image sequence number
-
getTimestamp
(self: depthai.SpatialImgDetections) → datetime.timedelta Retrieves image timestamp related to dai::Clock::now()
-
getTimestampDevice
(self: depthai.SpatialImgDetections) → datetime.timedelta Retrieves image timestamp directly captured from device’s monotonic clock, not synchronized to host time. Used mostly for debugging
-
setData
(*args, **kwargs) Overloaded function.
setData(self: depthai.Buffer, arg0: List[int]) -> None
- Parameter
data
: Copies data to internal buffer
setData(self: depthai.Buffer, arg0: numpy.ndarray[numpy.uint8]) -> None
- Parameter
data
: Copies data to internal buffer
-
setSequenceNum
(self: depthai.SpatialImgDetections, arg0: int) → depthai.SpatialImgDetections Retrieves image sequence number
-
setTimestamp
(self: depthai.SpatialImgDetections, arg0: datetime.timedelta) → depthai.SpatialImgDetections Sets image timestamp related to dai::Clock::now()
-
setTimestampDevice
(self: depthai.SpatialImgDetections, arg0: datetime.timedelta) → depthai.SpatialImgDetections Sets image timestamp related to dai::Clock::now()
-
-
class
dai
::
SpatialImgDetections
: public dai::Buffer¶ SpatialImgDetections message. Carries detection results together with spatial location data
Public Functions
-
SpatialImgDetections
()¶ Construct SpatialImgDetections message.
-
~SpatialImgDetections
() = default¶
-
SpatialImgDetections &
setTimestamp
(std::chrono::time_point<std::chrono::steady_clock, std::chrono::steady_clock::duration> timestamp)¶ Sets image timestamp related to dai::Clock::now()
-
SpatialImgDetections &
setTimestampDevice
(std::chrono::time_point<std::chrono::steady_clock, std::chrono::steady_clock::duration> timestamp)¶ Sets image timestamp related to dai::Clock::now()
-
SpatialImgDetections &
setSequenceNum
(int64_t sequenceNum)¶ Retrieves image sequence number
-
std::chrono::time_point<std::chrono::steady_clock, std::chrono::steady_clock::duration>
getTimestamp
() const¶ Retrieves image timestamp related to dai::Clock::now()
-
std::chrono::time_point<std::chrono::steady_clock, std::chrono::steady_clock::duration>
getTimestampDevice
() const¶ Retrieves image timestamp directly captured from device’s monotonic clock, not synchronized to host time. Used mostly for debugging
-
int64_t
getSequenceNum
() const¶ Retrieves image sequence number
Public Members
-
std::vector<SpatialImgDetection> &
detections
¶ Detection results.
Private Members
-
RawSpatialImgDetections &
dets
¶
-
Got questions?
We’re always happy to help with code or other questions you might have.