EdgeDetectorConfig

This message is used to configure the EdgeDetector node. You can set the horizontal and vertical Sobel filter kernel.

Examples of functionality

Reference

class depthai.EdgeDetectorConfig

EdgeDetectorConfig message. Carries sobel edge filter config.

getConfigData(self: depthai.EdgeDetectorConfig)depthai.EdgeDetectorConfigData

Retrieve configuration data for EdgeDetector

Returns

sobel filter horizontal and vertical 3x3 kernels

Return type

EdgeDetectorConfigData

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

Reference to internal buffer

getRaw(self: depthai.ADatatype)depthai.RawBuffer
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

setSobelFilterKernels(self: depthai.EdgeDetectorConfig, horizontalKernel: List[List[int]], verticalKernel: List[List[int]])None

Set sobel filter horizontal and vertical 3x3 kernels

Parameter horizontalKernel:

Used for horizontal gradiant computation in 3x3 Sobel filter

Parameter verticalKernel:

Used for vertical gradiant computation in 3x3 Sobel filter

class dai::EdgeDetectorConfig : public dai::Buffer

EdgeDetectorConfig message. Carries sobel edge filter config.

Public Functions

EdgeDetectorConfig()

Construct EdgeDetectorConfig message.

EdgeDetectorConfig(std::shared_ptr<RawEdgeDetectorConfig> ptr)
~EdgeDetectorConfig() = default
void setSobelFilterKernels(const std::vector<std::vector<int>> &horizontalKernel, const std::vector<std::vector<int>> &verticalKernel)

Set sobel filter horizontal and vertical 3x3 kernels

Parameters
  • horizontalKernel: Used for horizontal gradiant computation in 3x3 Sobel filter

  • verticalKernel: Used for vertical gradiant computation in 3x3 Sobel filter

EdgeDetectorConfigData getConfigData() const

Retrieve configuration data for EdgeDetector

Return

EdgeDetectorConfigData: sobel filter horizontal and vertical 3x3 kernels

Private Functions

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

Private Members

RawEdgeDetectorConfig &cfg

Got questions?

We’re always happy to help with code or other questions you might have.