The present disclosure relates to a signal processing apparatus and a signal processing method, and more particularly to a signal processing apparatus and a signal processing method capable of correcting a deviation of position information of a dToF sensor.
A ToF sensor of a direct ToF method (hereinafter, also referred to as a dToF sensor) detects reflected light, which is pulse light reflected by an object, using a light receiving element referred to as a single photon avalanche diode (SPAD) in each pixel for light reception. In order to reduce noise caused by ambient light or the like, emission of the pulse light and reception of the reflected light thereof are repeated a predetermined number of times (for example, several to several hundred times), and the dToF sensor generates a histogram of time of flight of the pulse light, and calculates a distance to the object from the time of flight corresponding to a peak of the histogram.
It is known that an SN ratio is low and it is difficult to detect a peak position in distance measurement of a low-reflectivity or distant subject, distance measurement under an environment where external light has a strong influence of disturbance such as an outdoor environment, and the like. Therefore, by allowing the emitted pulse light to have a spot shape, a reach distance of the pulse light is expanded, in other words, the number of detection of the reflected light is increased. Since the spot-shaped pulse light is generally sparse pulse light, pixels that detect the reflected light are also sparse according to a spot diameter and an irradiation area.
In order to improve the SN ratio and to reduce power by efficient pixel driving according to the sparse reflected light detection environment, a plurality of adjacent pixels (referred to as a multipixel) of a part of a pixel array is regarded as one large pixel, and a light receiving operation is performed in units of multipixels to generate a histogram. For example, Patent Document 1 discloses a method of increasing an SN ratio instead of lowering a spatial resolution, by forming a multipixel by using any number of adjacent pixels such as two by three, three by three, three by six, three by nine, six by three, six by six, and nine by nine, creating a histogram by using signals of the multipixel, and calculating a distance.
A distance measurement sensor such as a dToF sensor is, for example, used together with an RGB camera in a volumetric capture technology for generating a 3D object of a subject from a moving image captured from multiple viewpoints and generating a virtual viewpoint image of the 3D object according to any viewing position. Furthermore, a distance measurement sensor such as the dToF sensor is also used together with the RGB camera in simultaneous localization and mapping (SLAM) or the like that simultaneously performs self position estimation and environmental map creation.
When three-dimensional position information of a distance measurement point acquired by the dToF sensor is made to correspond to a captured image obtained by the RGB camera, a deviation may occur in the position information acquired by the dToF sensor due to a calibration error, a distance measurement error, a deviation in exposure timing, or the like.
The present disclosure has been made in view of such a situation, and enables correction of a deviation of position information of a dToF sensor.
A signal processing apparatus according to one aspect of the present disclosure includes: an acquisition unit configured to acquire a distance histogram that is histogram data of time of flight of irradiation light at a predetermined distance measurement point of a distance measurement sensor; a determination unit configured to determine whether or not the predetermined distance measurement point is a distance measurement point as a positional deviation check target; and a correction unit configured to execute correction processing of correcting three-dimensional coordinates of the predetermined distance measurement point, the three-dimensional coordinates being computed from the distance histogram, on the basis of a determination result of similarity between the distance histogram of the predetermined distance measurement point and the distance histogram of a nearby distance measurement point near the predetermined distance measurement point, in a case where the predetermined distance measurement point is a distance measurement point as a positional deviation check target.
A signal processing method according to one aspect of the present disclosure includes, by a signal processing apparatus: acquiring a distance histogram that is histogram data of time of flight of irradiation light at a predetermined distance measurement point of a distance measurement sensor; determining whether or not the predetermined distance measurement point is a distance measurement point as a positional deviation check target; and executing correction processing of correcting three-dimensional coordinates of the predetermined distance measurement point, the three-dimensional coordinates being computed from the distance histogram, on the basis of a determination result of similarity between the distance histogram of the predetermined distance measurement point and the distance histogram of a nearby distance measurement point near the predetermined distance measurement point, in a case where the predetermined distance measurement point is a distance measurement point as a positional deviation check target.
In one aspect of the present disclosure, a distance histogram is acquired, which is histogram data of time of flight of irradiation light at a predetermined distance measurement point of a distance measurement sensor, determination is made as to whether or not the predetermined distance measurement point is a distance measurement point as a positional deviation check target, and correction processing of correcting three-dimensional coordinates that is of the predetermined distance measurement point and is computed from the distance histogram is executed on the basis of a determination result of similarity between the distance histogram of the predetermined distance measurement point and the distance histogram of a nearby distance measurement point near the predetermined distance measurement point, in a case where the predetermined distance measurement point is a distance measurement point as a positional deviation check target.
Note that the signal processing apparatus according to one aspect of the present disclosure can be implemented by causing a computer to execute a program. Furthermore, the program to be executed by the computer for realizing the signal processing apparatus according to one aspect of the present disclosure can be provided by being transmitted via a transmission medium or by being recorded on a recording medium.
The signal processing apparatus may be an independent device or a module incorporated in another device.
Hereinafter, modes for carrying out the technique of the present disclosure (hereinafter, referred to as embodiments) will be described with reference to the accompanying drawings. Note that, in the present specification and the drawings, components having substantially the same functional configurations are denoted by the same reference signs, and redundant descriptions are omitted. The description will be given in the following order.
A signal processing system 1 in
The signal processing apparatus 13 includes a data acquisition unit 21, a distance computation unit 22, a correction processing unit 23, a storage unit 24, and an output unit 25. The correction processing unit 23 includes a check target determination unit 31 and a coordinate correction unit 32.
The RGB camera 11 captures an image of a predetermined object as a subject, generates (a moving image of) an RGB image, and supplies the RGB image to the signal processing apparatus 13. The dToF sensor 12 is a distance measurement sensor configured to acquire distance information between with a subject by using a direct ToF method, and acquires distance information between with the same object as the object whose image is captured by the RGB camera 11. A relative positional relationship between the RGB camera 11 and the dToF sensor 12 is fixed, and imaging ranges of the RGB camera 11 and the dToF sensor 12 are calibrated. In other words, the imaging ranges of the RGB camera 11 and the dToF sensor 12 are the same, and a correspondence relationship of individual pixels between the RGB camera 11 and the dToF sensor 12 is known. In the present embodiment, in order to simplify the description, it is assumed that a difference in position between the RGB camera 11 and the dToF sensor 12 is negligible, and camera positions (camera orientations) of the RGB camera 11 and the dToF sensor 12 are the same.
As illustrated in
The dToF sensor 12 will be briefly described with reference to
The dToF sensor 12 detects reflected light, which is obtained when pulse light as irradiation light is reflected by an object, by using a light receiving element called a single photon avalanche diode (SPAD) in each pixel for light reception. In order to reduce noise caused by ambient light or the like, the dToF sensor 12 repeats emission of the pulse light and reception of the reflected light thereof a predetermined number of times (for example, several to several hundred times) to generate a histogram of time of flight of the pulse light, and outputs a distance histogram. A unit of outputting the distance histogram once for the same imaging range as that of the RGB camera 11 is referred to as one frame following the RGB camera 11.
It is known that an SN ratio is low and it is difficult to detect a peak position in distance measurement of a low-reflectivity or distant subject, distance measurement under an environment where external light has a strong influence of disturbance such as an outdoor environment, and the like. Therefore, by allowing the emitted pulse light to have a spot shape, a reach distance of the pulse light is expanded, in other words, the number of detection of the reflected light is increased. Since the spot-shaped pulse light is generally sparse pulse light, pixels that detect the reflected light are also sparse according to a spot diameter and an irradiation area.
In order to improve the SN ratio and to reduce power by efficient pixel driving according to the sparse reflected light detection environment, the dToF sensor 12 sets a plurality of adjacent pixels as a multipixel MP in accordance with the sparse spot light SP, and causes only a plurality of multipixels MP among all the pixels of a pixel array to perform a light receiving operation, to generate a histogram in units of the multipixels MP. In the example of
Note that, in
The RGB camera 11 in
The signal processing apparatus 13 acquires the RGB image captured by the RGB camera 11 and the distance histogram and the camera orientation generated by the dToF sensor 12, and generates and outputs three-dimensional coordinates of a predetermined object as a subject on a global coordinate system. In the following description, it is assumed that three-dimensional coordinates on the global coordinate system are represented even in a case of being simply described as three-dimensional coordinates.
That is, the signal processing apparatus 13 is a signal processing apparatus that performs processing of calculating three-dimensional coordinates of a predetermined object as a subject on the global coordinate system, on the basis of the distance histogram generated by the dToF sensor 12 and the camera orientation at that time. At that time, the signal processing apparatus 13 has a positional deviation correction function of correcting a positional deviation in a case where the calculated three-dimensional coordinates of the object are deviated from a position of the object on the RGB image due to a calibration error, a distance measurement error, a deviation in exposure timing, or the like.
In an RGB image 51 captured by the RGB camera 11, a car (automobile) 41, a person (pedestrian) 42, and a tree 43 are shown as subjects. A circle with a predetermined pattern illustrated by being superimposed on the RGB image 51 represents a distance measurement point K of the dToF sensor 12. The pattern attached to each distance measurement point K illustrated in
Here, attention is paid to one predetermined distance measurement point K11 among a large number of distance measurement points K of the dToF sensor 12. As a distance (three-dimensional coordinates) calculated on the basis of the distance histogram, the distance measurement point K11 has a distance corresponding to the car 41. However, the three-dimensional coordinates of the distance measurement point K11 calculated on the basis of the distance histogram are not a position of the car 41 but a position of the background 44. Such a positional deviation of the distance measurement point K11 occurs, for example, due to a calibration error or a distance measurement error of the dToF sensor 12. Alternatively, in a case where the distance histogram of the entire image-capturing range of the RGB camera 11 is acquired by sectioning the distance histogram into a plurality of frames because the number of distance measurement points K acquired by the dToF sensor 12 in one frame is small and sparse, such a positional deviation occurs due to a deviation in acquisition timing (exposure timing) of the distance histogram, movement of the object, or the like.
The signal processing apparatus 13 executes positional deviation correction processing of correcting a positional deviation of three-dimensional coordinates of the distance measurement point K such as the distance measurement point K11, and outputs the three-dimensional coordinates of each distance measurement point K. In the example of the distance measurement point K11, on the RGB image 51 of
Returning to the description of
The distance computation unit 22 computes three-dimensional coordinates (x, y, z) for every distance measurement point of the dToF sensor 12, on the basis of the distance histogram and the camera orientation from the data acquisition unit 21. More specifically, the distance computation unit 22 detects a peak region of a count value from histogram data of the multipixel MP corresponding to the spot light SP, and computes three-dimensional coordinates (x, y, z) from the detected peak region and the camera orientation.
Here, the peak region is detected as follows. For example, as illustrated in
Furthermore, as in the example of
The distance computation unit 22 supplies, to the correction processing unit 23, the distance histogram and the three-dimensional coordinates (x, y, z) of each distance measurement point computed from the distance histogram and the camera orientation. Note that the distance computation unit 22 may supply the histogram data of the peak region and the disturbance light intensity to the correction processing unit 23, instead of the distance histogram.
The correction processing unit 23 determines whether or not the positional deviation needs to be corrected with respect to the computed three-dimensional coordinates of each distance measurement point, by using the RGB image supplied from the data acquisition unit 21 and the three-dimensional coordinates (x, y, z) of each distance measurement point, and the distance histogram supplied from the distance computation unit 22. Then, in a case where it is determined that the positional deviation needs to be corrected, the correction processing unit 23 executes the positional deviation correction processing, and moves (corrects) the three-dimensional coordinates of the distance measurement point.
Specifically, the check target determination unit 31 and the coordinate correction unit 32 of the correction processing unit 23 set each of a plurality of distance measurement points included in one frame of the dToF sensor 12 as a distance measurement point of interest, and perform the following processing.
The check target determination unit 31 determines whether or not the distance measurement point of interest is a distance measurement point as a positional deviation check target, in other words, whether or not the distance measurement point of interest is a distance measurement point in which a positional deviation has highly possibly occurred. When determining that the distance measurement point of interest is a distance measurement point as a positional deviation check target, the check target determination unit 31 instructs the coordinate correction unit 32 to execute the positional deviation correction processing on the distance measurement point of interest. Whereas, when determining that the distance measurement point of interest is not a distance measurement point as a positional deviation check target, the check target determination unit 31 supplies the three-dimensional coordinates (x, y, z) of the distance measurement point of interest computed by the distance computation unit 22 and the distance histogram as they are (without performing the positional deviation correction processing) to the storage unit 24 to store.
In a case where execution of the positional deviation correction processing of the distance measurement point of interest is instructed from the check target determination unit 31, the coordinate correction unit 32 executes the positional deviation correction processing on the distance measurement point of interest. As the positional deviation correction processing, the coordinate correction unit 32 determines whether or not the positional deviation needs to be corrected, and executes processing of correcting (moving) the three-dimensional coordinates (x, y, z) of the distance measurement point of interest computed by the distance computation unit 22 when determining that the positional deviation needs to be corrected. The three-dimensional coordinates (x, y, z) and the distance histogram of the distance measurement point of interest after the positional deviation correction processing are supplied to and stored in the storage unit 24.
Furthermore, the correction processing unit 23 also supplies, at a predetermined timing, the RGB image supplied from the data acquisition unit 21, to the storage unit 24 to store. Either the check target determination unit 31 or the coordinate correction unit 32 may cause the storage unit 24 to store the RGB image.
When the processing has been completed for all the frames of the plurality of frames sequentially supplied from the dToF sensor 12, the correction processing unit 23 supplies an end notification to the output unit 25.
When the end notification is supplied from the correction processing unit 23, the output unit 25 outputs the three-dimensional coordinates of each distance measurement point of all the frames stored in the storage unit 24, as the three-dimensional coordinates after the correction processing.
Note that the correction processing unit 23 may supply the end notification to the output unit 25 in units of frames, for a plurality of frames sequentially supplied from the dToF sensor 12. In this case, the output unit 25 acquires the three-dimensional coordinates after the correction processing from the storage unit 24 in units of frames, and outputs the three-dimensional coordinates.
The signal processing apparatus 13 has the above configuration. Details of the correction processing unit 23 of the signal processing apparatus 13 will be further described below.
Next, check target determination processing performed by the check target determination unit 31 will be described.
The check target determination unit 31 determines whether or not the distance measurement point of interest is a distance measurement point as a check target, in other words, whether or not the distance measurement point of interest is a distance measurement point in which a positional deviation has highly possibly occurred.
Specifically, the positional deviation is likely to occur near an object boundary, or an influence of the positional deviation is large in a case where the positional deviation has occurred near the object boundary. Therefore, the check target determination unit 31 extracts a region near the object boundary as an edge region, from the RGB image captured by the RGB camera 11. Then, in a case where the distance measurement point of interest is included in the edge region, the check target determination unit 31 determines that the distance measurement point of interest is a distance measurement point as a check target in which a positional deviation has highly possibly occurred.
First, the check target determination unit 31 detects an edge of the RGB image 51 captured by the RGB camera 11, by using, for example, Canny's method or the like. An edge image 51E in
Next, the check target determination unit 31 determines an edge region having a predetermined width from the edge, by executing filtering processing of expanding the black pixel for N times (N is an integer of 2 or more) on the edge image 51E in which the edge is detected. In the example of
Note that the edge region may be determined by a method other than the expansion processing described above. For example, a region where motion has been detected from past several frames may be determined as the edge region. More specifically, by using the RGB image of past frames stored in the storage unit 24 and the RGB image of a current frame as inputs, a region in which the number of times of the expansion processing is increased for a portion with large motion in a dense optical flow image obtained by the Gunnar-Farneback method or the like may be determined as the edge region.
Next, the check target determination unit 31 uses camera internal parameters of the RGB camera 11 to obtain screen coordinates (u, v), on the RGB image 51, corresponding to the three-dimensional coordinates of the distance measurement point of interest. Then, in a case where the screen coordinates (u, v) of the distance measurement point of interest on the RGB image 51 are included in the edge region, the check target determination unit 31 determines that the distance measurement point of interest is a distance measurement point as a check target. Whereas, in a case where the screen coordinates (u, v) of the distance measurement point of interest on the RGB image 51 are located outside the edge region, it is determined that the distance measurement point of interest is not a distance measurement point as a check target. Note that camera internal parameters of the RGB camera 11 for converting the three-dimensional coordinates of the distance measurement point of interest into screen coordinates (u, v) are known.
In the example of
On the other hand, in a case where the distance measurement point of interest is a distance measurement point g2, screen coordinates (u, v) of a corresponding point gs2 of the distance measurement point g2 on the RGB image 51 are in the edge region. Therefore, the distance measurement point g2 is determined to be a distance measurement point as a check target.
Next, a description is given to the positional deviation correction processing executed by the coordinate correction unit 32 when the distance measurement point of interest is determined to be a distance measurement point as a check target.
The coordinate correction unit 32 executes the positional deviation correction processing by using nearby distance measurement points of M×M centered on the distance measurement point of interest K11. In the example of
Note that, in
The enlarged region 61 includes an edge 62, and is sectioned into a region 63 of the car 41 and a region 64 of the background 44, with the edge 62 as a boundary. Furthermore, a region having a predetermined width from the edge 62 is an edge region 65.
The coordinate correction unit 32 calculates a vector (e-a) from the position “a” of the distance measurement point of interest K11 to a nearest position “e” of the edge 62 in a screen coordinate system of the RGB image 51.
The coordinate correction unit 32 calculates similarity of the distance histogram between the distance measurement point of interest K11 and a plurality of nearby distance measurement points, and calculates a centroid vector of the similarity. In this example, an example will be described in which the coordinate correction unit 32 uses nine distance measurement points of 3×3 centered on the distance measurement point of interest K11 to calculate similarity between the distance measurement point of interest K11 and the eight surrounding distance measurement points K21 to K28, and calculates a centroid vector of the similarity.
The distance histogram includes not only single piece of distance information of the distance measurement point but also additional information such as reflectance of an object and disturbance light serving as a clue for determining a correspondence relationship with a surrounding distance measurement point and a correspondence relationship between adjacent frames. By comparing the distance histograms, for example, the following information can be used in calculating the similarity.
In the present embodiment, an example of (1) using correlation of distance histograms and an example of (2) using a distance in a manifold space will be described as examples of similarity calculation between distance histograms.
First, a similarity calculation method in a case where the similarity is calculated by (1) using correlation of distance histograms will be described.
When a distance histogram Ha of the distance measurement point of interest K11 includes N bins and has a count value of an i-th bin of Cai (i=1, 2, 3, . . . , N), the distance histogram Ha is expressed by Ha={Ca1, Ca2, . . . , CaN}. Furthermore, when a distance histogram Hb of one predetermined distance measurement point K2b among the distance measurement points K21 to K28 near the distance measurement point of interest K11 includes N bins, and has a count value of an i-th bin of Cbi (i=1, 2, 3, . . . , N), the distance histogram Hb is expressed by Hb={Cb1, Cb2, . . . , CbN}.
At this time, similarity rab between the distance histogram Ha and the distance histogram Hb can be expressed by the following Formula (1).
Ca_av in Formula (1) represents Ca_av=AVE (Ca1, Ca2, . . . , CaN), that is, an average value of N count values Ca1, Ca2, . . . , CaN of the distance histogram Ha. Similarly, Cb_av represents Cb_av=AVE (Cb1, Cb2, . . . , CbN), that is, an average value of N count values Cb1, Cb2, . . . , CbN of the distance histogram Hb. In Formula (1), rab corresponds to a correlation coefficient between the distance histogram Ha and the distance histogram Hb.
A similarity vector Vrab between the distance measurement point of interest K11 and the nearby distance measurement point K2b can be expressed by the following Formula (2) by using the similarity rab of Formula (1).
In Formula (2), “a” is a position vector of the distance measurement point K11, and “b” is a position vector of the distance measurement point K2b. Therefore, the similarity vector Vrab between the distance measurement point of interest K11 and the nearby distance measurement point K2b is obtained by multiplying a vector difference between the position vector “a” of the distance measurement point of interest K11 and the position vector “b” of the distance measurement point K2b by the similarity (correlation coefficient) rab between the position vector “a” and the position vector “b”.
For all of the eight distance measurement points K21 to K28 near the distance measurement point of interest K11, the similarity vector Vrab of Formula (2) is calculated and expressed as a similarity vector Vrabi (i=1, 2, . . . , 8).
A centroid vector “r” of the similarity vector Vrabi (i=1, 2, . . . , 8) of the distance measurement point of interest K11 and the nearby eight distance measurement points K21 to K28 is expressed by the following Formula (3).
M in Formula (3) is M2−1=8 because M=3 in the example of
Next, the coordinate correction unit 32 calculates an angle θ formed by the centroid vector “r” of the similarity vectors Vrab1 to Vrab8 of the eight distance measurement points K21 to K28 near the distance measurement point of interest K11 and the vector (e-a) from the position “a” of the distance measurement point of interest K11 toward the nearest position “e” of the edge 62.
In a case where the angle θ formed by the centroid vector “r” and the vector (e-a) is within a predetermined threshold value, for example, in a case where −π/2<θ<π/2, the coordinate correction unit 32 determines that directions of the two vectors match. Conversely, in a case where the angle θ formed by the centroid vector “r” and the vector (e-a) is larger than the predetermined threshold value, the coordinate correction unit 32 determines that the directions of the two vectors do not match.
In a case where the directions of the two vectors match, the coordinate correction unit 32 determines that the distance measurement point of interest K11 needs to be corrected, and moves (corrects) the position “a” of the distance measurement point of interest K11 such that the distance measurement point of interest K11 crosses the edge 62. For example, the coordinate correction unit 32 moves (corrects) the position “a” of the distance measurement point of interest K11 to the position “a′” in
As described above, it is possible to calculate the centroid vector “r” from the similarity vector vrab calculated by (1) using correlation of distance histograms, determine whether or not to correct the position “a” of the distance measurement point of interest K11, and correct the positional deviation of the distance measurement point of interest.
Next, a description is given to a similarity calculation method in a case where similarity is calculated by (2) using a distance in a manifold space.
As illustrated in
The coordinate correction unit 32 similarly calculates a peak count value Cb and a count value Db of disturbance light and performs Gaussian fitting, on the distance histogram Hb of one predetermined distance measurement point K2b among the distance measurement points K21 to K28 near the distance measurement point of interest K11. It is assumed that the distance histogram Hb is approximated to, for example, a normal distribution N (μb, σb2) of an average μb and a variance σb2.
Next, as illustrated in
Next, the coordinate correction unit 32 calculates a pseudo distance L between the point P and the point Q on the non-Euclidean space corresponding to the distance measurement point of interest K11 and the distance measurement point K2b, by using the following Formula (4).
In Formula (4), KL (p∥q) represents KL divergence between two normal distributions of the points P and Q. |Cp-Cq| is a difference between peak count values Cp and Cq of the points P and Q according to an L1 norm, and |Dp-Dq| is a difference between count values Dp and Dq of disturbance light of the points P and Q according to the L1 norm. Furthermore, “a”, “b”, and “c” are coefficients representing individual weights, and can be freely set in a range of 0 to 1.
That is, the pseudo distance L between the point P and the point Q on the non-Euclidean space corresponding to the distance measurement point of interest K11 and the distance measurement point K2b is calculated by a weighted sum of the KL divergence between the two points P and Q, the difference between the peak count values Cp and Cq, and the difference between the count values Dp and Dq of the disturbance light.
Next, the coordinate correction unit 32 calculates the similarity vector vrab of the distance measurement point of interest K11 and the nearby distance measurement point K2b, by using the following Formula (5) using the pseudo distance L.
Processing thereafter is similar to the case of using correlation of distance histograms. That is, for all of the eight distance measurement points K21 to K28 near the distance measurement point of interest K11, the similarity vector vrab of Formula (5) is calculated, and the similarity vector vrabi (i=1, 2, . . . , 8) is calculated. Then, the centroid vector “r” is calculated by using the above-described Formula (3), and the position “a” of the distance measurement point of interest K11 is moved (corrected) in accordance with whether or not the angle θ formed by the centroid vector “r” and the vector (e-a) is within a predetermined threshold value.
In a case of calculating similarity by using a distance in a manifold space described above, a data amount can be suppressed as compared with the case of using correlation of distance histograms.
In the example described above, assuming M=3, determination has been made as to whether or not to correct the distance measurement point of interest K11 by using the eight distance measurement points K21 to K28 near the distance measurement point of interest K11. However, it goes without saying that the number of nearby distance measurement points can be freely set.
Next, with reference to a flowchart of
Note that, in the position information calculation processing of
First, in step S1, the data acquisition unit 21 acquires the RGB image supplied from the RGB camera 11 and the distance histogram and the camera orientation supplied from the dToF sensor 12. The data acquisition unit 21 supplies the acquired RGB image to the correction processing unit 23, and supplies the acquired distance histogram and camera orientation to the distance computation unit 22.
In step S2, the distance computation unit 22 computes three-dimensional coordinates (x, y, z) for every distance measurement point on the basis of the distance histogram and the camera orientation from the data acquisition unit 21. More specifically, the distance computation unit 22 detects a peak region of a count value from histogram data of the multipixel MP corresponding to the spot light SP, and computes three-dimensional coordinates (x, y, z) from the detected peak region and the camera orientation. The computed three-dimensional coordinates (x, y, z) of each distance measurement point are supplied to the correction processing unit 23 together with the distance histogram.
In step S3, the correction processing unit 23 determines a predetermined one of distance measurement points included in one frame supplied from the dToF sensor 12 as the distance measurement point of interest, and the processing proceeds to step S4.
In step S4, the check target determination unit 31 of the correction processing unit 23 executes the check target determination processing. For example, the check target determination unit 31 determines an edge region by detecting an edge of the RGB image 51 and performing the expansion processing, and determines whether or not the distance measurement point of interest is a distance measurement point as a check target, on the basis of whether or not screen coordinates (u, v) of the distance measurement point of interest on the RGB image 51 are included in the edge region.
In step S5, the check target determination unit 31 determines whether the distance measurement point of interest is a distance measurement point as a check target, on the basis of a result of the check target determination processing. When it is determined in step S5 that the distance measurement point of interest is not a distance measurement point as a check target, the processing proceeds to step S6. When it is determined that the distance measurement point of interest is a distance measurement point as a check target, the processing proceeds to step S7.
In step S6 in a case where it has been determined that the distance measurement point of interest is not a distance measurement point as a check target, the check target determination unit 31 supplies the three-dimensional coordinates (x, y, z) of the distance measurement point of interest computed by the distance computation unit 22 and the distance histogram as they are, to the storage unit 24 to store. The RGB image supplied from the data acquisition unit 21 is also supplied to and stored in the storage unit 24.
Whereas, in step S7 in a case where it has been determined that the distance measurement point of interest is a distance measurement point as a check target, the coordinate correction unit 32 calculates the vector (e-a) from the position “a” of the distance measurement point of interest to the nearest position “e” of the edge 62, in the screen coordinate system of the RGB image 51.
In step S8, the coordinate correction unit 32 calculates similarity (a similarity vector) of the distance histogram between the distance measurement point of interest and each of the plurality of nearby distance measurement points, and calculates a centroid vector of the similarity. For example, by using nine distance measurement points of 3×3 centered on the distance measurement point of interest K11, the similarity vectors Vrab1 to Vrab8 of the distance histograms of the distance measurement point of interest K1l and the eight surrounding distance measurement points K21 to K28 are calculated, and the centroid vector “r” of the similarity vectors Vrab1 to Vrab& of Formula (3) is calculated.
In step S9, the coordinate correction unit 32 determines whether directions of two vectors match, that is, the centroid vector “r” of the similarity of the plurality of nearby distance measurement points near the distance measurement point of interest and the vector (e-a) from the distance measurement point of interest toward the nearest position “e” of the edge 62 match. In step S9, for example, when the angle θ formed by the centroid vector “r” and the vector (e-a) is within a predetermined threshold value, it is determined that the directions of the two vectors match. When the angle θ is equal to or greater than the predetermined threshold value, it is determined that the directions of the two vectors do not match.
When it is determined in step S9 that the directions of the two vectors do not match, the processing proceeds to step S6 described above. Therefore, in this case, the three-dimensional coordinates (x, y, z) of the distance measurement point of interest are not corrected, and are stored in the storage unit 24 as they are.
Whereas, when it is determined in step S9 that the directions of the two vectors match, the processing proceeds to step S10. In step S10, the coordinate correction unit 32 moves the position “a” of the distance measurement point of interest such that the distance measurement point of interest crosses the edge 62, and causes the storage unit 24 to store the three-dimensional coordinates (x, y, z) after the movement, as the three-dimensional coordinates (x, y, z) after correction. The distance histogram of the distance measurement point of interest and the RGB image supplied from the data acquisition unit 21 are also supplied to and stored in the storage unit 24.
After step S6 or S10, in step S11, the correction processing unit 23 determines whether all the distance measurement points in one frame supplied from the dToF sensor 12 have been set as the distance measurement point of interest. When it is determined in step S11 that all the distance measurement points of one frame have not been set as the distance measurement point of interest yet, the processing returns to step S3, and steps S3 to S11 described above are repeated. That is, among the distance measurement points of one frame, a distance measurement point that has not yet been set as the distance measurement point of interest is set as the next distance measurement point of interest, and determination is made as to whether or not the distance measurement point is a distance measurement point as a check target. Then, when it is determined that the directions of the two vectors match, the three-dimensional coordinates (x, y, z) of the distance measurement point of interest are corrected (moved).
Whereas, when it is determined in step S11 that all the distance measurement points in one frame have been set as the distance measurement point of interest, the processing proceeds to step S12, and the signal processing apparatus 13 determines whether or not to end the processing. For example, the processing of steps S1 to S11 described above is executed for the distance measurement points of all the frames supplied from the dToF sensor 12, and the signal processing apparatus 13 determines to end the processing when the distance histogram of the next frame is not supplied from the dToF sensor 12. On the contrary, when the distance diagram of the next frame is supplied from the dToF sensor 12, the signal processing apparatus 13 determines not to end the processing.
When it is determined in step S12 that the processing is not to be ended yet, the processing returns to step S1, and the processing of steps S1 to S12 described above is repeated.
Whereas, when it is determined in step S12 that the processing is to be ended, the processing proceeds to step S13, and the correction processing unit 23 supplies an end notification to the output unit 25.
In step S14, the output unit 25 outputs the three-dimensional coordinates (x, y, z) of each distance measurement point of all the frames stored in the storage unit 24, and ends the position information calculation processing in
According to the position information calculation processing of the signal processing system 1 according to the first embodiment described above, it is determined whether or not the distance measurement point of interest is a distance measurement point as a check target, on the basis of whether or not the distance measurement point of interest is included in the edge region. Then, when it is determined that the distance measurement point of interest is a distance measurement point as a check target, the position of the distance measurement point of interest is corrected toward a nearby distance measurement point having a similar distance histogram, by calculating the similarity (the similarity vector) between the distance histogram of the distance measurement point of interest and the distance histograms of a plurality of nearby distance measurement points. As a result, it is possible to correct a deviation of position information of the dToF sensor 12.
In the second embodiment of
A signal processing system 1 according to the second embodiment includes an RGB camera 11, a dToF sensor 12, and a signal processing apparatus 13. The signal processing apparatus 13 includes a data acquisition unit 21, a distance computation unit 22, a correction processing unit 23, a storage unit 24, and an output unit 25, and the correction processing unit 23 includes a check target determination unit 71 and a coordinate correction unit 32.
That is, in the signal processing system 1 according to the second embodiment, the check target determination unit 31 of the correction processing unit 23 in the first embodiment is changed to the check target determination unit 71, and other configurations are similar to those of the first embodiment. In other words, the second embodiment is different from the first embodiment in a determination method of determining whether or not a distance measurement point of interest is a distance measurement point as a check target, and is similar to the first embodiment in other points.
In the first embodiment described above, an edge region is extracted from an RGB image as a region near an object boundary, and whether or not the distance measurement point is a distance measurement point in which a positional deviation has highly possibly occurred is determined on the basis of whether or not the distance measurement point of interest is included in the edge region. On the other hand, the check target determination unit 71 according to the second embodiment observes a change in a distance histogram over a plurality of frames, to determine whether the distance measurement point of interest is a region near the object boundary. Then, when it is determined that the distance measurement point of interest is a region near the object boundary, the check target determination unit 71 regards as a distance measurement point in which a positional deviation has highly possibly occurred, and determines that the distance measurement point of interest is a distance measurement point as a check target.
For example, as illustrated in
The distance histogram output by the dToF sensor 12 includes two peak regions of a peak region h1 corresponding to the object 81 and a peak region h2 corresponding to the object 82. In a case where a region where the spot light SP hits on the object 82 is larger than a region where the spot light SP hits on the object 81, a peak count value of the peak region h2 corresponding to the object 82 is larger than a peak count value of the peak region h1 corresponding to the object 81. Thereafter, when the region where the spot light SP hits on the object 81 becomes larger than the region where the spot light SP hits on the object 82 due to the movement of the object 82, the peak count value of the peak region h1 corresponding to the object 81 becomes larger than the peak count value of the peak region h2 corresponding to the object 82. Furthermore, although not illustrated, in a case where only one of the object 81 and the object 82 is irradiated with the spot light SP rather than the boundary portion between the object 81 and the object 82, the distance histogram output by the dToF sensor 12 is a histogram having one peak region having a large peak count value.
Therefore, the check target determination unit 71 observes the distance histogram over a plurality of frames and determines that the distance measurement point at which the number of peak regions on the distance histogram changes such that “1→2→1” is a distance measurement point as a check target. Note that, in the distance measurement point at which the number of peak regions changes such that “1→2→1”, there may be a change such as “background-boundary portion between foreground and background-foreground” and a change such as “foreground-boundary portion between foreground and background-background”.
First, the check target determination unit 71 determines whether the number of peak regions in a distance histogram of a distance measurement point of interest Kx in a frame Ft at a current time t is one or two or more. In a case where the number of peak regions in the distance histogram of the distance measurement point of interest Kx is two or more, it is regarded that the distance measurement point has a possibility of being an object boundary and a positional deviation has highly possibly occurred in the distance measurement point, and the distance measurement point of interest is determined to be a distance measurement point as a check target.
Whereas, in a case where the number of peak regions in the distance histogram of the distance measurement point of interest Kx is one, the distance histogram of the distance measurement points Kx at the same position in past W frames (W is an integer of 2 or more) is acquired from the storage unit 24, and the number of peak regions in the distance histogram in the past W frames and a bin position with a largest count value are checked. In a case where the number of peak regions in the distance histogram in the past W frames is one, and the bin position with the largest count value is also the same, the check target determination unit 71 regards as the distance measurement point having a low possibility of a positional deviation, and determines that the distance measurement point of interest is not a distance measurement point as a check target.
Whereas, in a case where the number of peak regions in the distance histogram in the past W frames is two or more and the bin position with the largest count value has been changed, the check target determination unit 71 regards as a distance measurement point in which a positional deviation has highly possibly occurred, and determines that the distance measurement point of interest is a distance measurement point as a check target.
In the example of
Here, assuming W=3 and that the number of peak regions in the distance histogram and the bin position with the largest count value in the past three frames are to be checked, the number of peak regions of a frame Ft-1 at a time t-1 and a frame Ft-2 at a time t-2 is two, and the bin position with the largest count value changes between the frame Ft-2 at the time t-2 and the frame Ft-1 at time t-1. In the distance histogram of each frame illustrated in
Therefore, the check target determination unit 71 determines that the distance measurement point of interest Kx in the frame Ft at the current time t is a distance measurement point in which a positional deviation has highly possibly occurred and is a distance measurement point as a check target.
Note that, in the second embodiment, as described above, by observing the change in the distance histogram over the past W frames, determination is made as to whether the distance measurement point of interest is a region near an object boundary and as to whether or not the distance measurement point is a distance measurement point as a check target. Therefore, a position of each multipixel MP of the dToF sensor 12 does not change in all frames during an image-capturing period, and it is necessary to perform sampling at the same position in each frame.
In position information calculation processing performed by the signal processing system 1 according to the second embodiment, the determination method of the check target determination processing performed in step S4 of the flowchart of
Describing with reference to the flowchart of
Whereas, in a case where the number of peak regions in the distance histogram of the distance measurement point of interest Kx in the frame Ft at the current time t is one, the check target determination unit 71 further checks the number of peak regions in the distance histogram in the past W frames and the bin position with the largest count value. In a case where the number of peak regions in the distance histogram in the past W frames is one and the bin position with the largest count value is also the same, the check target determination unit 71 determines that the distance measurement point of interest Kx is not a distance measurement point as a check target. Whereas, in a case where the number of peak regions in the distance histogram in the past W frames is two and the bin position with the largest count value is also interchanged, the check target determination unit 71 determines that the distance measurement point of interest Kx is a distance measurement point as a check target.
According to the position information calculation processing of the signal processing system 1 according to the second embodiment described above, determination is made as to whether or not the distance measurement point of interest is a distance measurement point as a check target, on the basis of whether or not the number of peak regions in the distance histogram of the distance measurement point of interest and the bin position with the largest count value have changed in the past W frames. Then, when it is determined that the distance measurement point of interest is a distance measurement point as a check target, the position of the distance measurement point of interest is corrected toward a nearby distance measurement point having a similar distance histogram, by calculating the similarity (the similarity vector) between the distance histogram of the distance measurement point of interest and the distance histograms of a plurality of nearby distance measurement points. As a result, it is possible to correct a deviation of position information of the dToF sensor 12.
Note that, in the second embodiment, in a case where the RGB camera 11 and the dToF sensor 12 have fixed positions and capture an image of a subject, a distance measurement point at which the number of peak regions in the distance histogram changes such that “1→2→1” is a point at which an image of a moving subject has been captured, and reliability of the calculated three-dimensional coordinates is expected to be low. Therefore, in a case where the positions of the RGB camera 11 and the dToF sensor 12 are fixed, in the distance measurement points at which the number of peak regions in the distance histogram changes such as “1→2→1”, measured values of the three-dimensional coordinates may be deleted and not output from the signal processing apparatus 13.
Alternatively, reliability may be added to the distance measurement point at which the number of peak regions in the distance histogram changes such that “1→2→1”, and the distance measurement point may be output to enable a device on a subsequent stage to identify as the distance measurement point having the low reliability. The reliability of the distance measurement point can be obtained by, for example, a value obtained by subtracting a reciprocal of the number of frames related to interchange of the peak of the distance histogram from 1, such as the number of peak regions in the distance histogram “1→2→1”, “1→2→2→1”, or “1→2→2→2→1”. Specifically, for example, the reliability of the distance measurement point at which the number of peak regions in the distance histogram changes such that “1→2→1” can be calculated as “1−⅓=0.6”. Furthermore, for example, the reliability of the distance measurement point at which the number of peak regions in the distance histogram changes such that “1→2→2→1” can be calculated as “1−¼=0.75”. Furthermore, for example, the reliability of the distance measurement point at which the number of peak regions in the distance histogram changes such that “1→2→2→2→1” can be calculated as “1−⅕=0.8”.
The device on the subsequent stage that has acquired the distance measurement point to which the reliability is added can perform, for example, processing of preventing afterimage, by recognizing as the distance measurement point with low reliability.
The signal processing apparatus 13 includes: the data acquisition unit 21 configured to acquire a distance histogram that is histogram data of time of flight of irradiation light at a predetermined distance measurement point of a distance measurement sensor; the distance computation unit 22 configured to compute three-dimensional coordinates of the predetermined distance measurement point from the distance histogram of the predetermined distance measurement point; the check target determination unit 31 configured to determine whether or not the predetermined distance measurement point is a distance measurement point as a positional deviation check target; and the coordinate correction unit 32 configured to execute positional deviation correction processing of correcting the three-dimensional coordinates of the predetermined distance measurement point computed by the distance computation unit 22, on the basis of a determination result of similarity between the distance histogram of the predetermined distance measurement point and the distance histogram of a nearby distance measurement point near the predetermined distance measurement point, in a case where the predetermined distance measurement point is a distance measurement point as a positional deviation check target.
The check target determination unit 31 according to the first embodiment detects an edge region of an object from an RGB image (captured image) obtained by capturing an image of a subject by the RGB camera 11, and determines that the distance measurement point is a distance measurement point as a check target in which a positional deviation has highly possibly occurred, in a case where the predetermined distance measurement point is included in the edge region.
Whereas, the check target determination unit 31 according to the second embodiment determines whether or not a predetermined distance measurement point is a distance measurement point as a positional deviation check target, by observing a change in a distance histogram of the distance measurement point over a plurality of frames. For example, in a case where the number of peak regions in the distance histogram has changed such that “1→2→1”, and a bin position with the largest count value has changed, the check target determination unit 31 determines that the distance measurement point is a distance measurement point as a check target.
In a case where a centroid vector of similarity between the distance histogram of a distance measurement point as a check target and the distance histogram of a nearby distance measurement point near the distance measurement point coincides with a direction of an object boundary, the coordinate correction unit 32 determines that the three-dimensional coordinates of the distance measurement point need to be corrected, and corrects (moves) the three-dimensional coordinates of the distance measurement point.
According to the check target determination processing and the positional deviation correction processing described above of the signal processing apparatus 13, it is possible to correct a deviation of position information of the dToF sensor 12 in a correct direction.
The signal processing apparatus 13 may have the configuration and the function of only one of the first embodiment and the second embodiment described above, or may have both configurations and functions and selectively perform, for example, either one of a first operation mode corresponding to the first embodiment and a second operation mode corresponding to the second embodiment by switching.
The position information calculation processing of the present disclosure capable of correcting and outputting three-dimensional coordinates by using histogram data acquired from the dToF sensor 12 can be applied to three-dimensional measurement of various applications such as simultaneous localization and mapping (SLAM) that simultaneously performs self-localization and environmental mapping, a robot operation of holding an object and performing movement and work, CG modeling in a case of generating a virtual scene or object by computer graphics (CG), and object recognition processing and object classification processing. By applying the correction processing of the present disclosure, measurement accuracy of three-dimensional coordinates of an object can be improved.
The above-described series of processing can be performed by hardware or software. In a case where the series of processing is executed by the software, a program that configures the software is installed in a computer. Here, examples of the computer include, for example, a microcomputer that is built in dedicated hardware, a general-purpose personal computer that can perform various functions by being installed with various programs, and the like.
In the computer, a central processing unit (CPU) 101, a read only memory (ROM) 102, and a random access memory (RAM) 103 are mutually connected by a bus 104.
The bus 104 is further connected with an input/output interface 105. An input unit 106, an output unit 107, a storage unit 108, a communication unit 109, and a drive 110 are connected to the input/output interface 105.
The input unit 106 includes a keyboard, a mouse, a microphone, a touch panel, an input terminal, and the like. The output unit 107 includes a display, a speaker, an output terminal, and the like. The storage unit 108 includes a hard disk, a RAM disk, a non-volatile memory, or the like. The communication unit 109 includes a network interface and the like. The drive 110 drives a removable recording medium 111 such as a magnetic disk, an optical disk, a magneto-optical disk, or a semiconductor memory.
In the computer configured as described above, for example, the CPU 101 loads the program stored in the storage unit 108 into the RAM 103 via the input/output interface 105 and the bus 104 and executes the program, thereby performing the series of the position information calculation processing described above. As appropriate, the RAM 103 also stores data necessary for the CPU 101 to execute various kinds of processing.
The program executed by the computer (CPU 101) can be provided by recording on the removable recording medium 111 as a package medium and the like, for example. Furthermore, the program can be provided via a wired or wireless transmission medium such as a local area network, the Internet, or digital satellite broadcasting.
In the computer, the removable recording medium 111 is set in the drive 110, so that the program can be installed into the storage unit 108 via the input/output interface 105. Furthermore, the program can be received by the communication unit 109 via the wired or wireless transmission medium and installed on the storage unit 108. Furthermore, the program can be installed on the ROM 102 or the storage unit 108 in advance.
Note that the program executed by the computer may be a program that performs processing in a time-series manner in the order described in the present specification, or may be a program that performs processing in parallel or at necessary timing such as when a call is made.
In the present description, a system is intended to mean assembly of a plurality of constituent elements (apparatuses, modules (parts), and the like), and it does not matter whether or not all the constituent elements are located in the same housing. Therefore, a plurality of devices housed in separate housings and coupled via a network and one device in which a plurality of modules is housed in one housing are both systems.
Furthermore, the embodiment of the present disclosure is not limited to the above-described embodiments and various modifications may be made without departing from the gist of the technology of the present disclosure.
Note that, the effects described in the present specification are merely examples and are not limited, and there may be effects other than those described in the present specification.
Note that the technique of the present disclosure can have the following configurations.
(1)
A signal processing apparatus including:
The signal processing apparatus according to (1) above, in which
The signal processing apparatus according to (2) above, in which
The signal processing apparatus according to (2) above, in which
The signal processing apparatus according to (4) above, in which
The signal processing apparatus according to (4) above, in which
The signal processing apparatus according to any one of (1) to (6) above, in which
The signal processing apparatus according to (7) above, in which
The signal processing apparatus according to (8) above, in which
The signal processing apparatus according to (7) above, in which
The signal processing apparatus according to (7) above, in which
The signal processing apparatus according to (11) above, in which
The signal processing apparatus according to (11) or (12) above, in which
The signal processing apparatus according to any one of (1) to (13) above, further including:
A signal processing method including,
Number | Date | Country | Kind |
---|---|---|---|
2021-121297 | Jul 2021 | JP | national |
Filing Document | Filing Date | Country | Kind |
---|---|---|---|
PCT/JP2022/008489 | 3/1/2022 | WO |