Feature point identification in sparse optical flow based tracking in a computer vision system
A method for sparse optical flow based tracking in a computer vision system is provided that includes detecting feature points in a frame captured by a monocular camera in the computer vision system to generate a plurality of detected feature points, generating a binary image indicating locations of the detected feature points with a bit value of one, wherein all other locations in the binary image have a bit value of zero, generating another binary image indicating neighborhoods of currently tracked points, wherein locations of the neighborhoods in the binary image have a bit value of zero and all other locations in the binary image have a bit value of one, and performing a binary AND of the two binary images to generate another binary image, wherein locations in the binary image having a bit value of one indicate new feature points detected in the frame.
1 . A method comprising:
generating a first image to indicate locations of a first set of points detected based on a first frame, wherein the locations of the first set of points are indicated by a first value, and wherein a remainder of the first image is indicated by a second value;
generating a second image to indicate neighborhoods each of which surrounds one point of a second set of points detected based on a second frame, wherein the neighborhoods are indicated in the second image by the second value, and wherein a remainder of the second image is indicated by the first value; and
generating a third image based on the first image and the second image to indicate locations of a subset of the first set of points that are excluded from the neighborhoods, wherein the locations of the subset of the first set of points and a remainder of the third image are indicated by different values.
2 . The method of claim 1 , wherein the second frame is captured prior to the first frame.
3 . The method of claim 1 , comprising:
determining a set of coordinates for each point of the subset of the first set of points based on the third image.
4 . The method of claim 1 , wherein each of the neighborhoods corresponds to a N×N pixel area, and N is an integer.
5 . The method of claim 1 , wherein the first set of points corresponds to a first set of feature points detected within the first frame, and wherein the second set of points corresponds to a second set of feature points detected within the second frame.
6 . The method of claim 1 , wherein the first value is a first binary value and the second value is a second binary value.
7 . The method of claim 6 , wherein the first binary value is a binary one and the second binary value is a binary zero.
8 . A non-transitory computer readable medium storing instructions that, when executed by one or more processors, cause the one or more processors to:
generate a first image to indicate locations of a first set of points detected based on a first frame, wherein the locations of the first set of points are indicated by a first value, and wherein a remainder of the first image is indicated by a second value;
generate a second image to indicate neighborhoods each of which surrounds one point of a second set of points detected based on a second frame, wherein the neighborhoods are indicated in the second image by the second value, and wherein a remainder of the second image is indicated by the first value; and
generate a third image based on the first image and the second image to indicate locations of a subset of the first set of points that are excluded from the neighborhoods, wherein the locations of the subset of the first set of points and a remainder of the third image are indicated by different values.
9 . The non-transitory computer readable medium of claim 8 , wherein the second frame is captured by a camera prior to the first frame.
10 . The non-transitory computer readable medium of claim 8 , wherein to generate the third image, the instructions cause the one or more processors to:
determine a set of coordinates for each point of the subset of the first set of points based on the third image.
11 . The non-transitory computer readable medium of claim 8 , wherein each of the neighborhoods corresponds to a N×N pixel area, and N is an integer.
12 . The non-transitory computer readable medium of claim 8 , wherein the first value is a first binary value and the second value is a second binary value.
13 . The non-transitory computer readable medium of claim 12 , wherein the first binary value is a binary one and the second binary value is a binary zero.
14 . A system, comprising:
memory storing instructions; and
one or more processors configured to execute the instructions to:
generate a first image to indicate locations of a first set of points detected based on a first frame, wherein the locations of the first set of points are indicated by a first value and a remainder of the first image is indicated by a second value;
generate a second image to indicate neighborhoods each of which surrounds one point of a second set of points detected based on a second frame, wherein the neighborhoods are indicated in the second image by the second value and a remainder of the second image is indicated by the first value; and
generate a third image based on the first image and the second image to indicate locations of a subset of the first set of points that are excluded from the neighborhoods, wherein the locations of the subset of the first set of points are indicated by a value different from a remainder of the third image.
15 . The system of claim 14 , wherein each of the neighborhoods corresponds to a N×N pixel area centered around the one point of the second set of points, and N is an integer.
16 . The system of claim 14 , wherein the first value is a first binary value and the second value is a second binary value.
17 . The system of claim 16 , wherein the first binary value is a binary one and the second binary value is a binary zero.