FAST Corner Detection
Features from accelerated segment test (FAST) is a corner detection algorithm, that is faster than most of the other feature detectors.
ThexFFAST
function picks up a pixel in the image and compares the intensity of 16 pixels in its neighborhood on a circle, called the Bresenham's circle. If the intensity of 9 contiguous pixels is found to be either more than or less than that of the candidate pixel by a given threshold, then the pixel is declared as a corner. Once the corners are detected, the non-maximal suppression is applied to remove the weaker corners.
API Syntax
template void xFFAST(xF::Mat & _src_mat,ap_uint<32> list[MAXPNTS],unsigned char _threshold,uint32_t *nCorners)
Parameter Descriptions
The following table describes the template and the function parameters.
Parameter | Description |
---|---|
NMS | If NMS == 1, non-maximum suppression is applied to detected corners (keypoints). The value should be 0 or 1. |
MAXPNTS | Maximum number of corners that can be detected by the kernel. |
SRC_T | Input pixel type. Only 8-bit, unsigned, 1-channel is supported (XF_8UC1) |
ROWS | Maximum height of input image (must be a multiple of 8) |
COLS | Maximum width of input image (must be a multiple of 8) |
NPC | Number of pixels to be processed per cycle; possible options are XF_NPPC1 and XF_NPPC8 for 1 pixel and 8 pixel operations respectively. |
_src_mat | Input image |
list | List of corners. The corners are packed in 32-bit format. The lower 16-bits provides the column index and the upper 16-bits indicates the row index. |
_threshold | Threshold on the intensity difference between the center pixel and its neighbors. Usually it is taken around 20. |
nCorners | The number of corners detected in the input image, which is the output of kernel. |
Resource Utilization
The following table summarizes the resource utilization of the kernel for different configurations, generated usingVivado HLS 2017.1for theXilinx Xczu9eg-ffvb1156-1-i-es1FPGA, to process a grayscale HD (1080x1920) image for 1024 corners with NMS.
Name |
Resource Utilization | |
---|---|---|
1 pixel | 8 pixel | |
300 MHz | 150 MHz | |
BRAM_18K | 10 | 28 |
DSP48E | 0 | 0 |
FF | 2695 | 7310 |
LUT | 3792 | 20956 |
CLB | 769 | 3519 |
Performance Estimate
The following table summarizes the performance of kernel for different configurations, as generated usingVivado HLS 2017.1tool for theXilinx Xczu9eg-ffvb1156-1-i-es1, to process a grayscale HD (1080x1920) image for 1024 corners with non-maximum suppression (NMS).
Operating Mode | Operating Frequency (MHz) |
Filter Size | Latency Estimate |
---|---|---|---|
Max (ms) | |||
1 pixel | 300 | 3x3 | 7 |
8 pixel | 150 | 3x3 | 1.86 |