OBJECT GROUPING FOR TIME-OF-FLIGHT RANGING ALGORITHMS
According to an embodiment, a method for object abstraction to distinguish between different objects in a depth map generated from a time-of-flight sensor is proposed. The method includes conducting a raster or spiral search on the depth map. The raster search includes alternating between sweeping left to right and then up and down systematically. The spiral search includes a circumferential-direction scanning. The method further includes detecting edges of an object to guide a continuation of the raster or spiral search, calculating one or more high-level parameters related to the object, and repeating the raster or spiral search for cells of the depth map that have not been previously swept to similarly identify other objects.
1 . A method for object abstraction to distinguish between different objects in a depth map generated from a time-of-flight sensor, the method comprising:
conducting a raster or spiral search on the depth map, the raster search comprising alternating between sweeping left to right and then up and down systematically, the spiral search comprising a circumferential-direction scanning;
detecting edges of an object to guide a continuation of the raster or spiral search;
calculating one or more high-level parameters related to the object; and
repeating the raster or spiral search for cells of the depth map that have not been previously swept to similarly identify other objects.
2 . The method of claim 1 , wherein the one or more high-level parameters of the object comprises a center, a size, a minimum range, a median range, a maximum range, a reflectance, or a combination thereof.
3 . The method of claim 1 , further comprising, for each raster or spiral search, determining a starting cell within the depth map not previously scanned and with the lowest range value.
4 . The method of claim 3 , wherein the raster search comprises scanning horizontally and vertically across the depth map starting from the starting cell, and wherein the spiral search comprises a circumferential-direction scanning from the starting cell.
5 . The method of claim 4 , wherein the raster search comprises shifting from the horizontal scan to the vertical scan in response to determining that a range value of a cell is above a threshold value and reverting to a previous cell before shifting to the vertical scan, and wherein the spiral search comprises shifting around a circle or outwards in a shape of a spiral from one cell to a next in response to determining that a range value of a cell is within the threshold value compared to surrounding cells.
6 . The method of claim 4 , wherein the raster search comprises shifting from the vertical scan to the horizontal scan in response to determining that a range value of a cell is above a threshold value and reverting to a previous cell before shifting to the horizontal scan, and wherein the spiral search comprises shifting around a circle or outwards in a shape of a spiral from one cell to a next until all scanned edge cells are determined to exceed a threshold value.
7 . The method of claim 1 , further comprising applying different threshold values to remove veiling glare effect for each object identified.
8 . A method for pseudo-circumferential search to determine a veiling effect in a depth map generated from a time-of-flight sensor, the method comprising:
determining a starting cell within the depth map having a maximum signal value;
generating a first boundary region comprising cells adjacent to the starting cell;
calculating a first ratio corresponding to a number of cells within the first boundary region having a range value within a first threshold value and a total number of cells within the first boundary region;
generating a next boundary region comprising cells adjacent to the first boundary region in response to the first ratio being above a second threshold; and
stopping the pseudo-circumferential search in response to the first ratio being below a second threshold, wherein the total number of cells within a penultimate boundary region is used to determine a veiling glare effect.
9 . The method of claim 8 , further comprising:
calculating a second ratio corresponding to a number of cells within the next boundary region having a range value within the first threshold value and a total number of cells within the next boundary region;
generating a third boundary region comprising cells adjacent to the next boundary region in response to the second ratio being above the second threshold; and
stopping the pseudo-circumferential search in response to the second ratio being below the second threshold.
10 . The method of claim 8 , further comprising:
determining a flatness measurement for each boundary region, wherein the veiling glare effect is determined based on the flatness measurement and the total number of cells within the penultimate boundary region.
11 . The method of claim 10 , further comprising calculating a confidence measurement value based on the flatness measurement and the total number of cells within the penultimate boundary region to determine the veiling glare effect.
12 . The method of claim 10 , wherein the flatness measurement is determined by calculating an R-squared value for the cells within each boundary region.
13 . The method of claim 8 , further comprising calculating an upper boundary and a lower boundary for each boundary region, wherein the first threshold is determined based on the upper boundary and the lower boundary.
14 . The method of claim 13 ,
wherein the lower boundary is set to a maximum of:
a previous lower boundary or, in response to a radial distance from the starting cell equaling one, a spot range, or
a mean range for the boundary region, and
wherein the upper boundary is set to the minimum:
a pre-defined merging distance, or
a mean range of an n th percentile of cells for the boundary region, where n is greater than one.
15 . A method for flatness measurement to determine a veiling effect in a depth map generated from a time-of-flight sensor, the method comprising:
determining a starting cell within the depth map having a maximum signal value;
generating a first boundary region comprising cells adjacent to the starting cell;
calculating a first flatness measurement for the first boundary region;
generating a next boundary region comprising cells adjacent to the first boundary region;
calculating a second flatness measurement for the next boundary region, wherein each flatness measurement is calculated based on a mean range value and a normalized error value for cells within a respective boundary region; and
calculating a total flatness measurement to determine a veiling glare effect.
16 . The method of claim 15 , further comprising performing a pseudo-circumferential search, the pseudo-circumferential search comprising:
calculating a first ratio corresponding to a number of cells within the first boundary region having a range value within a first threshold value and a total number of cells within the first boundary region;
generating a next boundary region comprising cells adjacent to the first boundary region in response to the first ratio being above a second threshold; and
stopping the pseudo-circumferential search in response to the first ratio being below a second threshold, wherein the total number of cells within a penultimate boundary region and the total flatness measurement is used to determine the veiling glare effect.
17 . The method of claim 16 , wherein the pseudo-circumferential search further comprises:
calculating a second ratio corresponding to a number of cells within the next boundary region having a range value within the first threshold value and a total number of cells within the next boundary region;
generating a third boundary region comprising cells adjacent to the next boundary region in response to the second ratio being above the second threshold; and
stopping the pseudo-circumferential search in response to the second ratio being below the second threshold.
18 . The method of claim 16 , further comprising calculating a confidence measurement value based on the total flatness measurement and the total number of cells within the penultimate boundary region to determine the veiling glare effect.
19 . The method of claim 16 , wherein the pseudo-circumferential search further comprises calculating an upper boundary and a lower boundary for each boundary region, wherein the first threshold is determined based on the upper boundary and the lower boundary.
20 . The method of claim 19 ,
wherein the lower boundary is set to a maximum of:
a previous lower boundary or, in response to a radial distance from the starting cell equaling one, a spot range, or
a mean range for the boundary region, and
wherein the upper boundary is set to the minimum:
a pre-defined merging distance, or
a mean range of an n th percentile of cells for the boundary region, where n is greater than one.