Methods and devices to dynamically tune an exposure time of an imager for three-dimensional profiling of an object
Methods and devices for dynamically tuning an exposure time of an imager are disclosed herein. The method captures, via an imaging assembly of a device, a first image of an object. The imaging assembly comprises a light source and at least one imager having a first exposure time during capture of the first image. The method determines an average number of a first class of pixels per column of pixels present in the first image and determines whether the average number of the first class of pixels per column of pixels is within a range. If the average number of the first class of pixels per column of pixels is not within the range, the method modifies the first exposure time of the at least one imager by one of decreasing or increasing the first exposure time of the at least one imager based on a classification of the first image.
1 . A method, comprising:
capturing, via an imaging assembly of a device, a first image of an object, the imaging assembly having a light source and at least one imager having a first exposure time during capture of the first image, and the first image having a first region and a second region;
determining an average number of a first class of pixels per column of pixels present in the first image based on a number of the first class of pixels present in the first image and a number of columns of pixels of the first image;
determining whether the average number of the first class of pixels per column of pixels is within a predetermined range;
responsive to determining the average number of the first class of pixels per column of pixels is not within the predetermined range, modifying the first exposure time of the at least one imager by one of decreasing the first exposure time of the at least one imager or increasing the first exposure time of the at least one imager based on a classification of the first image, wherein
the first region is a line indicative of light present in the first image,
the second region is indicative of a background of the first image, and
the first class of pixels is indicative of pixels satisfying a brightness threshold present in the first image.
2 . The method of claim 1 , further comprising projecting, by the imaging assembly, light onto the object during capture of the first image.
3 . The method of claim 1 , further comprising capturing, via the imaging assembly of the device, a second image of the object based on a modified first exposure time of the at least one imager, the second image having a third region and a fourth region, wherein
the third region is a line indicative of light present in the second image, and
the fourth region is indicative of a background of the second image.
4 . The method of claim 1 , wherein
the device is a three-dimensional profiler;
the light source is a laser and the light present in the first image is laser light; and
the first image is a laser profile image.
5 . The method of claim 1 , wherein
the average number of the first class of pixels per column of pixels is one of a floating point or a fixed point value; and
the predetermined range is indicative of a target range of the average number of the first class of pixels per column of pixels comprising a thickness of the line.
6 . The method of claim 1 , wherein modifying the first exposure time of the at least one imager comprises:
determining whether the average number of the first class of pixels per column of pixels exceeds the predetermined range;
responsive to determining the average number of the first class of pixels per column of pixels exceeds the predetermined range,
classifying the first image as over exposed, and
decreasing the first exposure time of the at least one imager; and
responsive to determining the average number of the first class of pixels per column of pixels does not exceed the predetermined range,
determining the average number of the first class of pixels per column of pixels is below the predetermined range,
classifying the first image as under exposed, and
increasing the first exposure time of the at least one imager.
7 . The method of claim 1 , wherein modifying the first exposure time of the at least one imager comprises:
determining whether the average number of the first class of pixels per column of pixels is below the predetermined range;
responsive to determining the average number of the first class of pixels per column of pixels is below the predetermined range,
classifying the first image as under exposed, and
increasing the first exposure time of the at least one imager; and
responsive to determining the average number of the first class of pixels per column of pixels is not below the predetermined range,
determining the average number of the first class of pixels per column of pixels exceeds the predetermined range,
classifying the first image as over exposed, and
decreasing the first exposure time of the at least one imager.
8 . The method of claim 1 , wherein decreasing the first exposure time of the at least one imager comprises:
determining a second exposure time of the imager to generate a second image with an average number of first class of pixels per column of pixels within the predetermined range based on the average number of first class of pixels per column of pixels of the first region and the first exposure time of the at least one imager; and
decreasing the first exposure time of the at least one imager, based on the second exposure time of the at least one imager, to be within the predetermined range.
9 . The method of claim 8 , wherein
the second exposure time of the at least one imager is indicative of the first exposure time of the at least one imager modified by an adjustment factor of Exp(t)/Exp(m) where Exp(t) is indicative of an exposure time for an average number of a first class of pixels per column in a center of the predetermined range based on a brightness of the laser and Exp(m) is indicative of the first exposure time of the average number of first class of pixels per column of pixels of the first region based on the same brightness of the laser.
10 . The method of claim 1 , increasing the first exposure time of the at least one imager comprises:
determining whether the average number of the first class of pixels per column of pixels exceeds a minimum threshold;
responsive to determining the average number of the first class of pixels exceeds the minimum threshold,
determining a second exposure time of the at least one imager to generate a second target range of another average number of first class of pixels per column of pixels of the first region based on the average number of first class of pixels per column of pixels of the first region and the first exposure time of the at least one imager, and
increasing the first exposure time of the at least one imager, based on the second exposure time of the imager, to be within the second target range of the another average number of the first class of pixels per column of pixels of the first region; and
responsive to determining the average number of the first class of pixels per column of pixels does not exceed the minimum threshold,
determining an average number of a second class of pixels per column of pixels present in the first image based on a number of the second class of pixels present in the first image and the number of columns of pixels of the first image,
determining an average number of a third class of pixels per column of pixels present in the first image based on a number of the third class of pixels present in the first image and the number of columns of pixels of the first image, and
increasing the first exposure time of the imager by a predetermined factor based on a highest class of pixels among the second and third classes of pixels having a minimum average number of pixels per column.
11 . A device, comprising:
an imaging assembly having a light source and at least one imager;
one or more processors; and
a non-transitory computer-readable memory coupled to the one or more processors, the memory storing instructions thereon that, when executed by the one or more processors, cause the one or more processors to:
receive a first image of an object, the first image being captured by the at least one imager utilizing a first exposure time, and the first image having a first region and a second region;
determine an average number of a first class of pixels per column of pixels present in the first image based on a number of the first class of pixels present in the first image and a number of columns of pixels of the first image;
determine whether the average number of the first class of pixels per column of pixels is within a predetermined range;
responsive to determining the average number of the first class of pixels per column of pixels is not within the predetermined range, modifying the first exposure time of the at least one imager by one of decreasing the first exposure time of the at least one imager or increasing the first exposure time of the at least one imager based on a classification of the first image, wherein
the first region is a line indicative of light present in the first image,
the second region is indicative of a background of the first image, and
the first class of pixels is indicative of pixels satisfying a brightness threshold present in the first image.
12 . The device of claim 11 , wherein the instructions, when executed, further cause the one or more processors to project, by the imaging assembly, light onto the object during capture of the first image.
13 . The device of claim 11 , wherein the instructions, when executed, further cause the one or more processors to receive a second image having a third region and a fourth region, the second image being captured by the at least one imager utilizing a modified first exposure time of the at least one imager, wherein
the third region is a line indicative of laser light present in the second image, and
the fourth region is indicative of a background of the second image.
14 . The device of claim 11 , wherein
the device is a three-dimensional profiler;
the light source is a laser and the light present in the first image is laser light; and
the first image is a laser profile image.
15 . The device of claim 11 , wherein
the average number of the first class of pixels per column of pixels is one of a floating point or a fixed point value; and
the predetermined range is indicative of a target range of the average number of the first class of pixels per column of pixels comprising a thickness of the line.
16 . The device of claim 11 , wherein the instructions, when executed, cause the one or more processors to modify the first exposure time of the at least one imager by:
determining whether the average number of the first class of pixels per column of pixels exceeds the predetermined range;
responsive to determining the average number of the first class of pixels per column of pixels exceeds the predetermined range,
classifying the first image as over exposed, and
decreasing the first exposure time of the at least one imager; and
responsive to determining the average number of the first class of pixels per column of pixels does not exceed the predetermined range,
determining the average number of the first class of pixels per column of pixels is below the predetermined range,
classifying the first image as under exposed, and
increasing the first exposure time of the at least one imager.
17 . The device of claim 11 , wherein the instructions, when executed, cause the one or more processors to modify the first exposure time of the at least one imager by:
determining whether the average number of the first class of pixels per column of pixels is below the predetermined range;
responsive to determining the average number of the first class of pixels per column of pixels is below the predetermined range,
classifying the first image as under exposed, and
increasing the first exposure time of the at least one imager; and
responsive to determining the average number of the first class of pixels per column of pixels is not below the predetermined range,
determining the average number of the first class of pixels per column of pixels exceeds the predetermined range,
classifying the first image as over exposed, and
decreasing the first exposure time of the at least one imager.
18 . The device of claim 11 , wherein the instructions, when executed, further cause the one or more processors to decrease the first exposure time of the at least one imager by:
determining a second exposure time of the at least one imager to generate a second image with an average number of first class of pixels per column within the predetermined range based on the average number of first class of pixels per column of pixels of the first region and the first exposure time of the at least one imager; and
decreasing the first exposure time of the at least one imager, based on the second exposure time of the at least one imager, to be within the predetermined range.
19 . The device of claim 18 , wherein
the second exposure time of the at least one imager is indicative of the first exposure time of the at least one imager modified by an adjustment factor of Exp(t)/Exp(m) where Exp(t) is indicative of an exposure time for an average number of a first class of pixels per column in a center of the predetermined range based on a brightness of the laser and Exp(m) is indicative of the first exposure time of the average number of first class of pixels per column of pixels of the first region based on the same brightness of the laser.
20 . The device of claim 11 , wherein the instructions, when executed, further cause the one or more processors to increase the first exposure time of the at least one imager by:
determining whether the average number of the first class of pixels per column of pixels exceeds a minimum threshold;
responsive to determining the average number of the first class of pixels exceeds the minimum threshold,
determining a second exposure time of the at least one imager to generate a second target range of another average number of first class of pixels per column of pixels of the first region based on the average number of first class of pixels per column of pixels of the first region and the first exposure time of the at least one imager, and
increasing the first exposure time of the at least one imager, based on the second exposure time of the at least one imager, to be within the second target range of the another average number of the first class of pixels per column of pixels of the first region; and
responsive to determining the average number of the first class of pixels per column of pixels does not exceed the minimum threshold,
determining an average number of a second class of pixels per column of pixels present in the first image based on a number of the second class of pixels present in the first image and the number of columns of pixels of the first image,
determining an average number of a third class of pixels per column of pixels present in the first image based on a number of the third class of pixels present in the first image and the number of columns of pixels of the first image, and
increasing the first exposure time of the at least one imager by a predetermined factor based on a highest class of pixels among the second and third classes of pixels having a minimum average number of pixels per column.
21 . A non-transitory computer-readable medium storing instructions thereon that, when executed by one or more processors, cause the one or more processors to:
receive, via an imaging assembly of a device, a first image of an object, the imaging assembly having a light source and at least one imager having a first exposure time during capture of the first image, and the first image having a first region and a second region;
determine an average number of a first class of pixels per column of pixels present in the first image based on a number of the first class of pixels present in the first image and a number of columns of pixels of the first image;
determine whether the average number of the first class of pixels per column of pixels is within a predetermined range;
responsive to determining the average number of the first class of pixels per column of pixels is not within the predetermined range, modifying the first exposure time of the at least one imager by one of decreasing the first exposure time of the at least one imager or increasing the first exposure time of the at least one imager based on a classification of the first image, wherein
the first region is a line indicative of light present in the first image,
the second region is indicative of a background of the first image, and
the first class of pixels is indicative of pixels satisfying a brightness threshold present in the first image.
22 . The non-transitory computer-readable medium of claim 21 , wherein the instructions, when executed, further cause the one or more processors to project, by the imaging assembly, light onto the object during capture of the first image.
23 . The non-transitory computer-readable medium of claim 21 , wherein the instructions, when executed, further cause the one or more processors to receive a second image having a third region and a fourth region, the second image being captured by the at least one imager utilizing a modified first exposure time of the at least one imager, wherein
the third region is a line indicative of laser light present in the second image, and
the fourth region is indicative of a background of the second image.
24 . The non-transitory computer-readable medium of claim 21 , wherein
the device is a three-dimensional profiler;
the light source is a laser and the light present in the first image is laser light; and
the first image is a laser profile image.
25 . The non-transitory computer-readable medium of claim 21 , wherein
the average number of the first class of pixels per column of pixels is one of a floating point or a fixed point value; and
the predetermined range is indicative of a target range of the average number of the first class of pixels per column of pixels comprising a thickness of the line.
26 . The non-transitory computer-readable medium of claim 21 , wherein the instructions, when executed, further cause the one or more processors to modify the first exposure time of the at least one imager by:
determining whether the average number of the first class of pixels per column of pixels exceeds the predetermined range;
responsive to determining the average number of the first class of pixels per column of pixels exceeds the predetermined range,
classifying the first image as over exposed, and
decreasing the first exposure time of the at least one imager; and
responsive to determining the average number of the first class of pixels per column of pixels does not exceed the predetermined range,
determining the average number of the first class of pixels per column of pixels is below the predetermined range,
classifying the first image as under exposed, and
increasing the first exposure time of the at least one imager.
27 . The non-transitory computer-readable medium of claim 21 , wherein the instructions, when executed, further cause the one or more processors to modify the first exposure time of the at least one imager by:
determining whether the average number of the first class of pixels per column of pixels is below the predetermined range;
responsive to determining the average number of the first class of pixels per column of pixels is below the predetermined range,
classifying the first image as under exposed, and
increasing the first exposure time of the at least one imager; and
responsive to determining the average number of the first class of pixels per column of pixels is not below the predetermined range,
determining the average number of the first class of pixels per column of pixels exceeds the predetermined range,
classifying the first image as over exposed, and
decreasing the first exposure time of the at least one imager.
28 . The non-transitory computer-readable medium of claim 21 , wherein the instructions, when executed, further cause the one or more processors to decrease the first exposure time of the at least one imager by:
determining a second exposure time of the at least one imager to generate a second image with an average number of first class of pixels per column of pixels within the predetermined range based on the average number of first class of pixels per column of pixels of the first region and the first exposure time of the at least one imager; and
decreasing the first exposure time of the at least one imager, based on the second exposure time of the at least one imager, to be within the predetermined range.
29 . The non-transitory computer-readable medium of claim 28 , wherein
the second exposure time of the at least one imager is indicative of the first exposure time of the at least one imager modified by an adjustment factor of Exp(t)/Exp(m) where Exp(t) is indicative of an exposure time for an average number of a first class of pixels per column in a center of the predetermined range based on a brightness of the laser and Exp(m) is indicative of the first exposure time of the average number of first class of pixels per column of pixels of the first region based on the same brightness of the laser.
30 . The non-transitory computer-readable medium of claim 21 , wherein the instructions, when executed, further cause the one or more processors to increase the first exposure time of the at least one imager by:
determining whether the average number of the first class of pixels per column of pixels exceeds a minimum threshold;
responsive to determining the average number of the first class of pixels exceeds the minimum threshold,
determining a second exposure time of the at least one imager to generate a second target range of another average number of first class of pixels per column of pixels of the first region based on the average number of first class of pixels per column of pixels of the first region and the first exposure time of the at least one imager, and
increasing the first exposure time of the at least one imager, based on the second exposure time of the at least one imager, to be within the second target range of the another average number of the first class of pixels per column of pixels of the first region; and
responsive to determining the average number of the first class of pixels per column of pixels does not exceed the minimum threshold,
determining an average number of a second class of pixels per column of pixels present in the first image based on a number of the second class of pixels present in the first image and the number of columns of pixels of the first image,
determining an average number of a third class of pixels per column of pixels present in the first image based on a number of the third class of pixels present in the first image and the number of columns of pixels of the first image, and
increasing the first exposure time of the at least one imager by a predetermined factor based on a highest class of pixels among the second and third classes of pixels having a minimum average number of pixels per column.