Blocks Overview¶
Vision Processing Group¶
There are 12 blocks in this group, with the main block that enables the vision processing on the top, and the rest representing the various algorithms and techniques one can apply to an image.
1. Process images¶
This is the main block of the Vision Processing
group and is required to enable the corresponding functionality.
There are two placeholders, for left and right image, which can take the other vision processing blocks in various combinations.
Every time an image is received this block will be called to process and publish the resulting images.
If provided with a sequence of blocks, they operation will be performed on that sequence and only the final result will be shown on the image.
To switch to viewing the processed images, click on the corresponding text: .
2. Convert to {colour space}¶
This block enables conversion of RGB to other colour spaces. At the moment there are two options, the HSV colour space and greyscale. For HSV colour space, the channels are displayed in the BGR channels, respectively. After conversion to HSV, future operations will treat the HSV values as BGR.
3. Segmentation¶
This block converts your image to HSV, calculates the hue or value of the chosen colour, and creates a mask based on this value and the range specified. This mask is then applied to the original BGR image. Using value is useful for masking greyscale images.
4. Erode image¶
This block applies an erode operation on the image using the inputted kernel size and repeats the operation the selected number of times. As the kernel is scanned over the image, the erode operation replaces the image pixel at each anchor point position with that minimal value in that kernel. Thus, this minimising operation causes bright areas of the image get thinner, whereas the dark zones gets bigger (thus the name erosion).
5. Dilate image¶
This block applies a dilate operation on the image using the inputted kernel size and repeats the operation the selected number of times. As the kernel is scanned over the image, the dilate operation replaces the image pixel at each anchor point position with that maximal value in that kernel. Thus, this maximising operation causes bright regions within an image to "grow" (therefore the name dilation).
6. Apply filter (convolution)¶
This block applies a filter to the image by passing the kernel you supply over it. Note that the kernel is a square matrix, defined using a special block, Numpy 2D array, which is described further down. You can find examples of kernels on Wikipedia.
7. Gaussian blur¶
This block applies a Gaussian Blur to the image using the kernel size you apply. Kernel dimensions must be odd. The higher the standard deviation value, the stronger the blurring effect.
8. Difference of Gaussians¶
This block performs two Gaussian blur operations on the image and subtracts the second result from the first. This is a powerful technique to perform feature detection.
9. Sobel Edge Detector¶
This block applies a Sobel edge detection algorithm to the image.
It first calculates the X
derivatives and Y
derivatives of the image using the extended Sobel operator and the selected kernel sizes.
These gradients are then combined using the inputted weights to generate an image of the detected edges.
10. Canny Edge Detector¶
This block detects edges in the image using the Canny algorithm and the inputted parameters.
11. Hough Circles¶
This block applies the Hough circle transform to the image with the chosen parameters and draws the detected circles on the image.
12. Numpy 2D array (square matrix)¶
A block for generating a square numpy
matrix.
Click the ⊕ and ⊖ buttons to add rows and columns.