Subject position detection system and position detection method
By dividing the multi-frame technology into multiple subframes and using the differences between the Gray code pattern and the image capture, low-cost and high-speed detection of the position of the measured object is achieved.
Patent Information
- Application Number
- CN202010487208.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2019-06-07
- Filing Date
- 2020-06-01
- Publication Date
- 2025-05-16
- Estimated Expiration
- 2040-06-01
AI Technical Summary
The prior art is difficult to accurately detect the position of the object to be measured at a high speed, and requires high-cost imaging devices and image processing devices.
Using a multi-frame technique divided into multiple subframes, by projecting different Gray code patterns and generating image images, the position of the subject is estimated using the control unit.
It realizes the location of the subject at low cost and high speed, and is suitable for fields such as automobile autonomous driving and interactive entertainment.
Smart Images

Figure CN112051587B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to a position detection system and a position detection method for detecting the position of a subject, and more specifically, to a position detection system and a position detection method for a subject that utilizes a spatial encoding method for spatially generating code values by binarizing a projection pattern. Background Art
[0002] As a technique for measuring the three-dimensional shape of a measurement object in a non-contact manner using light, there are known slit light projection method, spatial encoding method, etc. In these methods, light is irradiated from a light projection device onto the measurement object and the reflected light is measured.
[0003] For example, Patent Document 1 discloses a method for measuring the position of a three-dimensional object to be measured involving a spatial encoding method. In the method for measuring the position involved in Patent Document 1, a projection device is used to illuminate the object to be measured with a coded Gray code pattern, and a camera device at a position different from the projection device is used to photograph the object to be measured, and the photographed image is binarized for each pixel. This process is repeated for multiple Gray code patterns, and based on the multiple binarized patterns after binarization, the position of the object to be measured is calculated by triangulation using the parallax of the projection device and the camera device.
[0004] Prior Art Literature
[0005] Patent Literature
[0006] Patent Document 1: Japanese Patent Application Laid-Open No. 60-152903 Summary of the invention
[0007] Problems to be solved by the invention
[0008] Recently, in the fields of autonomous driving of automobiles, interactive entertainment, etc., for example, for projection mapping, a technology for detecting a measured object at high speed is required. However, in order to determine the position of a measured object by the method involved in the prior art, multiple subframe times are required to project each Gray code. Therefore, it is difficult to accurately detect the position of the measured object when it moves at high speed.
[0009] For example, when detecting the position of an object moving at a speed of 100 km / h, even if the three-dimensional shape is measured in 1 / 60 seconds, the object will move about 80 cm between the start and end of the measurement. In addition, in order to perform this detection, images of the number of projected patterns are projected and photographed during 1 / 60 seconds, and each image is processed. However, for this purpose, a camera device capable of sufficiently high-speed photography and a processing device capable of high-speed image processing are used, but there is a problem that these devices are generally high-cost.
[0010] The present disclosure discloses a system and a method that can detect a subject at a lower cost and at a higher speed than conventional techniques.
[0011] Means for solving problems
[0012] A position detection system according to one aspect of the present disclosure is a position detection system that detects the position of a subject using a plurality of frames that are each divided into a plurality of subframes. The position detection system comprises: a projection device that projects a plurality of Gray code patterns that correspond to a plurality of subframes and have Gray code values that are different powers of 2 in the order of increasing and then decreasing or decreasing and then increasing Gray code values; a camera device that captures the subject onto which the plurality of Gray code patterns are projected for each of the plurality of subframes to generate a captured image; and a control unit that estimates the position of the subject based on the captured image. In addition, a position detection method according to one aspect of the present disclosure is a position detection method for a position detection system that detects the position of a subject using a plurality of frames that are each divided into a plurality of subframes. The position detection method includes: a step of arranging a plurality of Gray code patterns corresponding to a plurality of subframes and having Gray code values of powers of 2 that are different from each other in the order of increasing and then decreasing or decreasing and then increasing Gray code values; a step of sequentially projecting the plurality of Gray code patterns onto a subject; a step of photographing the subject onto which the plurality of Gray code patterns are projected for each of the plurality of subframes to generate a photographed image; and a step of estimating the position of the subject based on the photographed image.
[0013] Effects of the Invention
[0014] According to the present disclosure, compared with the conventional technology, it is possible to detect a subject at a low cost and at a high speed. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 This is a block diagram showing a configuration example of the position detection system 100 according to the first embodiment.
[0016] Figure 2 It means in Figure 1 FIG. 1 is a front view of an example of Gray code patterns 200 a to 200 j used in the position detection system 100 .
[0017] Figure 3 Yes means Figure 1 A block diagram of a detailed structural example of the digital computer 104.
[0018] Figure 4 It is a diagram of a table showing various examples of arrangements of Gray code patterns according to a conventional example, a comparative example, and the first embodiment.
[0019] Figure 5 Yes means Figure 1FIG. 1 is a graph showing the relationship between subframes of one frame and accumulated Gray code values in the position detection system 100 .
[0020] Figure 6 This is a timing chart for explaining the arrangement of the middle Gray code pattern according to the first embodiment.
[0021] Figure 7 4 is a graph showing the relationship between the number Nsfg of subframes included in one subframe group and the minimum value of the sum of Gray code values in Nsfg consecutive subframes according to the conventional example and the first embodiment.
[0022] Explanation of symbols
[0023] 100 Position detection system
[0024] 101 Camera Device
[0025] 102 Projection Device
[0026] 103 Subject
[0027] 104 Digital Computer
[0028] 105 wall
[0029] 106 User Interface
[0030] 110 Input section
[0031] 111 Binarization
[0032] 112 Gray code calculation unit
[0033] 113 Depth Calculation Unit
[0034] 114 Subject detection unit
[0035] 115 Data Selection Department
[0036] 116 Pattern Creation Department
[0037] 117 Projection image output unit
[0038] 118 Subject position data output unit
[0039] 119 Storage
[0040] 200a~200j Gray code pattern DETAILED DESCRIPTION
[0041] Figure 1 1 is a block diagram showing a configuration example of a position detection system 100 according to Embodiment 1. Figure 1In FIG. 1 , the position detection system 100 includes an imaging device 101, a projection device 102, an object 103, a digital computer 104, and a wall 105. Figure 1 In the position detection system 100, one frame includes 10 subframes. The position detection system 100 detects the position of the subject using a plurality of frames each divided into a plurality of subframes.
[0042] exist Figure 1 In the embodiment, the projection device 102 projects Gray code patterns 200a to 200j toward the wall 105 and the object 103 in sequence for each subframe. The camera device 101 captures the wall 105 and the object 103 on which the Gray code patterns 200a to 200j are projected in sequence for each subframe, and sequentially sends the captured image signals to the digital computer 104. The digital computer 104 is a control unit that determines whether the object 103 exists within the captured range based on the captured image from the camera device 101, and estimates the depth of the object 103 (the distance from the wall 105) if the object 103 exists. Figure 1 Point C(50) and point C(500) respectively represent points on the wall 105 having Gray code values of 50 and 500.
[0043] The gray code value at a certain point of the wall 105 refers to the total of the gray code values of the gray code patterns 200a to 200j that project white at that point. Therefore, the gray code value of each point in the wall 105 is equal to a 10-bit binary number obtained by setting the pixel values (0 or 1) of the gray code patterns 200a to 200j at that point to the values of the 10th to 1st bits, respectively. In the present embodiment, the gray code patterns 200a to 200j are referred to as the 10th to 1st gray code patterns, respectively.
[0044] Figure 2 It means in Figure 1 : This is a front view of an example of Gray code patterns 200a to 200j used in the position detection system 100. Gray code patterns 200a to 200j are binary images in which each pixel is black (0) or white (1). The 10th Gray code pattern 200a, which is the topmost one, is a pattern in which the left half is 0 and the right half is 1, and its Gray code value is 512. The 9th Gray code pattern 200b is a pattern in which the entirety is divided horizontally into four parts and the parts are set to 0, 1, 0, and 1 from the left, respectively, and the Gray code value is 256. Similarly, in the following bits, a Gray code pattern whose horizontal width is halved for each bit is used. The 1st Gray code pattern 200j, which is the bottommost one, is a pattern in which 0 and 1 appear alternately, 512 each, and the Gray code value is 1. In this way, each Gray code pattern 200a to 200j has a Gray code value that is a power of 2 that is different from each other.
[0045] Figure 3 Yes means Figure 1 A block diagram of a detailed structural example of a digital computer 104 is shown in FIG. Figure 3 In the figure, the digital computer 104 includes an input unit 110, a binarization unit 111, a Gray code calculation unit 112, a depth calculation unit 113, a subject detection unit 114, a data selection unit 115, a pattern creation unit 116, a projection image output unit 117, a subject position data output unit 118 and a storage unit 119.
[0046] exist Figure 3 In the embodiment, the input unit 110 sequentially inputs the captured images obtained by the camera 101 capturing the wall 105 and the subject 103 to the binarization unit 111. The binarization unit 111 binarizes the input captured images and outputs the binarized images to the Gray code calculation unit 112.
[0047] The Gray code calculation unit 112 has an internal memory for storing a Gray code image. Here, the Gray code image is an image of the same pixel size as the camera image, and each pixel thereof includes a Gray code value represented by a 10-bit binary number. The value of the input binary image is substituted into the position (bit) corresponding to the current subframe among the Gray code values of each pixel of the Gray code pattern stored in the internal memory for updating, and the updated Gray code image is output to the depth calculation unit 113. Based on the order of the Gray code patterns input from the data selection unit 115, it is determined which Gray code pattern the current subframe corresponds to.
[0048] The depth calculation unit 113 calculates the depth of each pixel using triangulation based on the updated Gray code image, and outputs the depth image to the subject detection unit 114. Here, "depth" refers to the difference between the Gray code value in the captured image previously captured without the subject 103 and the Gray code value in the updated Gray code image. Figure 1 In the case of the positional relationship shown, the Gray code value in the direction of the object 103 increases from 50 when the object 103 does not exist to 500 when viewed from the imaging device 101. Therefore, the depth of the object 103 is 450. In this embodiment, the depth is used as an indicator indicating the distance to the wall 105.
[0049] The object detection unit 114 determines whether there is an object within a predetermined depth range in the input depth image, and detects it as the object 103 if there is an object. Figure 1 When the given threshold is set to 200, the object 103 at a depth of 450 can be detected.
[0050] Furthermore, the subject detection unit 114 outputs the subject position data including information such as the coordinates of the subject 103 and its depth to the external user interface 106 via the subject position data output unit 118. When the subject 103 is not detected, the subject position data includes information that the subject 103 is not detected instead of the above information. The user interface 106 is, for example, a liquid crystal display, and provides the user with a screen created based on the subject position data.
[0051] The data selection unit 115 selects a Gray code pattern arrangement used in the next frame from the storage unit 119 based on the depth of the subject 103 detected in one frame, reads it out, and outputs it to the pattern creation unit 116. In addition, the data selection unit 115 outputs the order of the read Gray code patterns to the Gray code calculation unit 112.
[0052] The storage unit 119 stores in advance a database of a plurality of gray code pattern arrays and the relationship between a threshold for detecting the depth of the subject 103 and the order of gray code patterns used in the next frame. The method of determining the order of gray code patterns corresponding to each depth will be described later.
[0053] The pattern creation unit 116 generates 10 Gray code pattern images to be projected based on the order of the Gray code patterns from the data selection unit 115 , and sequentially transmits them to the projection device 102 via the projection image output unit 117 for projection.
[0054] With such a configuration, the digital computer 104 can detect the subject 103 and provide the user with information on its depth and position in cooperation with the imaging device 101 and the projection device 102. Next, a method of determining the order of the Gray code patterns stored in the storage unit 119 will be described.
[0055] Figure 4 1 is a diagram showing a table of various examples of Gray code pattern arrangements according to the conventional example, the comparative example, and the first embodiment.
[0056] exist Figure 4 , Gray code pattern arrangement A is a Gray code pattern arrangement according to the prior art example. Gray code pattern arrangements B and C are Gray code pattern arrangements according to the comparative example. Gray code pattern arrangements D to F are Gray code pattern arrangements according to the first embodiment, and are examples of the order determined by the creation step.
[0057] exist Figure 4 In FIG. 1 , Gray code pattern arrangements A to F respectively indicate the arrangement order of which Gray code pattern is projected and imaged in which subframe.
[0058] exist Figure 4In the Gray code pattern arrangement A, the position detection system 100 configures the 1st Gray code pattern (bit 1) in the 1st subframe, the 2nd Gray code pattern (bit 2) in the 2nd subframe, the 3rd Gray code pattern (bit 3) in the 3rd subframe, the 4th Gray code pattern (bit 4) in the 4th subframe, the 5th Gray code pattern (bit 5) in the 5th subframe, the 6th Gray code pattern (bit 6) in the 6th subframe, the 7th Gray code pattern (bit 7) in the 7th subframe, the 8th Gray code pattern (bit 8) in the 8th subframe, the 9th Gray code pattern (bit 9) in the 9th subframe, and the 10th Gray code pattern (bit 10) in the 10th subframe.
[0059] Similarly, in the Gray code pattern arrangement B involved in the comparative example, the position detection system 100 configures the first Gray code pattern (bit 1) in the first subframe, the third Gray code pattern (bit 3) in the second subframe, the fifth Gray code pattern (bit 5) in the third subframe, the seventh Gray code pattern (bit 7) in the fourth subframe, the ninth Gray code pattern (bit 9) in the fifth subframe, the second Gray code pattern (bit 2) in the sixth subframe, the fourth Gray code pattern (bit 4) in the seventh subframe, the sixth Gray code pattern (bit 6) in the eighth subframe, the eighth Gray code pattern (bit 8) in the ninth subframe, and the tenth Gray code pattern (bit 10) in the tenth subframe.
[0060] In the Gray code pattern arrangement C involved in the comparative example, the position detection system 100 configures the 10th Gray code pattern (bit 10) in the 1st subframe, the 9th Gray code pattern (bit 9) in the 2nd subframe, the 8th Gray code pattern (bit 8) in the 3rd subframe, the 7th Gray code pattern (bit 7) in the 4th subframe, the 6th Gray code pattern (bit 6) in the 5th subframe, the 5th Gray code pattern (bit 5) in the 6th subframe, the 4th Gray code pattern (bit 4) in the 7th subframe, the 3rd Gray code pattern (bit 3) in the 8th subframe, the 2nd Gray code pattern (bit 2) in the 9th subframe, and the 1st Gray code pattern (bit 1) in the 10th subframe.
[0061] In the Gray code pattern arrangement D involved in embodiment 1, the position detection system 100 configures the 10th Gray code pattern (bit 10) in the 1st subframe, the 1st Gray code pattern (bit 1) in the 2nd subframe, the 2nd Gray code pattern (bit 2) in the 3rd subframe, the 9th Gray code pattern (bit 9) in the 4th subframe, the 3rd Gray code pattern (bit 3) in the 5th subframe, the 4th Gray code pattern (bit 4) in the 6th subframe, the 8th Gray code pattern (bit 8) in the 7th subframe, the 5th Gray code pattern (bit 5) in the 8th subframe, the 6th Gray code pattern (bit 6) in the 9th subframe, and the 7th Gray code pattern (bit 7) in the 10th subframe.
[0062] In the other Gray code pattern arrangement E involved in embodiment 1, the position detection system 100 configures the 9th Gray code pattern (bit 9) in the 1st subframe, the 3rd Gray code pattern (bit 3) in the 2nd subframe, the 4th Gray code pattern (bit 4) in the 3rd subframe, the 8th Gray code pattern (bit 8) in the 4th subframe, the 5th Gray code pattern (bit 5) in the 5th subframe, the 6th Gray code pattern (bit 6) in the 6th subframe, the 7th Gray code pattern (bit 7) in the 7th subframe, the 10th Gray code pattern (bit 10) in the 8th subframe, the 1st Gray code pattern (bit 1) in the 9th subframe, and the 2nd Gray code pattern (bit 2) in the 10th subframe.
[0063] In another Gray code pattern arrangement F involved in embodiment 1, the position detection system 100 configures the 7th Gray code pattern (bit 7) in the 1st subframe, the 6th Gray code pattern (bit 6) in the 2nd subframe, the 5th Gray code pattern (bit 5) in the 3rd subframe, the 8th Gray code pattern (bit 8) in the 4th subframe, the 4th Gray code pattern (bit 4) in the 5th subframe, the 3rd Gray code pattern (bit 3) in the 6th subframe, the 9th Gray code pattern (bit 9) in the 7th subframe, the 2nd Gray code pattern (bit 2) in the 8th subframe, the 1st Gray code pattern (bit 1) in the 9th subframe, and the 10th Gray code pattern (bit 10) in the 10th subframe.
[0064] Gray code pattern arrangement E is a Gray code pattern arrangement in which the first three Gray code patterns of Gray code pattern arrangement D are rearranged at the end. Gray code pattern arrangement F is a Gray code pattern arrangement in which the Gray code patterns of Gray code pattern arrangement D are rearranged in reverse order.
[0065] The above-mentioned Gray code pattern arrangement D is created so that the same effect can be obtained regardless of which subframe in the frame is detected. Therefore, as the order of the Gray code pattern arrangement involved in Embodiment 1, even if a Gray code pattern arrangement obtained by reconfiguring an arbitrary number of Gray code patterns from the beginning of the Gray code pattern arrangement to the end is used, the same effect can be obtained. For example, if the Gray code pattern arrangement E is used, the same effect as the case of using the Gray code pattern arrangement D can be obtained.
[0066] In addition, the above-mentioned Gray code pattern arrangement D is a Gray code pattern arrangement that ensures that the total of the Gray code values of the continuous plurality of Gray code patterns in the Gray code pattern arrangement is greater than a predetermined value. Therefore, as the Gray code pattern arrangement involved in Embodiment 1, even if a Gray code pattern arrangement obtained by rearranging the Gray code pattern arrangement in reverse order is used, the same effect can be obtained. For example, if the Gray code pattern arrangement F is used, the same effect as the case of using the Gray code pattern arrangement D can be obtained.
[0067] Figure 5 Yes means Figure 1 A graph showing the relationship between a subframe of one frame and an accumulated Gray code value in the position detection system 100. Figure 5 In the example, the cumulative Gray code value is the total of the Gray code values of the Gray code pattern in the frame up to that time point, and indicates the maximum value of the depth that can be detected at the time point of the subframe. Figure 5 The four broken line curves are respectively Figure 4 The curve corresponding to the case where the Gray code pattern arrangements A to D are arranged.
[0068] For example, consider the case where 200 is used as the depth threshold to detect the subject 103. Figure 4 The 8th subframe has a cumulative Gray code value exceeding 200. Therefore, in order to detect the object 103 with a depth value of 200 according to the arrangement A, at least 8 subframes are required. Figure 4 In the case of the arrangement B, the fifth subframe has a cumulative Gray code value exceeding 200. Thus, by using an arrangement in which a Gray code pattern corresponding to a higher-order bit is arranged at an earlier time point in one frame, the subject 103 at a certain depth can be detected earlier.
[0069] Here, if we follow Figure 4 The arrangement C of is the reverse order of arrangement A, then Figure 5As shown, when the depth threshold is below 511, the subject 103 can be detected in the first subframe. However, the detection of the subject 103 does not necessarily have to start from the first subframe. For example, when the subject 103 appears in the imaging area only in the fourth subframe, the Gray code patterns of the first to third subframes are not helpful for detection. Therefore, when the depth threshold is 200, in the case of Gray code pattern arrangement C, the detection requires 8 subframes (until the first subframe of the next frame). The following describes a Gray code pattern arrangement that can detect the subject 103 with as few subframes as possible, even if the subject 103 appears in the imaging area in the middle of a frame.
[0070] First, the subframes in one frame are classified into a plurality of subframe groups. The subframe groups are classified in such a way that the sum of the Gray code values of the subframes included in each subframe group is greater than the depth threshold. Thus, even if the subject 103 appears in the imaging area from the middle of the frame, if its depth is a value greater than the depth threshold, the subject 103 can be detected by passing through all the subframe groups included in at least one subframe group.
[0071] The specific method of such classification is described below. For more generalization, a case where N subframes are included in one frame is described. Here, the N subframes include one subframe corresponding to the highest Gray code pattern and M subframe groups each consisting of Nsfg subframes. That is, the following equation (1) holds. Here, N, Nsfg, and M are natural numbers greater than 2.
[0072] N=Nsfg×M+1 (1)
[0073] and Figure 2 Similarly, the top Nth Gray code pattern is a pattern with a left half of 0 (black) and a right half of 1 (white), and its Gray code value is 2 N-1 The (N-1)th Gray code pattern is to divide the whole into four parts horizontally, and set them to black, white, black, and white from the left. The Gray code value is 2 N-2 Similarly, in the following bits, a Gray code pattern whose horizontal width is halved for each Gray code pattern is used. The lowest first Gray code pattern (bit 1) is a Gray code pattern in which 2N-1 black and 2N-1 white stripes appear alternately, and the Gray code value is 1.
[0074] Therefore, in any Gray code pattern, its Gray code can be expressed as a power of 2, and for n 1≤n≤N, the Gray code value of the nth Gray code pattern is greater than the sum of the Gray code values of the 1st to (n-1)th Gray code patterns. That is, the following equation holds.
[0075] [Mathematical formula 1]
[0076]
[0077] Here, GC(m) is the Gray code value of the mth Gray code pattern. Therefore, when both the lowest Gray code pattern and the highest Gray code pattern are included in the same subframe group, the total of the Gray code values of the subframe group becomes greater than the total of the Gray code values of any other subframe group. Therefore, in the subframe group including the highest Gray code pattern, (Nsfg-1) Gray code patterns are included from the lowest.
[0078] Similarly, for the remaining subframes, by repeatedly including the highest Gray code pattern and the (Nsfg-1) Gray code patterns from the bottom in the remaining subframes in one subframe group, the minimum value of the total Gray code value for each subframe group can be kept at the maximum.
[0079] Here, it should be noted that the timing at which the subject 103 appears in the imaging area may be in the middle of a subframe group. In this case, the accumulated Gray code value is totaled across two subframe groups. Therefore, in the two subframe groups, there is a possibility that the subject 103 is detected without including a subframe corresponding to the upper Gray code pattern of each subframe group. In this case, the increase in the accumulated Gray code value becomes slow, and the detection takes a longer time compared to the case where the upper Gray code pattern is included. Therefore, in the case of detection across two subframe groups, it is necessary to include the upper Gray code pattern of any subframe group. Specifically, in all subframe groups, the upper Gray code pattern in the subframe group is configured in the initial subframe of each subframe group.
[0080] Here, in the case where a subframe group is created according to the above steps, the sum of the Gray code values of the lower Gray code patterns of the initially created subframe group (the Gray code value of the upper Gray code pattern is the largest) is smaller than the sum of the Gray code values of the lower Gray code patterns of other subframe groups. Therefore, if the initially created subframe group is adjacent to other subframe groups, the detection across the two subframe groups becomes slower. Therefore, the upper Gray code pattern is configured in the initial subframe of the frame, and the initially created subframe group is configured at the end of the frame. As a result, the subframe group with the smallest sum of Gray code values of the lower Gray code patterns must be adjacent to the subframe of the upper Gray code pattern (of the next frame), and the detection across two frames can be performed at high speed.
[0081] According to the above array creation method, a Gray code pattern array can be obtained in which the total of Gray code values reaches a predetermined value or more after one subframe group, regardless of the timing at which detection is started.
[0082] Next, consider the arrangement in the case where equation (1) assumed in the above description does not hold. Let the quotient obtained by dividing the number of subframes N by the number of subframe groups M be Nquo, and the remainder be Nmod. That is, let N=Nquo×M+Nmod.
[0083] First, create (Nquo-1) subframe groups through the same steps as the case where equation (1) holds. Use the highest Gray code pattern in the frame, the upper (Nquo-1) patterns among the other patterns, and the ((Nquo-1)×(Nsfg-1)) lower Gray code patterns combined with these patterns. In other words, use the upper Nquo bits and the lower ((Nquo-1)×(Nsfg-1)) bits in the Gray code pattern of the entire frame to create a subframe group in the same way as the case where equation (1) holds. At this point in time, there are (N-Nsfg×M-1) subframes that are not included in the subframe group, and these subframes are called the remaining subframe group. The median Gray code pattern that has not yet been configured is configured in each subframe of the remaining subframe group. The number of subframes in the remaining subframe group can also be expressed as (Nsfg+Nmod-1).
[0084] Hereinafter, the median Gray code pattern is represented as P(1), P(2), ..., P(Nsfg+Nmod-1) in order from the highest position. As described above, each Gray code pattern has a Gray code value that is a power of 2, and therefore, the sum of the Gray code values of the median Gray code pattern is smaller than the sum of the Gray code values of any other subframe group. Therefore, it is considered to arrange Gray code patterns so that the minimum value of the sum of Gray code values obtained by taking out Nsfg consecutive Gray code values from the median Gray code pattern is as large as possible.
[0085] Figure 6 This is a timing chart for explaining the arrangement of the median Gray code pattern according to Embodiment 1. The median Gray code pattern includes (Nsfg+Nmod-1) subframes. Consider the case where Nsfg consecutive subframes are taken out. Regarding the value of the subframe, the following inequality (2) holds.
[0086] Nsfg+Nmod-1<2Nsfg (2)
[0087] Therefore, there are subframes that are necessarily included no matter how Nsfg consecutive subframes are selected from the subframes of the median Gray code pattern, and the number of these subframes is expressed by the following formula.
[0088] 2Nsfg-(Nsfg+Nmod-1)=Nsfg-Nmod+1
[0089] The median subframe group is divided into the first (Nmod-1) (period Da), the last (Nmod-1) (period Dc), and the remaining (Nsfg-Nmod+1) (period Db). The subframes included in the period Db are equivalent to the subframes that are necessarily included in the above-mentioned continuous Nsfg subframes.
[0090] Since the detection is used regardless of the timing at which the detection is started, the Gray code pattern in period Db is preferably a Gray code pattern with a large Gray code value. Therefore, in period Db, the upper (Nsfg-Nmod+1) of the median Gray code patterns, namely P(1) to P(Nsfg-Nmod+1), are included. These (Nsfg-Nmod+1) median Gray code pattern groups are an example of the "first median subgroup".
[0091] The remaining P(Nsfg-Nmod+2) to P(Nsfg+Nmod-1) are divided into two using the same method as when creating a subframe group. That is, the group of the top Gray code pattern P(Nsfg-Nmod+2) and the (Nmod-2) Gray code patterns P(Nsfg+2) to P(Nsfg+Nmod-1) from the bottom is assigned to the period Da, and the remaining (Nmod-1) Gray code patterns P(Nsfg-Nmod+3) to P(Nsfg+1) are assigned to the period Dc. Here, the top Gray code pattern P(Nsfg-Nmod+2) is configured at the end of the period Da. Here, the top Gray code pattern P (Nsfg-Nmod+2) is an example of the "2nd median subgroup", the (Nmod-2)th Gray code pattern group from the bottom is an example of the "4th median subgroup", and the remaining (Nmod-1) Gray code patterns are an example of the "3rd median subgroup".
[0092] The subframe group of the middle Gray code pattern created as described above is arranged between the highest subframe in the adjacent frames and the highest subframe of the initial subframe group when equation (1) holds true. Thus, between the period Da and the period Dc, the subframe arranged with the lower Gray code pattern is adjacent to the subframe arranged with the highest Gray code pattern, thereby preventing the lower Gray code pattern from being continuous.
[0093] In the Gray code pattern arrangement created as described above, the value of the depth of the object 103 that can be detected varies according to the value of the number of subframes Nsfg of one subframe group. For example, when the number of subframes N of one frame is 10 and the number of subframes Nsfg is 3, as an example, a Gray code pattern arrangement of {10, 1, 2, 9, 3, 4, 8, 5, 6, 7} is obtained ( Figure 4 Gray code pattern arrangement D). The values of the arrangement are Figure 4Similarly, it indicates which Gray code pattern is configured in each subframe. If this Gray code pattern arrangement is used, no matter at which time point in the frame the detection is started, the accumulated Gray code value becomes (24+25+26)=112 or more during the three subframes. That is, the subject 103 with a depth less than 112 is detected in the three subframes at the latest.
[0094] Therefore, for each subframe number Nsfg, the minimum value of the accumulated Gray code value as described above is obtained as the depth threshold, and when the depth of the object to be detected exceeds the threshold, by selecting and switching the Gray code pattern arrangement created using the corresponding subframe number Nsfg value, it is possible to use the optimal Gray code pattern arrangement according to the depth of the object 103. In addition, when the Gray code pattern arrangement is created by the above-mentioned steps, the minimum value of the accumulated Gray code value for a certain subframe number Nsfg value is as follows.
[0095] (a) When equation (1) holds, the minimum value of the accumulated Gray code value for a certain subframe number Nsfg is the sum of the Gray code values of the Gray code patterns corresponding to the subframes in the subframe group including the lowest Gray code pattern in the upper Gray code pattern.
[0096] (b) When equation (1) does not hold, the minimum value of the accumulated Gray code value for a certain value of the subframe number Nsfg becomes the sum of the Gray code values of the Gray code patterns included in the median subgroup.
[0097] Figure 7 It is a graph showing the relationship between the number of subframes Nsfg included in one subframe group involved in the prior art and implementation mode 1, and the minimum value of the sum of the Gray code values in Nsfg consecutive subframes. The solid line of the graph is a graph arranged in the order created by the steps of the present disclosure. The vertical axis can also be said to be the maximum value of the depth that can be detected relative to the number of subframes Nsfg included in one subframe group. Therefore, with respect to the value of the number of subframes Nsfg, it is sufficient to set it to the minimum number of subframes Nsfg that can detect the depth of the subject 103 detected in the previous frame. That is, the maximum value of the depth that can be detected in each subframe number is used as the depth threshold, and when the depth of the subject 103 exceeds the threshold, the value of the number of subframes Nsfg is switched.
[0098] exist Figure 7 In the figure, the dotted line is a graph when the subject 103 is detected according to the arrangement A regardless of the depth of the subject 103. It can be seen that the range of the depth of the subject 103 that can be detected with the same number of subframes is expanded. In other words, when starting detection from an arbitrary subframe in the frame, the position detection system of this embodiment can detect the subject 103 at a certain depth at a high speed compared with the conventional technology.
[0099] In addition, in the first embodiment, instead of generating the Gray code pattern image by the pattern creation unit 116, 10 Gray code pattern images may be stored in advance in the storage unit 119, and the data selection unit 115 reads these images and outputs them to the projection device 102 via the projection image output unit 117. In addition, in the case of performing detection across two sub-frame groups, in order to perform detection at a high speed, the highest Gray code pattern of the sub-frame group is arranged in the first sub-frame among all sub-frame groups, but it may be arranged in the last sub-frame. In this case, the highest Gray code pattern of the frame is arranged at the end of the frame, and when the middle Gray code pattern exists, the middle Gray code pattern is arranged between the highest Gray code pattern of the last sub-frame group and the highest Gray code pattern of the frame.
[0100] Furthermore, in the arrangement of the Gray code patterns in Embodiment 1, no matter how Nsfg consecutive subframes are selected, there is always a portion including Gray code patterns higher than them. Therefore, for this portion, since the ordering does not affect the operation of the position detection system, it can be any order, so the order is not limited.
[0101] As described above, according to Embodiment 1, the Gray code pattern arrangement to be used is selected according to the depth of the object 103 detected in the previous frame. In addition, the Gray code pattern arrangement is determined so that the accumulated Gray code value becomes greater than a given value after a given subframe has passed, regardless of which subframe in the frame is detected. The Gray code pattern arrangement is arranged in the order that the Gray code value increases and then decreases, or decreases and then increases. As a result, compared with the prior art, any depth of the object 103 can be detected at a high speed.
[0102] Industrial Applicability
[0103] The present invention can be utilized in, for example, projection mapping and a danger perception sensor for an automobile, which detects an object existing within a given distance range at high speed.
Claims
1. A position detection system for detecting a position of a subject by detecting an object at a depth within a given range of the subject using a plurality of frames each divided into a plurality of subframes, comprising: A projection device projects a plurality of Gray code patterns corresponding to the plurality of subframes and having Gray code values of powers of 2 that are different from each other in the order that the Gray code values increase and then decrease or decrease and then increase, and classifies the plurality of subframes into a plurality of subframe groups so that the total of the Gray code values of the subframes included in each subframe group is greater than a depth threshold; an imaging device for imaging a subject onto which the plurality of Gray code patterns are projected according to each of the plurality of subframes to generate an image; and A control unit estimates a position of the object based on the captured image.
2. The position detection system according to claim 1, wherein: The projection device projects the plurality of Gray code patterns configured into the sequence by the control unit, The control unit arranges the plurality of Gray code patterns in a given arrangement, an arrangement arranged in reverse order of the given arrangement, or an arrangement in which an arbitrary number of Gray code patterns are rearranged from the beginning of the given arrangement to the end of the given arrangement.
3. The position detection system according to claim 1, wherein: The position detection system further comprises: a storage unit that pre-stores a plurality of different arrangements of the plurality of Gray code patterns; The projection device projects the plurality of Gray code patterns according to one arrangement selected by the control unit from among the plurality of arrangements.
4. The position detection system according to claim 1, wherein: The plurality of subframes are N subframes, including one subframe configured with a highest Gray code pattern having a maximum Gray code value, and M subframe groups each consisting of Nsfg subframes, where N, Nsfg, and M are natural numbers greater than or equal to 2. The (N-1) Gray code patterns other than the uppermost Gray code pattern include M upper Gray code patterns in order from the uppermost Gray code value and (Nsfg-1)×M lower Gray code patterns in order from the lowermost Gray code value. The M subframe groups are combinations of one Gray code pattern in order from the uppermost position of the upper Gray code pattern and (Nsfg-1) Gray code patterns in order from the lowermost position of the lower Gray code pattern.
5. The position detection system according to claim 4, wherein: The highest Gray code pattern is arranged in the first subframe of the frame, and the M subframe groups are arranged in sequence starting from the subframe group including the highest upper Gray code pattern among the upper Gray code patterns, and in each of the M subframe groups, the upper Gray code pattern is arranged in the last subframe.
6. The position detection system according to claim 4, wherein: The uppermost Gray code pattern is arranged in the last subframe of the frame, and the M subframe groups are arranged in sequence starting from the subframe group including the lowermost upper Gray code pattern among the upper Gray code patterns, and in each of the M subframe groups, the upper Gray code pattern is arranged in the first subframe.
7. The position detection system according to claim 5 or 6, wherein: The plurality of subframes further comprises a remaining subframe group consisting of (N-Nsfg×M-1) subframes, The (N-1) Gray code patterns other than the uppermost Gray code pattern further include (N-Nsfg×M-1) middle Gray code patterns respectively arranged in the remaining subframe groups, The middle Gray code pattern is inserted between the uppermost Gray code pattern and the lowermost Gray code pattern among the upper Gray code patterns.
8. The position detection system according to claim 7, wherein: The number of Gray code patterns included in the median Gray code pattern is (Nsfg+Nm), where Nm is a natural number. When the median Gray code pattern is divided into (A) a first median subgroup consisting of (Nsfg-Nm) Gray code patterns, (B) a second median subgroup connected to the first median subgroup and consisting of one Gray code pattern, (C) a third median subgroup connected to the second median subgroup and consisting of Nm Gray code patterns, and (D) a fourth median subgroup consisting of the remaining (Nm-1) Gray code patterns, The median Gray code pattern is configured with the first to fourth median subgroups in the order of (1) the fourth median subgroup, the second median subgroup, the first median subgroup, and the third median subgroup, or in the order of (2) the third median subgroup, the first median subgroup, the second median subgroup, and the fourth median subgroup.
9. The position detection system according to any one of claims 4 to 6, wherein: The minimum value among the sums of the Gray code values of the Gray code patterns corresponding to the consecutive Nsfg subframes in each of the plurality of frames is set as the threshold value of the depth when the arrangement of the plurality of Gray code patterns is selected in order to change the order.
10. The position detection system according to claim 7, wherein: The sum of the Gray code values of the Gray code patterns corresponding to the subframes in the subframe group including the lowest Gray code pattern among the upper Gray code patterns among the M subframe groups is set as the depth threshold when selecting the arrangement of the plurality of Gray code patterns to change the order.
11. The position detection system according to claim 8, wherein: The sum of the Gray code values of the Gray code patterns included in the first and third middle subgroups is set as the depth threshold when selecting the arrangement of the plurality of Gray code patterns in order to change the order.
12. A position detection method for a position detection system for detecting a position of a subject by detecting an object at a depth within a given range of the subject using a plurality of frames each divided into a plurality of sub-frames, the position detection method comprising: A step of arranging a plurality of Gray code patterns corresponding to the plurality of subframes and having mutually different powers of 2 Gray code values in an order of increasing and then decreasing or decreasing and then increasing the Gray code values, and classifying the plurality of subframes into a plurality of subframe groups such that a total of Gray code values of subframes included in each subframe group is greater than a depth threshold; a step of projecting the plurality of Gray code patterns onto the subject in the sequence; A step of photographing the object onto which the plurality of Gray code patterns are projected according to each of the plurality of subframes to generate a photographed image; as well as A step of estimating the position of the object based on the captured image.
Citation Information
Patent Citations
Position measuring method
JP1985152903A
Devices and methods of generating three dimensional (3D) colored models
US20110050859A1
Measurement system, measurement method, and vision chip
US20160054118A1
Information processing apparatus, information processing method, and storage medium
US20160247287A1