Image Filter Image Find Objects navigation bar

Table of Contents

Image Find Corners

Finds corners within an image.

Library

QUARC Targets/Image Processing/Generic

MATLAB Command Line

Click to copy the following command line to the clipboard. Then paste it in the MATLAB Command Window:

qc_open_library('quarc_library/Image Processing/Generic')

Description

Image Find Corners

The Image Find Corners block finds corners within an image. It is similar to the Corner Detection block in the Computer Vision Toolbox, but may yield substantially better performance.

The Image Find Corners block currently supports only grayscale (HxW) uint8 images. It uses the FastN algorithm to perform a local intensity comparison to locate corners in the image. The FastN algorithm looks at a circle of pixels surrounding a central pixel as shown:

             
  i          
             
      c      
             
             
             

In this example, the circle has radius 3. Let Ic be the intensity of the central pixel, c, and Ii be the intensity of a pixel, i, on the circle. A pixel on the circle is considered a valid "light" surrounding pixel if Ii - Ic ≥ T, where T is the threshold specified in the Threshold parameter. A surrounding pixel is also considered valid if Ic - Ii ≥ T. In this case, it is considered a valid "dark" surrounding pixel. If N contiguous pixels on the circle qualify as valid surrounding pixels then the algorithm considers a corner to have been detected, where N is specified in the Minimum number of pixels parameter. The basic idea is that corners are identifiable as relatively tight arcs (small circle radius) that curve through a minimum angle (determined by the minimum number of pixels). The threshold helps to detect edges. A smaller threshold will result in more corners being detected, while a larger threshold will result in fewer corners being found.

The current implementation supports the following combinations of circle radii and minimum number of contiguous pixels on the circle to define a corner:

Circle Radius

Pixels In Circle

Minimum Number of Pixels

1

8

5 ≥ N ≥ 8

2

12

7 ≥ N ≥ 12

3

16

9 ≥ N ≥ 16

5

28

15 ≥ N ≥ 28

7

40

21 ≥ N ≥ 40

9

52

27 ≥ N ≥ 52

The Image Find Corners block outputs a grayscale image showing the location of each corner detected. The intensity of each pixel contains additional information. If the corner detected involved valid light surrounding pixels, then the intensity of the output pixel takes the form: 01xxxxxx in binary. If the corner involved valid dark surrounding pixels, then the intensity of the output pixel takes the form: 10xxxxxx in binary. If no corner is found at a pixel location then the output pixel is zero.

For each corner found, the block also outputs the x and y coordinates of the corner, the angle of the corner and the corner metric or score computed for the corner.

Input Ports

img

The input is a grayscale HxW uint8 image.

Output Ports

img

The output is a grayscale HxW uint8 image containing information about each corner. If a pixel is zero it means no corner was found at that location.

#

The number of corners actually found. This number may be more or less than the number specified in the Number of corners parameter.

x

A vector containing the x coordinate of each corner detected. The length of this vector is determined by the Number of corners parameter. However, the number of valid entries is determined by the # output.

y

A vector containing the y coordinate of each corner detected. The length of this vector is determined by the Number of corners parameter. However, the number of valid entries is determined by the # output.

ang

A vector containing the angle of each corner detected. The length of this vector is determined by the Number of corners parameter. However, the number of valid entries is determined by the # output.

score

A vector containing the metric or score of each corner detected. A higher metric value indicates greater confidence in the corner. The length of this vector is determined by the Number of corners parameter. However, the number of valid entries is determined by the # output.

Parameters and Dialog Box

Image Find Corners

Algorithm

The algorithm to use for finding corners. Currently only the FastN algorithm is supported.

Number of corners

The number of corners to find. This parameter affects the size of the outputs. The algorithm may find more or fewer corners. The actual number of corners found will be output from the # output.

Threshold (tunable offline)

The threshold, T, which determines whether a pixel on the circle is a valid surrounding pixel. If the difference in intensity between the center pixel, c, and a pixel on the circle, i, is greater than or equal to this threshold then the pixel is considered a valid surrounding pixel and will be considered in determining whether a corner exists.

Minimum number of pixels (tunable offline)

The minimum number of contiguous pixels that must be valid on the circle to qualify as a corner.

Number of bins for orientation (tunable offline)

The number of bins for determining orientation.

Use variable-sized outputs

If this option is checked then all outputs but the img and # output will be variable-size signals, whose dimension varies with the number of corners actually found, up to the number of corners specified in the Number of corners parameter. If it is not checked, then the outputs will be fixed-size signals, whose dimension is determined by the Number of corners parameter.

Use complex output

If this option is checked then the points output, pt, becomes a complex N-vector. The real component will be the row and the imaginary component the column. Otherwise the output will be a 2xN matrix.

Targets

Target Name

Compatible*

Model Referencing

Comments

QUARC Win32 Target

No

No

Not currently supported

QUARC Win64 Target

Yes

Yes

QUARC Linux Nvidia Target

Yes

Yes

QUARC Linux QBot Platform Target

Yes

Yes

QUARC Linux QCar 2 Target

Yes

Yes

QUARC Linux QDrone 2 Target

Yes

Yes

QUARC Linux Raspberry Pi 3 Target

Yes

Yes

QUARC Linux Raspberry Pi 4 Target

Yes

Yes

QUARC Linux RT ARMv7 Target

No

No

Not currently supported

QUARC Linux x64 Target

Yes

Yes

QUARC Linux DuoVero Target

No

No

Not currently supported

QUARC Linux DuoVero 2016 Target

Yes

Yes

QUARC Linux Verdex Target

No

No

Not currently supported

QUARC QNX x86 Target

No

No

Not currently supported

Rapid Simulation (RSIM) Target

No

No

Not currently supported

S-Function Target

No

N/A

Old technology. Use model referencing instead.

Normal simulation

Yes

Yes

* Compatible means that the block can be compiled for the target.

 

navigation bar