# EdgeDetectorConfig

This message is used to configure the
[EdgeDetector](https://docs.luxonis.com/software-v3/depthai/depthai-components/nodes/edge_detector.md) node. You can set the
horizontal and vertical Sobel filter kernel.

## Examples of functionality

 * [Edge detector](https://docs.luxonis.com/software-v3/depthai/examples/rvc2/edge_detector/edge_detector.md)

## Reference

### 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, config)

Kind: function

### Need assistance?

Head over to [Discussion Forum](https://discuss.luxonis.com/) for technical support or any other questions you might have.
