# EdgeDetectorConfig

此消息用于配置 [EdgeDetector](https://docs.luxonis.com/software-v3/depthai/depthai-components/nodes/edge_detector.md) 节点。 您可以设置水平和垂直方向的
Sobel 滤波器核。

## 功能示例

 * [边缘检测器](https://docs.luxonis.com/software-v3/depthai/examples/rvc2/edge_detector/edge_detector.md)

## 参考

### dai::EdgeDetectorConfig

Kind: class

EdgeDetectorConfig message. Carries sobel edge filter config.

#### dai::EdgeDetectorConfig::EdgeDetectorConfigData

Kind: struct

##### std::vector< std::vector< int > > sobelFilterHorizontalKernel

Kind: variable

Used for horizontal gradient computation in 3x3 Sobel filter Format - 3x3 matrix, 2nd column must be 0 Default - +1 0 -1; +2 0 -2;
+1 0 -1

##### std::vector< std::vector< int > > sobelFilterVerticalKernel

Kind: variable

Used for vertical gradient computation in 3x3 Sobel filter Format - 3x3 matrix, 2nd row must be 0 Default - +1 +2 +1; 0 0 0; -1 -2
-1

##### DEPTHAI_SERIALIZE(EdgeDetectorConfigData, sobelFilterHorizontalKernel, sobelFilterVerticalKernel)

Kind: function

#### EdgeDetectorConfigData config

Kind: variable

#### EdgeDetectorConfig()

Kind: function

#### ~EdgeDetectorConfig()

Kind: function

#### void setSobelFilterKernels(const std::vector< std::vector< int >> & horizontalKernel, const std::vector< std::vector< int >>
& verticalKernel)

Kind: function

Set sobel filter horizontal and vertical 3x3 kernels parameters: horizontalKernel: Used for horizontal gradient computation in 3x3
Sobel filter; verticalKernel: Used for vertical gradient computation in 3x3 Sobel filter

#### EdgeDetectorConfigData getConfigData()

Kind: function

Retrieve configuration data for EdgeDetector return: EdgeDetectorConfigData : sobel filter horizontal and vertical 3x3 kernels

#### void serialize(std::vector< std::uint8_t > & metadata, DatatypeEnum & datatype)

Kind: function

#### DatatypeEnum getDatatype()

Kind: function

Get the datatype of this specific message.

return: DatatypeEnum

#### DEPTHAI_SERIALIZE(EdgeDetectorConfig, Buffer::sequenceNum, Buffer::ts, Buffer::tsDevice, Buffer::tsSystem, config)

Kind: function

### 需要帮助？

请前往 [OAKChina 官网](https://www.oakchina.cn/) 获取技术支持或解答您的任何疑问。
