ON THIS PAGE

  • EdgeDetector
  • How to place it
  • Inputs and Outputs
  • Usage
  • Examples of functionality
  • Reference

EdgeDetector

Edge detector uses Sobel filter to create an image that emphasises edges.

How to place it

Python
C++

Python

Python
1pipeline = dai.Pipeline()
2edgeDetector = pipeline.create(dai.node.EdgeDetector)

Inputs and Outputs

Usage

Python
C++

Python

Python
1pipeline = dai.Pipeline()
2edgeDetector = pipeline.create(dai.node.EdgeDetector)
3
4sobelHorizontalKernel = [[1, 0, -1], [2, 0, -2], [1, 0, -1]]
5sobelVerticalKernel = [[1, 2, 1], [0, 0, 0], [-1, -2, -1]]
6edgeDetector.initialConfig.setSobelFilterKernels(sobelHorizontalKernel, sobelVerticalKernel)

Examples of functionality

Reference

class

dai::node::EdgeDetector

#include EdgeDetector.hpp
variable
std::shared_ptr< EdgeDetectorConfig > initialConfig
Initial config to use for edge detection.
variable
Input inputConfig
Input EdgeDetectorConfig message with ability to modify parameters in runtime. Default queue is non-blocking with size 4.
variable
Input inputImage
Input image on which edge detection is performed. Default queue is non-blocking with size 4.
variable
Output outputImage
Outputs image frame with detected edges
variable
Output passthroughInputImage
Passthrough message on which the calculation was performed.
function
EdgeDetector()
function
EdgeDetector(std::unique_ptr< Properties > props)
function
void setNumFramesPool(int numFramesPool)
Specify number of frames in pool.
Parameters
  • numFramesPool: How many frames should the pool have
function
void setMaxOutputFrameSize(int maxFrameSize)
Specify maximum size of output image.
Parameters
  • maxFrameSize: Maximum frame size in bytes
inline function
DeviceNodeCRTP()
inline function
DeviceNodeCRTP(const std::shared_ptr< Device > & device)
inline function
DeviceNodeCRTP(std::unique_ptr< Properties > props)
inline function
DeviceNodeCRTP(std::unique_ptr< Properties > props, bool confMode)
inline function
DeviceNodeCRTP(const std::shared_ptr< Device > & device, std::unique_ptr< Properties > props, bool confMode)

Need assistance?

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