Systems, methods, and media for encoding structured light imaging patterns and estimating depths in a scene
In accordance with some embodiments, systems, methods and media for encoding structured light imaging patterns and estimating depths in a scene are provided. In some embodiments, a system for estimating depths in a scene is provided, the system comprising: a light source; an image sensor; a hardware processor programmed to: cause the light source to emit K light patterns toward the scene, each of the K light patterns is different and includes a trapezoid-shaped wave, and at least one of the K light patterns includes at least two trapezoid-shaped waves; cause the image sensor to generate an intensity value during emission of each of the K light patterns such that the pixel is associated with at least K intensity values; determine a depth estimate for a portion of the scene imaged by the pixel based on the K intensity values associated with the pixel.
1. A system for estimating depths in a scene, the system comprising:
a light source;
an image sensor comprising a pixel;
at least one hardware processor that is programmed to:
cause the light source to emit K light patterns toward the scene, wherein each of the K light patterns includes at least one trapezoid-shaped wave and is different from each of the other K light patterns, and wherein at least one of the K light patterns includes at least two trapezoid-shaped waves, wherein K>4;
cause the image sensor to generate an intensity value during emission of each of the K light patterns such that the pixel is associated with at least K intensity values;
determine a depth estimate for a portion of the scene imaged by the pixel based on the K intensity values associated with the pixel.
2. The system of claim 1 , wherein each of the K light patterns is based on a coding function, and wherein the K light patterns are based on a Hamiltonian cycle of a K-dimensional hypercube.
3. The system of claim 2 , wherein the at least one hardware processor is further programmed to cause the light source to emit a first light pattern of the K light patterns by causing a first plurality of columns of the light source to emit light at a maximum intensity, and causing at least one column adjacent to the first plurality of columns to emit light at a fraction of the maximum intensity.
4. The system of claim 1 , wherein the light source comprises a plurality of columns, each of the plurality of columns associated with a column index c, and wherein the plurality of columns is sub-divided into at least 2 K −4 sub-intervals λ such that in each sub-interval K−1 of the light patterns maintains a constant value over the columns in the sub-interval and one of the K patterns varies across the columns in the sub-interval.
5. The system of claim 4 , wherein the at least one hardware processor is further programmed to determine a column index c′ that is associated with a code corresponding to the K values associated with the pixel.
6. The system of claim 5 , wherein the at least one hardware processor is further programmed to:
identify a median value of the K values associated with the pixel;
cluster K−1 of the K values associated with the pixel into a low intensity cluster, and a high intensity cluster;
determine a sub-interval of the at least 2 K −4 sub-intervals in which column index c′ is located based on an order in which the K values were generated, and which of the K values is included in the low intensity cluster; and
determine c′ based on the sub-interval and the median value.
7. The system of claim 6 , wherein the at least one hardware processor is further programmed to:
determine a location K within the sub-interval based on the relationship
κ
=
I
med
-
I
m
i
n
I
m
ax
-
I
m
i
n
where I med is the median value, I min is a mean of values in the low intensity cluster, and I max is a mean of values in the high intensity cluster; and
determine c′ based on the location K.
8. A method for estimating depths in a scene, the method comprising:
causing a light source to emit K light patterns toward the scene, wherein each of
the K light patterns includes at least one trapezoid-shaped wave and is different from each of the other K light patterns, and wherein at least one of the K light patterns includes at least two trapezoid-shaped waves, wherein K>4;
causing an image sensor comprising a pixel to generate an intensity value during emission of each of the K light patterns such that the pixel is associated with at least K intensity values;
determine a depth estimate for a portion of the scene imaged by the pixel based on the K intensity values associated with the pixel.
9. The method of claim 8 , wherein each of the K light patterns is based on a coding function, and wherein the K light patterns are based on a Hamiltonian cycle of a K-dimensional hypercube.
10. The method of claim 9 , further comprising causing the light source to emit a first light pattern of the K light patterns by causing a first plurality of columns of the light source to emit light at a maximum intensity, and causing at least one column adjacent to the first plurality of columns to emit light at a fraction of the maximum intensity.
11. The method of claim 8 , wherein the light source comprises a plurality of columns, each of the plurality of columns associated with a column index c, and wherein the plurality of columns is sub-divided into at least 2 K −4 sub-intervals λ such that within each sub-interval K−1 of the K light patterns maintains a constant value over the columns in the sub-interval and one pattern of the K patterns varies across the columns in the sub-interval.
12. The method of claim 11 , further comprising determining a column index c′ that is associated with a code corresponding to the K values associated with the pixel.
13. The method of claim 12 , further comprising:
identifying a median value of the K values associated with the pixel;
clustering K−1 of the K values associated with the pixel into a low intensity cluster, and a high intensity cluster;
determining a sub-interval of the at least 2 K −4 sub-intervals in which column index c′ is located based on an order in which the K values were generated, and which of the K values is included in the low intensity cluster; and
determining c′ based on the sub-interval and the median value.
14. The method of claim 13 , further comprising:
determining a location K within the sub-interval based on the relationship
κ
=
I
med
-
I
m
i
n
I
m
ax
-
I
m
i
n
where I med is the median value, I min is a mean of values in the low intensity cluster, and I max is a mean of values in the high intensity cluster; and
determining c′ based on the location K.
15. A non-transitory computer readable medium containing computer executable instructions that, when executed by a processor, cause the processor to perform a method for estimating depths in a scene, the method comprising:
causing a light source to emit K light patterns toward the scene, wherein each of the K light patterns includes at least one trapezoid-shaped wave and is different from each of the other K light patterns, and wherein at least one of the K light patterns includes at least two trapezoid-shaped waves, wherein K>4;
causing an image sensor comprising a pixel to generate an intensity value during emission of each of the K light patterns such that the pixel is associated with at least K intensity values;
determine a depth estimate for a portion of the scene imaged by the pixel based on the K intensity values associated with the pixel.
16. The non-transitory computer readable medium of claim 15 , wherein each of the K light patterns is based on a coding function, and wherein the K light patterns are based on a Hamiltonian cycle of a K-dimensional hypercube.
17. The non-transitory computer readable medium of claim 16 , further comprising causing the light source to emit a first light pattern of the K light patterns by causing a first plurality of columns of the light source to emit light at a maximum intensity, and causing at least one column adjacent to the first plurality of columns to emit light at a fraction of the maximum intensity.
18. The non-transitory computer readable medium of claim 15 , wherein the light source comprises a plurality of columns, each of the plurality of columns associated with a column index c, and wherein the plurality of columns is sub-divided into at least 2 K −4 sub-intervals λ such that within each sub-interval K−1 of the K light patterns maintains a constant value over the columns in the sub-interval and one pattern of the K patterns varies across the columns in the sub-interval.
19. The non-transitory computer readable medium of claim 18 , wherein the method further comprises determining a column index c′ that is associated with a code corresponding to the K values associated with the pixel.
20. The non-transitory computer readable medium of claim 19 , wherein the method further comprises:
identifying a median value of the K values associated with the pixel;
clustering K−1 of the K values associated with the pixel into a low intensity cluster, and a high intensity cluster;
determining a sub-interval of the at least 2 K −4 sub-intervals in which column index c′ is located based on an order in which the K values were generated, and which of the K values is included in the low intensity cluster; and
determining c′ based on the sub-interval and the median value.
21. The non-transitory computer readable medium of claim 20 , wherein the method further comprises:
determining a location K within the sub-interval based on the relationship
κ
=
I
med
-
I
m
i
n
I
m
ax
-
I
m
i
n
where I med is the median value, I min is a mean of values in the low intensity cluster, and I max is a mean of values in the high intensity cluster; and
determining c′ based on the location K.