Sobel Filter

The Sobel Filter function block is utilized to apply edge detection to grayscale images through the Sobel operator, which enhances edges and outlines within the image.

πŸ“₯ Inputs

Image Gray The grayscale image on which the Sobel filter will be applied.

πŸ“€ Outputs

Image Gray The output image after the Sobel filter has been applied, highlighting edges.

πŸ•ΉοΈ Controls

dx Order A slider that determines the order of the derivative in the x-direction. The higher the value, the more sensitive the edge detection will be.

dy Order A slider that sets the order of the derivative in the y-direction, which is similar to the dx Order.

Aperture Size A slider to select the size of the extended Sobel kernel, which influences the amount of smoothing applied before the edge detection process.

🎨 Features

Customizable Parameters The block allows you to fine-tune the edge detection by adjusting the dx and dy orders as well as the aperture size.

Output Normalization The output image is normalized to ensure that detected edges are clearly represented.

πŸ“ Usage Instructions

  1. Connect Input: Link a grayscale image to the Image Gray input.

  2. Adjust Controls: Use the sliders to set the desired values for dx Order, dy Order, and Aperture Size.

  3. Evaluate: Run the block to apply the Sobel filter. The output will show the processed image with edges highlighted.

πŸ“Š Evaluation

This function block evaluates the input image by applying the Sobel operator and outputs an image highlighting the edges based on the selected parameters.

πŸ’‘ Tips and Tricks

Improving Edge Detection

For better edge detection outcomes, consider increasing the Aperture Size control. A larger kernel may capture more complex edges.

Chain with Other Filters

If noise is present in the image, consider applying a Blur filter before the Sobel filter to reduce noise and improve edge clarity.

Visualizing Gradients

The Sobel filter can visualize gradients in both x and y directions. Experiment with different combinations of dx Order and dy Order to observe varying results.

πŸ› οΈ Troubleshooting

Invalid Aperture Size Error

Ensure that the selected Aperture Size is larger than both dx and dy orders. Adjust the values to resolve this error.

No Visible Edges

If edges are not visible in the output image, verify that the input image is not too bright or dark. Additionally, consider adjusting the parameters for dx and dy orders for more sensitivity.

Last updated