Distance measuring device and distance measuring method

The distance measuring device and method enhance accuracy and reduce power consumption by controlling light emission and exposure pulses using multiple packet generation codes, addressing the challenges faced by existing devices in background light conditions.

JP7752484B2Active Publication Date: 2025-10-10MIRAXIA EDGE TECH CO LTD
View PDF 18 Cites 0 Cited by

Patent Information

Application Number
JP2021062304
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Filing Date
2021-03-31
Publication Date
2025-10-10
Estimated Expiration
2041-03-31

AI Technical Summary

Technical Problem

Existing distance measuring devices face challenges in balancing accuracy in identifying distance intervals with power consumption, particularly in the presence of background light.

Method used

A distance measuring device and method that employs a pulse generating unit to control light emission and exposure pulses, using multiple packet generation codes to adjust between exposure and emission pulses, allowing for accurate distance calculation while minimizing power consumption.

Benefits of technology

The solution effectively balances accuracy in identifying distance intervals and reduces power consumption, improving the performance of distance measurement devices in challenging lighting conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007752484000001
    Figure 0007752484000001
  • Figure 0007752484000002
    Figure 0007752484000002
  • Figure 0007752484000003
    Figure 0007752484000003
Patent Text Reader

Abstract

To provide a distance measuring device with which it is possible to achieve further improvements.SOLUTION: The distance measuring device comprises: a pulse generation unit 10107 for generating a luminescent pulse and an exposure pulse; a solid state imaging unit 10105 for generating a plurality of packets that hold the signal values of pixels in accordance with the exposure pulse; a control unit 10106 for controlling the pulse generation unit 10107 in accordance with a plurality of first packet generation codes that cause two or more exposure pulses to be generated in a plurality of unit sections corresponding to a plurality of distance sections into which a distance measurement range is divided, or a plurality of second packet generation codes that cause two or more luminescent pulses to be generated in a plurality of unit sections; a light source unit 10102 for radiating light in accordance with the luminescent pulses; and a distance computation unit 10108 for computing a distance on the basis of the plurality of packets outputted from the solid state imaging unit 10105. The control unit 10106 switches between the plurality of first packet generation codes and the plurality of second packet generation codes.SELECTED DRAWING: Figure 1
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] The present invention relates to a distance measuring device and a distance measuring method. [Background technology]

[0002] Among the various methods for detecting objects, the TOF (time of flight) method is known, which measures distance by utilizing the time it takes for light to travel to and from the object.

[0003] Patent Document 1 discloses that a drive that performs multiple exposures for one light emission identifies the distance slot from which the reflected light returns, and then performs phase difference TOF calculations for the specific distance slot. [Prior art documents] [Patent documents]

[0004] [Patent Document 1] Patent No. 6455088 Summary of the Invention [Problem to be solved by the invention]

[0005] However, there is a demand for further improvements in distance measuring devices.

[0006] In view of the above-described problems, an object of the present disclosure is to provide a distance measuring device and a distance measuring method that can be further improved. [Means for solving the problem]

[0007] In order to solve the above problem, a distance measuring device according to one aspect of the present disclosure includes: a light emission pulse that indicates a light irradiation timing; At timing linked to the light emission pulse A pulse generating unit generates an exposure pulse that indicates the timing of exposure to light reflected from a subject, and a signal value generating unit holds the pixel signal value in accordance with the exposure pulse. Rupa a solid-state imaging unit for generating a packet; selected according to predetermined conditions,a control unit that controls the pulse generation unit in accordance with a plurality of first packet generation codes that generate two or more exposure pulses in a plurality of unit sections corresponding to a plurality of distance sections obtained by dividing a distance measurement range, or a plurality of second packet generation codes that generate two or more light emission pulses in the plurality of unit sections; a light source unit that irradiates light in accordance with the light emission pulses; and a plurality of The aforementioned a distance calculation unit that calculates a distance based on the packets, and the control unit A drive circuit for controlling the pulse generating unit according to and the plurality of second packet generation codes. A drive circuit for controlling the pulse generating unit according to and replacement can.

[0008] A distance measuring method according to an aspect of the present disclosure includes: a light source unit that irradiates light in accordance with a light emission pulse that indicates a light irradiation timing; At timing linked to the light emission pulse Exposure pulse that indicates the timing of exposure to reflected light from the subject to Therefore, the signal value of the pixel is retained. Rupa a distance calculation unit that calculates a distance based on a plurality of packets output from the solid-state imaging unit, the distance calculation unit obtaining a plurality of first packet generation codes that generate two or more exposure pulses in a plurality of unit sections corresponding to a plurality of distance sections obtained by dividing a distance measurement range, and a plurality of second packet generation codes that generate two or more light emission pulses in the plurality of unit sections, and Driven by and the plurality of second packet generation codes. Driven by and , subject to the prescribed conditions, Cut replacement The distance measurement is performed while [Effects of the Invention]

[0009] According to the distance measuring device and distance measuring method according to the present disclosure, further improvements can be achieved. [Brief explanation of the drawings]

[0010] [Figure 1]FIG. 1 is a diagram showing a schematic configuration of a TOF (Time Of Flight) distance measuring device according to the first embodiment. [Figure 2] FIG. 2 is a diagram showing the configuration of one pixel arranged in the solid-state imaging unit according to the first and second embodiments. [Figure 3] FIG. 3 is a diagram showing a schematic configuration of the solid-state imaging unit according to the first and second embodiments. [Figure 4] FIG. 4 is a diagram showing a control sequence of a light emitting unit and a solid-state imaging unit according to frame drive pattern A and frame drive pattern B according to the first embodiment. [Figure 5] FIG. 5 is a timing chart showing an example of the operation of frame driving pattern A and frame driving pattern B according to the first embodiment. [Figure 6] FIG. 6 is a diagram showing a packet generation pattern A used to generate packet 1 to 6 unit drive patterns A and discharge drive pulses for controlling the solid-state imaging unit in the pulse generation unit according to the first embodiment. [Figure 7] FIG. 7 is a diagram showing a packet generation pattern B used to generate packet 1 to 6 unit drive patterns B and discharge drive pulses for controlling the solid-state imaging unit in the pulse generation unit according to the first embodiment. [Figure 8] FIG. 8 is a diagram illustrating the operation timing of the packet-by-packet driving pattern according to the packet generation pattern A according to the first embodiment. [Figure 9] FIG. 9 is a diagram illustrating the operation timing of the two-packet unit driving pattern A based on the packet generation pattern A according to the first embodiment. [Figure 10] FIG. 10 is a diagram illustrating the operation timing of the packet 3 unit driving pattern A based on the packet generation pattern A according to the first embodiment. [Figure 11] FIG. 11 is a diagram illustrating the operation timing of the packet 4-unit driving pattern A based on the packet generation pattern A according to the first embodiment. [Figure 12]FIG. 12 is a diagram illustrating the operation timing of the packet 5-unit driving pattern A based on the packet generation pattern A according to the first embodiment. [Figure 13] FIG. 13 is a diagram illustrating the operation timing of the 6-packet unit driving pattern A based on the packet generation pattern A according to the first embodiment. [Figure 14] FIG. 14 is a diagram illustrating the operation timing of the packet-by-packet driving pattern B according to the packet generation pattern B according to the first embodiment. [Figure 15] FIG. 15 is a diagram illustrating the operation timing of the two-packet unit driving pattern B based on the packet generation pattern B according to the first embodiment. [Figure 16] FIG. 16 is a diagram illustrating the operation timing of the packet 3 unit driving pattern B based on the packet generation pattern B according to the first embodiment. [Figure 17] FIG. 17 is a diagram illustrating the operation timing of the packet 4 unit driving pattern B based on the packet generation pattern B according to the first embodiment. [Figure 18] FIG. 18 is a diagram illustrating the operation timing of the 5-packet unit driving pattern B in the packet generation pattern B according to the first embodiment. [Figure 19] FIG. 19 is a diagram illustrating the operation timing of the 6-packet unit driving pattern B based on the packet generation pattern B according to the first embodiment. [Figure 20] FIG. 20 is a diagram illustrating the operation timing of reading pixel values ​​from the solid-state imaging unit according to the first and second embodiments. [Figure 21] FIG. 21 is a diagram illustrating a configuration of a distance calculation unit according to the first embodiment. [Figure 22] FIG. 22 is a diagram showing data for storing packet generation pattern A of FIG. 6 according to the first embodiment in the memory (LUT) of the distance calculation unit. [Figure 23] FIG. 23 is a diagram showing data for storing packet generation pattern B of FIG. 7 according to the first embodiment in the memory (LUT) of the distance calculation unit. [Figure 24] FIG. 24 is a diagram showing the operation timing of the distance calculation unit according to the first embodiment. [Figure 25] FIG. 25 is a diagram illustrating a schematic configuration of a TOF (Time Of Flight) distance measuring device according to the second embodiment. [Figure 26] FIG. 26 is a diagram showing a frame driving pattern C according to the second embodiment and a control sequence for a light emitting unit and a solid-state imaging unit. [Figure 27] FIG. 27 is a schematic timing chart of the frame driving pattern C according to the second embodiment. [Figure 28] FIG. 28 is a diagram showing switching between packet generation pattern A and packet generation pattern B according to the second embodiment. [Figure 29] FIG. 29 is a diagram showing a packet generation pattern A used to generate packet 1 to 6 unit drive patterns A and discharge drive pulses for controlling the solid-state imaging unit in the pulse generation unit according to the second embodiment. [Figure 30] FIG. 30 is a diagram showing a packet generation pattern B used to generate packet 1 to 6 unit drive patterns B and discharge drive pulses for controlling the solid-state imaging unit in the pulse generation unit according to the second embodiment. [Figure 31] FIG. 31 is a diagram illustrating the operation timing of the packet-by-packet driving pattern A according to the packet generation pattern A according to the second embodiment. [Figure 32] FIG. 32 is a diagram illustrating the operation timing of the packet 2 unit driving pattern A based on the packet generation pattern A according to the second embodiment. [Figure 33] FIG. 33 is a diagram illustrating the operation timing of the packet 3 unit driving pattern A based on the packet generation pattern A according to the second embodiment. [Figure 34] FIG. 34 is a diagram illustrating the operation timing of the packet 4-unit driving pattern A based on the packet generation pattern A according to the second embodiment. [Figure 35]FIG. 35 is a diagram illustrating the operation timing of the 5-packet unit driving pattern A based on the packet generation pattern A according to the second embodiment. [Figure 36] FIG. 36 is a diagram illustrating the operation timing of the 6-packet unit driving pattern A based on the packet generation pattern A according to the second embodiment. [Figure 37] FIG. 37 is a diagram illustrating the operation timing of the packet-by-packet driving pattern B according to the packet generation pattern B according to the second embodiment. [Figure 38] FIG. 38 is a diagram illustrating the operation timing of the packet 2 unit driving pattern B based on the packet generation pattern B according to the second embodiment. [Figure 39] FIG. 39 is a diagram for explaining the operation timing of the packet 3 unit driving pattern B in the packet generation pattern B according to the second embodiment. [Figure 40] FIG. 40 is a diagram illustrating the operation timing of the packet 4 unit driving pattern B based on the packet generation pattern B according to the second embodiment. [Figure 41] FIG. 41 is a diagram illustrating the operation timing of the packet 5 unit driving pattern B in the packet generation pattern B according to the second embodiment. [Figure 42] FIG. 42 is a diagram illustrating the operation timing of the 6-packet unit driving pattern B in the packet generation pattern B according to the second embodiment. [Figure 43] FIG. 43 is a diagram showing the configuration of a distance calculation unit according to the second embodiment. [Figure 44] FIG. 44 is a diagram showing data for storing packet generation pattern A of FIG. 29 according to the second embodiment in the memory (LUT) of the distance calculation unit. [Figure 45] FIG. 45 is a diagram showing data for storing packet generation pattern B of FIG. 30 according to the second embodiment in the memory (LUT) of the distance calculation unit. [Figure 46] FIG. 46 is a diagram showing a method of calculating the number of exposures for packets 1 to 6 used in the distance calculation unit according to the second embodiment. [Figure 47] FIG. 47 is a diagram showing the operation timing of the distance calculation unit according to the second embodiment. DETAILED DESCRIPTION OF THE INVENTION

[0011] (Findings that formed the basis of this disclosure) In Japanese Patent Application No. 2019-200085 (filing date: November 1, 2019) and Japanese Patent Application No. 2019-209169 (filing date: November 19, 2019), the inventors have provided a technology for performing distance measurement in one frame to improve distance measurement of fast-moving objects by expanding the distance measurement range and improving distance measurement accuracy.

[0012] However, the technology disclosed in Patent Document 1 and the technology of Patent Application No. 2019-209169 involves multiple exposures for one light emission, which poses a problem of reduced accuracy in identifying distance intervals when there is a lot of background light.

[0013] The technology in application number 2019-200085 performs one exposure for multiple emissions, which makes it resistant to background light, but it has the problem of increased power consumption due to the increased number of emissions.

[0014] Therefore, the present disclosure provides a distance measuring device and a distance measuring method that achieve further improvements, for example, by making it possible to adjust the balance between suppressing deterioration in accuracy in identifying distance intervals and suppressing power consumption when there is a lot of background light.

[0015] In order to solve such problems, a distance measuring device according to one embodiment of the present disclosure includes a pulse generating unit that generates an emission pulse that indicates the timing of light irradiation and an exposure pulse that indicates the timing of exposure to light reflected from a subject, a solid-state imaging unit that generates a plurality of packets that hold pixel signal values ​​according to the exposure pulse, a control unit that controls the pulse generating unit according to a plurality of first packet generation codes that generate two or more exposure pulses in a plurality of unit sections that correspond to a plurality of distance sections that divide a distance measurement range, or a plurality of second packet generation codes that generate two or more emission pulses in the plurality of unit sections, a light source unit that irradiates light according to the emission pulse, and a distance calculation unit that calculates the distance based on the plurality of packets output from the solid-state imaging unit, and the control unit switches between the plurality of first packet generation codes and the plurality of second packet generation codes. The device comprises a pulse generating unit that generates an emission pulse that indicates the timing of light irradiation and an exposure pulse that indicates the timing of exposure to reflected light, a solid-state imaging unit that acquires n (n is an integer of 4 or more) types of signal values ​​according to the exposure pulse, a control unit that controls the pulse generating unit for each of a plurality of unit sections corresponding to a plurality of distance sections into which the distance measurement range is divided, a light source unit that irradiates light according to the emission pulse, and a distance calculation unit that calculates the distance based on the n types of signal values ​​for each unit section obtained from the solid-state imaging unit.

[0016] This allows for further improvements, for example, making it possible to adjust the balance between suppressing deterioration in accuracy in identifying distance intervals when there is a lot of background light and suppressing power consumption.

[0017] In addition, a ranging method according to one embodiment of the present disclosure is a ranging method in a ranging device that includes a light source unit that irradiates light in accordance with an emission pulse that indicates the timing of light irradiation, a solid-state imaging unit that generates multiple packets that hold pixel signal values ​​in accordance with the exposure pulse that indicates the timing of exposure to light reflected from a subject, and a distance calculation unit that calculates distance based on the multiple packets output from the solid-state imaging unit, wherein the method obtains multiple first packet generation codes that generate two or more exposure pulses in multiple unit sections corresponding to multiple distance sections into which the ranging range is divided, and multiple second packet generation codes that generate two or more emission pulses in the multiple unit sections, and performs ranging operations while switching between the multiple first packet generation codes and the multiple second packet generation codes.

[0018] This allows for further improvements, for example, making it possible to adjust the balance between suppressing deterioration in accuracy in identifying distance intervals when there is a lot of background light and suppressing power consumption.

[0019] Hereinafter, distance measuring imaging devices according to embodiments of the present disclosure will be described with reference to the drawings. Note that the following embodiments each illustrate a specific example of the present disclosure, and the numerical values, shapes, materials, components, arrangement positions and connection forms of the components are merely examples and do not limit the present disclosure.

[0020] (Embodiment 1) FIG. 1 is a diagram schematically illustrating the configuration of a TOF (Time Of Flight) distance measuring device and surrounding objects according to the first embodiment.

[0021] In the figure, an imaging space 10100 is a space including a distance measuring device, an object 10101 to be measured, and a background light source 10140. The object 10101 is not limited to a person, but may be any object. The distance measuring device in the figure includes a light source unit 10102, an optical lens 10103, an optical filter 10104, a solid-state imaging unit 10105, a control unit 10106, a pulse generation unit 10107, and a distance calculation unit 10108.

[0022] The light source unit 10102 irradiates pulsed light in accordance with the light emission pulse 10120 from the pulse generating unit 10107. The light emission pulse 10120 is a signal that instructs the light source unit 10102 to emit pulsed light. The light source unit 10102 emits, for example, infrared light. The light source unit 10102 may also be an LED or a laser element.

[0023] The optical lens 10103 and the optical filter 10104 are an optical system that guides the reflected light from the object 10101 to the solid-state imaging unit 10105. The optical filter 10104 is, for example, an infrared transmission filter.

[0024] The solid-state imaging unit 10105 has a plurality of pixels, and generates a plurality of packets that hold pixel signal values ​​by exposing the pixels in accordance with exposure pulses from the pulse generation unit 10107. In Fig. 1, the solid-state imaging unit 10105 generates a plurality of packets per pixel. The solid-state imaging unit 10105 receives n (n is an integer equal to or greater than 4, and n = 6 in Fig. 1) types of exposure pulses from the pulse generation unit 10107, that is, packet 1 exposure pulse 10121 to packet 6 exposure pulse 10126, and generates six packets per pixel.

[0025] The control unit 10106 controls the pulse generation unit 10107 in accordance with a plurality of first packet generation codes or a plurality of second packet generation codes. Here, each of the plurality of first packet generation codes refers to a bit string that generates two or more exposure pulses in a plurality of unit sections corresponding to a plurality of distance sections into which the ranging range is divided. Each of the plurality of second packet generation codes refers to a bit string that generates two or more light emission pulses in a plurality of unit sections.

[0026] More specifically, each of the plurality of first packet generation codes indicates that light should be emitted in the first unit interval of the plurality of unit intervals and indicates whether exposure should be performed for each of the plurality of unit intervals, and each of the plurality of second packet generation codes indicates that light should be emitted in each of the plurality of unit intervals and indicates that exposure should be performed for the last unit interval of the plurality of unit intervals.

[0027] Also, the number of first packet generation codes is n1 (n1 is an integer equal to or greater than 4), and the number of second packet generation codes is n2 (n2 is an integer equal to or greater than 4). n1 and n2 may be the same or different. In this embodiment, n1 and n2 are both 6, the same as the above n.

[0028] Here, the packets are multiple packets according to the first packet generation code or the second packet generation code. This refers to the signal charges generated and accumulated by the solid-state imaging unit 10105 through several or one exposures. n1 types of packets (signal charges) are generated from n1 types of first packet generation codes. n2 types of packets (signal charges) are generated from n2 types of first packet generation codes. In the following, as a specific example, it is assumed that n1 = n2 = n = 6.

[0029] Furthermore, the control unit 10106 generates, as a first independent code, an n1-bit binary number indicating the presence or absence of an exposure pulse for each unit interval in the plurality of first packet generation codes. The control unit 10106 also generates, as a second independent code, an n2-bit binary number indicating the presence or absence of an emission pulse for each unit interval in the plurality of second packet generation codes. In this embodiment, n1 = n2 = n = 6, and the first independent code and the second independent code corresponding to the same unit interval are designed to have the same bit pattern. This allows a portion of the processing in the distance calculation unit 10108 to be shared between the first independent code and the second independent code.

[0030] The control unit 10106 generates a first adjacent code of n1 bits by performing a logical sum or logical product on each bit of two first independent codes corresponding to two adjacent unit intervals, and also generates a second adjacent code of n2 bits by performing a logical sum or logical product on each bit of two second independent codes corresponding to two adjacent unit intervals.

[0031] The pulse generation unit 10107 generates a light emission pulse 10120 that instructs the light source unit 10102 on the timing of light irradiation, and an exposure pulse that instructs the solid-state imaging unit 10105 on the timing of exposure. The pulse generation unit 10107 generates six signals, a packet 1 exposure pulse 10121 to a packet 6 exposure pulse 10126, as n types of exposure pulses.

[0032] The distance calculation unit 10108 calculates the distance based on n types of signal values ​​for each unit interval obtained from the solid-state imaging unit 10105. Specifically, the distance calculation unit 10108 determines an n1-bit binary number as a first imaging code by binarizing the signal values ​​of n1 types of packets generated based on multiple first packet generation codes, compares the first independent code with the first imaging code, and calculates the distance corresponding to the matching unit interval. Also, the solid-state imaging unit 10105 determines an n2-bit binary number as a second imaging code by binarizing the signal values ​​of n2 types of packets generated based on multiple second packet generation codes, compares the second independent code with the second imaging code, and calculates the distance corresponding to the matching unit interval.

[0033] The distance calculation unit 10108 also compares the first adjacent code with the first imaging code, and if they match, calculates the intermediate distance between the two corresponding unit sections.The distance calculation unit 10108 also compares the second adjacent code with the second imaging code, and if they match, calculates the intermediate distance between the two corresponding unit sections.

[0034] 1, pulsed irradiation light 10110 with a wavelength of 940 nm (pulse width 10 ns) is irradiated from a light source unit 10102 onto an object 10101 in an imaging space 10100. A solid-state imaging unit 10105 receives reflected light 10111 reflected by the object 10101 and background light reflected light 10142 obtained by reflecting background light 10141 emitted from a background light source 10140 on the object 10101 via an optical lens 10103 and an optical filter 10104 that transmits light in the near-infrared wavelength region around 940 nm, and captures the formed image. The light emission timing of the light source unit 10102 and the exposure timing of the solid-state imaging unit 10105 are controlled by the light emission pulse 10120, exposure pulses 10121 to 10126 of packets 1 to 6, and discharge drive pulse 10127 of the pulse generation unit 10107, which are controlled by the control unit 10106 via a control bus. The light source unit 10102 emits irradiation light 10110 when the light emission pulse 10120 is at a high level, and does not emit irradiation light 10110 when the light emission pulse 10120 is at a low level. The solid-state imaging unit 10105 emits the exposure pulses 10121 to 10126 of packets 1 to 6 for each pixel. The solid-state imaging unit 10106 outputs a solid-state imaging unit output signal 10130, which is six types of signal values ​​corresponding to the distances to the object 10101, to the distance calculation unit 10108. The distance calculation unit 10108 uses the solid-state imaging unit output signal 10130 and control information from the control unit 10106 to output, for each pixel, a section number signal 10131 corresponding to the distance to the object 10101.

[0035] The distance measuring device is made up of a light source unit 10102, an optical lens 10103, an optical filter 10104, a solid-state imaging unit 10105, a control unit 10106, a pulse generation unit 10107, and a distance calculation unit 10108. The light source unit 10102 has a drive circuit and a light-emitting element, and emits light when a voltage is applied from the drive circuit. The light-emitting element may be a laser diode or other light-emitting element. The control unit 10106, the pulse generation unit 10107, and the distance calculation unit 10108 are realized by combining, for example, a CPU (Central Processing Unit), an FPGA (Field Programmable Gate Array), a DSP (Digital Signal Processor), an AFE (An Analog Front End), etc.

[0036] FIG. 2 is a diagram showing the configuration of a pixel 10200 of the solid-state imaging unit 10105 according to the first embodiment.

[0037] As shown in the figure, the pixel 10200 includes a photoelectric conversion pixel 10201, two drains 10210, six FDAs (Floating Diffusion Amplifiers) 10211 to 10216, six source follower circuits 10221 to 10226, and six output selection transistors 10231 to 10236. The pixel 10200 also has gate electrodes between the photoelectric conversion pixel 10201 and each of the drain 10210 and the FDAs 10211 to 10216.

[0038] The photoelectric conversion pixel 10201 is composed of a PD (Photodiode) that receives reflected light 10111 and performs photoelectric conversion.

[0039] The drain 10210 discharges the signal charge photoelectrically converted by the photoelectric conversion pixel 10201 .

[0040] Each of the FDAs 10211 to 10216 accumulates signal charges photoelectrically converted by the photoelectric conversion pixel 10201.

[0041] The source follower circuit 10221 outputs a voltage according to the amount of signal charge in the FDA (signal charge storage unit) 10211. The same applies to the source follower circuits 10222 to 10226.

[0042] When the output enable signal is at a high level, the output selection transistor 10231 outputs the output voltage of the source follower circuit 10221 as a pixel output signal 10241. The same applies to the output selection transistors 10232 to 10236.

[0043] Next, the operation of the pixel 10200 will be described. When the packet 1 exposure pulse 10121 is set to a high level, the signal charge photoelectrically converted by the photoelectric conversion pixel 10201 is accumulated in the FDA 10211. When the packet 2 exposure pulse 10122 is set to a high level, the signal charge photoelectrically converted by the photoelectric conversion pixel 10201 is accumulated in the FDA 10212. When the packet 3 exposure pulse 10123 is set to a high level, the signal charge photoelectrically converted by the photoelectric conversion pixel 10201 is accumulated in the FDA 10213. When the packet 4 exposure pulse 10124 is set to a high level, the signal charge photoelectrically converted by the photoelectric conversion pixel 10201 is accumulated in the FDA 10214. When the packet 5 exposure pulse 10125 is set to a high level, the signal charge photoelectrically converted by the photoelectric conversion pixel 10201 is accumulated in the FDA 10215. Packet 6 When the exposure pulse 10126 is set to a high level, the signal charge photoelectrically converted by the photoelectric conversion pixel 10201 is accumulated in the FDA 10216 .

[0044] When the discharge drive pulse 10127 is set to a high level, the signal charge photoelectrically converted in the photoelectric conversion pixel 10201 is discharged to the drain 10210. Therefore, by setting the discharge drive pulse 10127 to a high level when the exposure pulses 10121 to 10126 of packets 1 to 6 are all at a low level, the signal charge photoelectrically converted in the photoelectric conversion pixel 10201 is discharged to the drain 10210 when the exposure pulses 10121 to 10126 of packets 1 to 6 are all at a low level, and when one of the six exposure pulses 10121 to 10126 of packets 1 to 6 is at a high level, the remaining five are at a low level. By setting the discharge drive pulse 10127 to a low level, the signal charge photoelectrically converted by the photoelectric conversion pixel 10201 is accumulated in the FDAs 10211 to 10216 corresponding to the exposure pulses 10121 to 10126 of packets 1 to 6 only when one of the six exposure pulses 10121 to 10126 of packets 1 to 6 is at a high level, thereby performing six types of imaging per pixel corresponding to the exposure pulses 10121 to 10126 of packets 1 to 6. As signal charge accumulates in FDA10211 to 10216, a voltage corresponding to the amount of signal charge is generated, generating a packet 1 voltage value corresponding to the amount of signal charge of FDA10211, a packet 2 voltage value corresponding to the amount of signal charge of FDA10212, a packet 3 voltage value corresponding to the amount of signal charge of FDA10213, a packet 4 voltage value corresponding to the amount of signal charge of FDA10214, a packet 5 voltage value corresponding to the amount of signal charge of FDA10215, and a packet 6 voltage value corresponding to the amount of signal charge of FDA10216.By setting the output enable signal 10240 to a high level, the packet 1 voltage value passes through the source follower circuit 10221 and the output selection transistor 10231 to become the pixel output signal 10241, the packet 2 voltage value passes through the source follower circuit 10222 and the output selection transistor 10232 to become the pixel output signal 10242, the packet 3 voltage value passes through the source follower circuit 10223 and the output selection transistor 10233 to become the pixel output signal 10243, the packet 4 voltage value passes through the source follower circuit 10224 and the output selection transistor 10234 to become the pixel output signal 10244, the packet 5 voltage value passes through the source follower circuit 10225 and the output selection transistor 10235 to become the pixel output signal 10245, and the packet 6 voltage value passes through the source follower circuit 10226 and the output selection transistor 10236 to become the pixel output signal 10246, all at the same time.

[0045] 3 is a configuration diagram of a solid-state imaging unit 10105 according to the first embodiment. The solid-state imaging unit 10105 in the figure includes a plurality of pixels 10200 arranged two-dimensionally, a row selection unit, a column AD 10370, and a shift register 10371. As shown in FIG. 3, the solid-state imaging unit 10105 has X pixels 10200 arranged in the horizontal direction and Y pixels in the vertical direction, two-dimensionally, where X=320 and Y=240 in the first embodiment. Note that the number of pixels is an example and is not limited to this. The output enable signals 10240 of the pixels 10200 at pixel address 11, pixel address 12, and pixel address 1X, which are arranged side by side in the horizontal direction in the first row, are connected to a row selection signal 10300; the output enable signals 10240 of the pixels 10200 at pixel address 21, pixel address 22, and pixel address 2X, which are arranged side by side in the horizontal direction in the second row, are connected to a row selection signal 10301; the output enable signals 10240 of the pixels 10200 at pixel address 31, pixel address 32, and pixel address 3X, which are arranged side by side in the horizontal direction in the third row, are connected to a row selection signal 10302; and the output enable signals 10240 of the pixels 10200 at pixel address Y1, pixel address Y2, and pixel address YX, which are arranged side by side in the horizontal direction in the Yth row, are connected to a row selection signal 10303. Furthermore, pixel output signals 10241 to 10246 of pixels 10200 at pixel address 11, pixel address 21, pixel address 31, and pixel address Y1, which are arranged side by side in the vertical direction in the first column, are connected to vertical pixel signals 10311 to 10316, and pixel output signals 10241 to 10246 of pixels 10200 at pixel address 12, pixel address 22, pixel address 32, and pixel address Y2, which are arranged side by side in the vertical direction in the second column, are connected to vertical pixel signals 10311 to 10316. 0246 is connected to vertical pixel signals 10321 to 10326, and pixel output signals 10241 to 10246 of pixels 10200 at pixel address 1X, pixel address 2X, pixel address 3X, and pixel address YX, which are arranged vertically in the Xth column, are connected to vertical pixel signals 10331 to 10336. Vertical pixel signals 10311 to 10316, 10321 to 10326, and 10331 to 10336 are connected to column AD 10370, and the output signal of column AD 10370 is connected to shift register 10371, and solid-state imaging unit output signal 10130 is output from shift register 10371.

[0046] Next, we will explain the readout operation of the solid-state imaging unit 10105. Note that this readout operation is the same as that of a general CMOS image sensor with six times the number of horizontal pixels. By setting row selection signal 10300 to a high level, row selection signal 10301 to a low level, row selection signal 10302 to a low level, and row selection signal 10303 to a low level, pixel output signals 10241 to 10246 from packets 1 to 6 of pixel 10200 at pixel address 11 are output to vertical pixel signals 10311 to 10316, pixel output signals 10241 to 10246 from packets 1 to 6 of pixel 10200 at pixel address 12 are output to vertical pixel signals 10321 to 10326, and pixel output signals 10241 to 10246 from packets 1 to 6 of pixel 10200 at pixel address 1X are output to vertical pixel signals 10331 to 10336, and input to column AD 10370. By setting row selection signal 10300 to low level, row selection signal 10301 to high level, row selection signal 10302 to low level, and row selection signal 10303 to low level, pixel output signals 10241 to 10246 of packets 1 to 6 of pixel 10200 at pixel address 21 are output to vertical pixel signals 10311 to 10316, pixel output signals 10241 to 10246 of packets 1 to 6 of pixel 10200 at pixel address 22 are output to vertical pixel signals 10321 to 10326, and pixel output signals 10241 to 10246 of packets 1 to 6 of pixel 10200 at pixel address 2X are output to vertical pixel signals 10331 to 10336, and input to column AD370. By setting row selection signal 10300 to low level, row selection signal 10301 to low level, row selection signal 10302 to high level, and row selection signal 10303 to low level, pixel output signals 10241 to 10246 of packets 1 to 6 of pixel 10200 at pixel address 31 are output to vertical pixel signals 10311 to 10316, pixel output signals 10241 to 10246 of packets 1 to 6 of pixel 10200 at pixel address 32 are output to vertical pixel signals 10321 to 10326, and pixel output signals 10241 to 10246 of packets 1 to 6 of pixel 10200 at pixel address 3X are output to vertical pixel signals 10331 to 10336, and input to column AD 10370.By setting row selection signal 10300 to low level, row selection signal 10301 to low level, row selection signal 10302 to low level, and row selection signal 10303 to high level, pixel output signals 10241 to 10246 of packets 1 to 6 of pixel 10200 at pixel address Y1 are output to vertical pixel signals 10311 to 10316, pixel output signals 10241 to 10246 of packets 1 to 6 of pixel 10200 at pixel address Y2 are output to vertical pixel signals 10321 to 10326, and pixel output signals 10241 to 10246 of packets 1 to 6 of pixel 10200 at pixel address YX are output to vertical pixel signals 10331 to 10336, and input to column AD 10370. The column AD 10370 AD converts the input pixel output signals 10241 to 10246 of packets 1 to 6 for X pixels into 12-bit signal values, generates packet 1 signal values ​​obtained by AD converting packet 1 voltage values ​​for X pixels, packet 2 signal values ​​obtained by AD converting packet 2 voltage values, packet 3 signal values ​​obtained by AD converting packet 3 voltage values, packet 4 signal values ​​obtained by AD converting packet 4 voltage values, packet 5 signal values ​​obtained by AD converting packet 5 voltage values, and packet 6 signal values ​​obtained by AD converting packet 6 voltage values, and outputs these to the shift register 10371. The shift register 10371 shifts the input signal values ​​of packets 1 to 6 for X pixels one by one, and outputs them to the solid-state imaging unit output signal 10130.

[0047] 4 is a diagram showing a control sequence of the light source unit 10102 and the solid-state imaging unit 10105 according to the first embodiment. In the diagram, frame drive pattern A 10400 and frame drive pattern B 10401 are switched for each frame. That is, the control unit 10106 switches between a plurality of first packet generation codes and a plurality of second packet generation codes for each frame. Here, frame drive pattern A 10400 refers to driving performed by 10106 controlling the pulse generation unit 10107 in accordance with a plurality of first packet generation codes. Frame drive pattern B 10401 refers to driving performed by 10106 controlling the pulse generation unit 10107 in accordance with a plurality of second packet generation codes.

[0048] In the control sequence shown in Fig. 4, the control unit 10106 instructs the pulse generation unit 10107 via the control bus as to the number of repetitions of the frame-by-frame drive pattern (12 times in Fig. 4) and the number of repetitions of the unit drive patterns of packets 1 to 6 (300 times in Fig. 4), as shown in Fig. 1, and the pulse generation unit 10107 generates the light emission pulse 10120, the exposure pulses 10121 to 10126 of packets 1 to 6, and the discharge drive pulse 10127 in accordance with the number of repetitions of the frame-by-frame drive pattern and the number of repetitions of the unit drive patterns of packets 1 to 6. Note that a method for generating the light emission pulse 10120, the exposure pulses 10121 to 10126 of packets 1 to 6, and the discharge drive pulse 10127 for each of the unit drive patterns A 10431 to 10436 of packets 1 to 6 will be described later. Note that this method of switching frame drive patterns is an example and is not limited to this.

[0049] Fig. 5 is a timing chart showing an example of the operation of frame drive pattern A10400 and frame drive pattern B10401. Frame drive pattern A10400 is generated from packet generation pattern A10600 shown in Fig. 6. Packet generation pattern A10600 in Fig. 6 shows a specific example of n1 (n1=6) types of first packet generation codes. Section number 10601 indicates the numbers of multiple unit sections corresponding to multiple distance sections into which the ranging range is divided.

[0050] Each of packet 1 generation codes A10611 to A10616 is a bit string that indicates whether or not light should be emitted for each of multiple unit intervals. In Figure 6, each of packet 1 generation codes A10611 to A10616 indicates that light should be emitted only in the unit interval with interval number 0, that is, the first unit interval.

[0051] Each of packet 1 generation code A10621 to packet 1 generation code A10626 is a bit string that indicates whether exposure should be performed for each of multiple unit sections. In Figure 6, each of packet 1 generation code A10621 to packet 1 generation code A10626 indicates that exposure should be performed for two or more unit sections out of multiple unit sections.

[0052] The pair of packet 1 generation code A10611 and packet 1 generation code A10621 is an example of one first packet generation code. Similarly, the pair of packet 1 generation code A10612 and packet 1 generation code A10622, the pair of packet 1 generation code A10613 and packet 1 generation code A10623, the pair of packet 1 generation code A10614 and packet 1 generation code A10624, the pair of packet 1 generation code A10615 and packet 1 generation code A10625, and the pair of packet 1 generation code A10616 and packet 1 generation code A10626 are each an example of one first packet generation code.

[0053] The unit section numbered 0 in section number 10601 has the smallest time difference between the light emission pulse and the exposure pulse, and corresponds to the distance section closest to the distance measuring device. The unit section numbered 30 in section number 10601 has the largest time difference between the light emission pulse and the exposure pulse, and corresponds to the distance section farthest from the distance measuring device.

[0054] As shown in FIG. 5, the unit drive patterns A10431 to A10436 of packets 1 to 6 are drives that generate multiple exposure pulses in response to one light emission pulse.

[0055] On the other hand, the frame driving pattern B10401 is generated from the packet generation pattern B10700 shown in Fig. 7. The packet generation pattern B10700 in Fig. 7 shows a specific example of n2 (n2=6) types of second packet generation codes. The section numbers 10701 indicate the numbers of a plurality of unit sections corresponding to a plurality of distance sections into which the ranging range is divided.

[0056] Each of packet 1 generation codes B10711 to B10716 is a bit string that indicates whether or not light should be emitted for each of multiple unit intervals. In Fig. 7, each of packet 1 generation codes B10721 to B10726 indicates that light should be emitted in two or more unit intervals out of multiple unit intervals.

[0057] Each of packet 1 generation codes B10721 to B10726 is a bit string that indicates whether exposure should be performed for each of multiple unit sections. In Fig. 7, each of packet 1 generation codes B10711 to B10716 indicates that exposure should be performed only for the unit section with section number 30, i.e., the last unit section.

[0058] The pair of packet 1 generation code B10711 and packet 1 generation code B10721 is an example of one second packet generation code. Similarly, the pair of packet 1 generation code B10712 and packet 1 generation code B10722, the pair of packet 1 generation code B10713 and packet 1 generation code B10723, the pair of packet 1 generation code B10714 and packet 1 generation code B10724, the pair of packet 1 generation code B10715 and packet 1 generation code B10725, and the pair of packet 1 generation code B10716 and packet 1 generation code B10726 are each an example of one second packet generation code.

[0059] The unit section numbered 30 in section number 10701 has the smallest time difference between the light emission pulse and the exposure pulse, and corresponds to the distance section closest to the distance measuring device. The unit section numbered 0 in section number 10701 has the largest time difference between the light emission pulse and the exposure pulse, and corresponds to the distance section farthest from the distance measuring device.

[0060] As shown in FIG. 5, unit drive patterns B10451 to 10456 of packets 1 to 6 are drives that generate one exposure pulse for multiple light emission pulses. Here, frame drive pattern A10400 is generated based on packet generation pattern A10600 shown in FIG. 6, and frame drive pattern B10401 is generated based on packet generation pattern B10700 shown in FIG. 7. Therefore, switching between frame drive pattern A10400 and frame drive pattern B10401 in FIG. 4 means switching between packet generation pattern A10600 in FIG. 6 and packet generation pattern B10700 in FIG. 7. In other words, control unit 10106 switches between multiple first packet generation codes and multiple second packet generation codes by switching between packet generation pattern A10600 in FIG. 6 and packet generation pattern B10700 in FIG. 7. The method of switching frame drive patterns will be described in detail later.

[0061] As shown in Fig. 4, the first frame is composed of a frame drive pattern A10400. The frame drive pattern A10400 is composed of 12 repetitions of a frame unit drive pattern A10410 and an imaging data readout 10420 that outputs the signal charges accumulated in the signal charge accumulation units of all the pixels 10200 from the solid-state imaging unit 10105. The frame unit drive pattern A10410 is composed of a packet 1 drive pattern A10421, a packet 2 drive pattern A10422, a packet 3 drive pattern A10423, It consists of a packet 4 drive pattern A10424, a packet 5 drive pattern A10425, and a packet 6 drive pattern A10426. The packet 1 drive pattern A10421 consists of 300 repetitions of the packet 1 unit drive pattern A10431. The packet 2 drive pattern A10422 consists of 300 repetitions of the packet 2 unit drive pattern A10432. The packet 3 drive pattern A10423 consists of 300 repetitions of the packet 3 unit drive pattern A10433. The packet 4 drive pattern A10424 consists of 300 repetitions of the packet 4 unit drive pattern A10434. The packet 5 drive pattern A10425 consists of 300 repetitions of the packet 5 unit drive pattern A10435. The packet 6 drive pattern A10426 consists of 300 repetitions of the packet 6 unit drive pattern A10436.

[0062] Unit drive patterns A 10431 to 10436 of packets 1 to 6 and unit drive patterns B 10451 to 10456 of packets 1 to 6 drive the light emission pulse 10120, exposure pulses 10121 to 10126 of packets 1 to 6, and discharge drive pulse 10127 of Fig. 5. Details of unit drive patterns A 10431 to 10436 of packets 1 to 6 will be described in Fig. 6 and Figs. 8 to 13. Details of unit drive patterns B 10451 to 10456 of packets 1 to 6 will be described in Fig. 7 and Figs. 14 to 19. Furthermore, the control sequence of the light source unit 10102 and the solid-state imaging unit 10105 shown in Fig. 4 is an example and is not limited to this.

[0063] The unit drive patterns A10431 to 10436 of packets 1 to 6 are repeated 300 times in the drive patterns A10421 to 10426 of packets 1 to 6, respectively, and the drive patterns A10421 to 10426 of packets 1 to 6 are repeated 12 times in the frame-by-frame drive pattern A10410. In other words, the unit drive patterns A10431 to 10436 of packets 1 to 6 are each repeated 300 x 12 = 3600 times. By repeating them 3600 times, a sufficient amount of light can be ensured even if the amount of irradiation light 10110 per time is small. On the other hand, by dividing the frame drive pattern A10400 into 12 frame-by-frame drive patterns A10410, the time required for each frame-by-frame drive pattern A10410 is shortened, and the apparent imaging timing of packets 1 to 6 can be synchronized. By repeating the frame-unit drive pattern A10410 12 times, the blur caused by the movement of the object 10101 occurs evenly in packets 1 to 6, making it possible to suppress side effects such as data corruption during distance calculations caused by the movement of the object 10101.

[0064] FIG. 6 shows a packet generation pattern A10600 provided to the control unit 10106 to generate the light emission pulse 10120 for controlling the light source unit 10102, the unit drive patterns A10431 to A10436 for packets 1 to 6 for controlling the solid-state imaging unit 10105, and the discharge drive pulse 10127 according to the first embodiment. The packet generation pattern A10600 illustrates a specific example of n1 (n1=6) types of first packet generation codes. As shown in FIG. 6, the packet generation pattern A10600 has a section number 10601 divided into 31 sections from 0 to 30, each section number 10601 being assigned a value of “0” or “1,” and is information for controlling the driving of the light emission pulse 10120 and the exposure pulses 10121 to 10126. Here, the section numbers 10601 are consecutive numbers assigned to a plurality of distance sections (also referred to as unit sections) into which the distance measurement range is divided. Furthermore, the packet generation pattern A10600 may be stored in advance in the internal memory of the control unit 10106, or may be dynamically acquired from the outside and stored in the internal memory.

[0065] The section number 10601 and packet generation pattern A 10600 are sent to the pulse generation unit 10107 via the control bus, and the pulse generation unit 10107 generates the section number 10601 and the packet generation pattern A 10600. Unit drive patterns A10431 to A10436 of packets 1 to 6 are generated from the light emission pulses and exposure pulses of packets 1 to 6. Note that the packet generation pattern A10600 shown in Fig. 6 is an example, and the packet generation pattern A10600 is not limited to this.

[0066] 8 to 13 are timing charts showing packet 1 unit drive pattern A10431 to packet 6 unit drive pattern A10436 according to embodiment 1. As shown in Fig. 8 to Fig. 13, the pulse generation unit 10107 switches the section number 10601 between 80 sections from 0 to 79 for each unit section (10 ns) and controls the light emission pulse 10120, exposure pulses 10121 to 10126 of packets 1 to 6, and discharge drive pulse 10127 for each section number 10601, thereby generating unit drive patterns A10431 to 10436 of packets 1 to 6. The reason why the section number 10601 of the pulse generation unit 10107 is set to a value (79) that is more than twice the maximum value (30) of the section number 10601 of the packet generation pattern A 10600 is to prevent the irradiation light 10110 from receiving reflected light 10111 from an object 10101 that is located outside the distance measurement range (a section number greater than the maximum value of the section number 10601). For this reason, in section numbers that do not exist in the section number 10601 of the packet generation pattern A 10600, a pulse is generated in which the light emission pulse 10120 is at a low level, the exposure pulses 10121 to 10126 of packets 1 to 6 are at a low level, and the discharge drive pulse 10127 is at a high level. By controlling the solid-state imaging unit 10105 in this way, the time required for 12 repetitions of the frame-unit drive pattern A10410, which corresponds to the imaging exposure time, is 17.28 ms (unit interval 10 ns x number of interval numbers 80 x number of packet-unit drive pattern repetitions 300 x number of packets 6 x number of frame-unit drive pattern repetitions 12). Note that this unit interval specifies that the pulse widths of the irradiation light 10110 and the exposure pulses 10121 to 10126 of packets 1 to 6 are the same, and does not limit the pulse width to 10 ns.

[0067] The following describes a method of controlling the light emission pulse 10120, the exposure pulses 10121 to 10126 of packets 1 to 6, and the discharge drive pulse 10127 for the section numbers 0 to 30 in which the section number 10601 of the packet generation pattern A 10600 exists.

[0068] 8 is a timing chart showing the packet-unit drive pattern A10431. The light emission pulse 10120 is generated as a high level when the light emission pulse of packet 1 of the packet generation pattern A10600 is "1" and as a low level when the light emission pulse of packet 1 of the packet generation pattern A10600 is "0". The packet 1 exposure pulse 10121 is generated as a high level when the exposure pulse of packet 1 of the packet generation pattern A10600 is "1" and as a low level when the exposure pulse of packet 1 of the packet generation pattern A10600 is "0". The packet 2 exposure pulse 10122, packet 3 exposure pulse 10123, packet 4 exposure pulse 10124, packet 5 exposure pulse 10125, and packet 6 exposure pulse 10126 are generated as low levels in all sections. In addition, the discharge drive pulse 10127 is generated as a pulse with the inverted logic of the packet 1 exposure pulse 10121, with the low level being when the exposure pulse of packet 1 of packet generation pattern A10600 is "1" and the high level being when the exposure pulse of packet 1 of packet generation pattern A10600 is "0".

[0069] 9 is a timing chart showing the packet 2 unit drive pattern A10432. The light emission pulse 10120 is generated as a high level when the light emission pulse of packet 2 of the packet generation pattern A10600 is "1", and as a low level when the light emission pulse of packet 2 of the packet generation pattern A10600 is "0". The packet 2 exposure pulse 10122 is generated as a high level when the exposure pulse of packet 2 of the packet generation pattern A10600 is "1", and as a low level when the exposure pulse of packet 2 of the packet generation pattern A10600 is "0". Packet 3 exposure pulse 10123, packet 4 exposure pulse 10124, packet 5 exposure pulse 10125, and packet 6 exposure pulse 10126 are generated as low levels in all sections. Also, the discharge drive pulse 10127 is generated as a pulse with the inverted logic of the packet 2 exposure pulse 10122, with the discharge drive pulse 10127 being low level when the exposure pulse of packet 2 of packet generation pattern A10600 is "1" and high level when the exposure pulse of packet 2 of packet generation pattern A10600 is "0."

[0070] 10 is a timing chart showing the packet 3 unit drive pattern A10433. The light emission pulse 10120 is generated as a high level when the light emission pulse of packet 3 of the packet generation pattern A10600 is "1" and as a low level when the light emission pulse of packet 3 of the packet generation pattern A10600 is "0". The packet 3 exposure pulse 10123 is generated as a high level when the exposure pulse of packet 3 of the packet generation pattern A10600 is "1" and as a low level when the exposure pulse of packet 3 of the packet generation pattern A10600 is "0". The packet 1 exposure pulse 10121, packet 2 exposure pulse 10122, packet 4 exposure pulse 10124, packet 5 exposure pulse 10125, and packet 6 exposure pulse 10126 are generated as low levels in all sections. In addition, the discharge drive pulse 10127 is generated as a pulse with the logic inverted from the packet 3 exposure pulse 10123, with the exposure pulse of packet 3 of packet generation pattern A10600 being at a low level when the exposure pulse of packet 3 of packet generation pattern A10600 is "1" and being at a high level when the exposure pulse of packet 3 of packet generation pattern A10600 is "0".

[0071] 11 is a timing chart showing the packet 4 unit drive pattern A10434. The light emission pulse 10120 is generated as a high level when the light emission pulse of packet 4 of the packet generation pattern A10600 is "1" and as a low level when the light emission pulse of packet 4 of the packet generation pattern A10600 is "0". The packet 4 exposure pulse 10124 is generated as a high level when the exposure pulse of packet 4 of the packet generation pattern A10600 is "1" and as a low level when the exposure pulse of packet 4 of the packet generation pattern A10600 is "0". The packet 1 exposure pulse 10121, packet 2 exposure pulse 10122, packet 3 exposure pulse 10123, packet 5 exposure pulse 10125, and packet 6 exposure pulse 10126 are generated as low levels in all sections. In addition, the discharge drive pulse 10127 is generated as a pulse with the inverted logic of the packet 4 exposure pulse 10124, with the exposure pulse of packet 4 of packet generation pattern A10600 being at a low level when the exposure pulse of packet 4 of packet generation pattern A10600 is "1" and being at a high level when the exposure pulse of packet 4 of packet generation pattern A10600 is "0".

[0072] 12 is a timing chart showing the packet 5 unit drive pattern A10435. The light emission pulse 10120 is generated as a high level when the light emission pulse of packet 5 of the packet generation pattern A10600 is "1" and as a low level when the light emission pulse of packet 5 of the packet generation pattern A10600 is "0". The packet 5 exposure pulse 10125 is generated as a high level when the exposure pulse of packet 5 of the packet generation pattern A10600 is "1" and as a low level when the exposure pulse of packet 5 of the packet generation pattern A10600 is "0". The packet 1 exposure pulse 10121, packet 2 exposure pulse 10122, packet 3 exposure pulse 10123, packet 4 exposure pulse 10124, and packet 6 exposure pulse 10126 are generated as low levels in all sections. In addition, the discharge drive pulse 10127 is generated as a pulse with the logic inverted from the packet 5 exposure pulse 10125, with the low level being low when the exposure pulse of packet 5 of packet generation pattern A10600 is "1" and the high level being high when the exposure pulse of packet 5 of packet generation pattern A10600 is "0".

[0073] 13 is a timing chart showing the packet 6 unit drive pattern A10436. The light emission pulse 10120 is generated as a high level when the light emission pulse of packet 6 of the packet generation pattern A10600 is "1", and as a low level when the light emission pulse of packet 6 of the packet generation pattern A10600 is "0". The packet 6 exposure pulse 10126 is generated as a low level when the exposure pulse of packet 6 of the packet generation pattern A10600 is "1". The packet 1 exposure pulse 10121, packet 2 exposure pulse 10122, packet 3 exposure pulse 10123, packet 4 exposure pulse 10124, and packet 5 exposure pulse 10125 are generated at a low level in all sections. Furthermore, the discharge drive pulse 10127 is generated at a low level when the exposure pulse of packet 6 of packet generation pattern A10600 is "1," and at a high level when the exposure pulse of packet 6 of packet generation pattern A10600 is "0," and a pulse with the inverted logic of the packet 6 exposure pulse 10126 is generated.

[0074] As shown in Fig. 4, the second frame is made up of frame drive pattern B10401. The method for generating frame drive pattern B10401 is the same as that for frame drive pattern A10400, so a description thereof will be omitted. Also, Figs. 14 to 19 show timing charts for unit drive patterns B10451 to 10456 of packets 1 to 6. Note that the generation method is the same as Figs. 8 to 13, so a description thereof will be omitted.

[0075] FIG. 20 is a timing diagram of the imaging data readout 10420 of the solid-state imaging unit 10105 according to the first embodiment.

[0076] Regarding the notations in the figure, for example, the notations "P1(11)v" to "P6(11)v" indicate the voltage values ​​of packets 1 to 6 of pixel 10200 at pixel address 11 in the following explanation, and correspond to pixel output signals 10241 to 10246 and vertical pixel signals 10311 to 10316. Similarly, the notation P6(YX)v indicates the voltage value of packet 6 in the pixel at pixel address YX, and corresponds to pixel output signal 10246 and vertical pixel signal 10336.

[0077] Furthermore, for example, the notations "P1(11)Sig" to "P6(11)Sig" refer to the signal values ​​of packets 1 to 6 of the pixel 10200 at pixel address 11 in the following description. Specifically, P1(11)Sig in the figure refers to the packet 1 signal value of the pixel 10200 at pixel address 11, i.e., the digital value obtained by AD conversion from the packet 1 voltage value by the column AD 10370, and is output as the solid-state imaging unit output signal 10130 to the distance calculation unit 10108 via the shift register 10371. Similarly, P6(YX)Sig refers to the packet 6 signal value of the pixel 10200 at pixel address YX, i.e., the digital value obtained by AD conversion from the packet 6 voltage value by the column AD 10370, and is output as the solid-state imaging unit output signal 10130 to the distance calculation unit 10108 via the shift register 10371.

[0078] By controlling the row selection signals 10300 to 10303, the column AD 10370, and the shift register 10371, the signal values ​​of packets 1 to 6 of all the pixels 10200 shown in Fig. 3 are output to the solid-state imaging unit output signal 10130. Note that the operation of this imaging data readout 10420 is the same as that of a normal CMOS image sensor with six times the number of horizontal pixels.

[0079] As shown in Figure 20, at timing 12000, by setting row selection signal 10300 to a high level, row selection signal 10301 to a low level, row selection signal 10302 to a low level, and row selection signal 10303 to a low level, the voltage values ​​of packets 1 to 6 of pixel 10200 at pixel address 11 are output to vertical pixel signals 10311 to 10316, the voltage values ​​of packets 1 to 6 of pixel 10200 at pixel address 12 are output to vertical pixel signals 10321 to 10326, and the voltage values ​​of packets 1 to 6 of pixel 10200 at pixel address 1X are output to vertical pixel signals 10331 to 10336. The vertical pixel signals 10311 to 10316, the vertical pixel signals 10321 to 10326, and the vertical pixel signals 10331 to 10336 are connected to the column AD 10370, and are AD converted into 12-bit signal values, and the packet 1 voltage values ​​of pixel address 11, pixel address 12, and pixel address 1X are AD converted.At timing 12001 when the AD conversion is completed, the AD converted signal values ​​of packets 1 to 6 at pixel address 11, pixel address 12, and pixel address 1X are output to shift register 10371. The shift register 10371 shifts the input signal values ​​and outputs them from the solid-state imaging unit output signal 10130 in the following order: packet 1 signal value of pixel address 11, packet 2 signal value of pixel address 11, packet 3 signal value of pixel address 11, packet 4 signal value of pixel address 11, packet 5 signal value of pixel address 11, packet 6 signal value of pixel address 11, packet 1 signal value of pixel address 12, packet 2 signal value of pixel address 12, packet 3 signal value of pixel address 12, packet 4 signal value of pixel address 12, packet 5 signal value of pixel address 12, packet 6 signal value of pixel address 12, packet 1 signal value of pixel address 1X, packet 2 signal value of pixel address 1X, packet 3 signal value of pixel address 1X, packet 4 signal value of pixel address 1X, packet 5 signal value of pixel address 1X, and packet 6 signal value of pixel address 1X. Also, at timing 12001, row selection signal 10300 is set to low level, row selection signal 10301 is set to high level, row selection signal 10302 is set to low level, and row selection signal 10303 is set to low level, and the voltage values ​​of packets 1 to 6 of pixel 10200 at pixel address 21, the voltage values ​​of packets 1 to 6 of pixel 10200 at pixel address 22, and the voltage values ​​of packets 1 to 6 of pixel 10200 at pixel address 2X are input to column AD 10370, and AD conversion is performed to a 12-bit signal value.At timing 12002, when the AD conversion of column AD 10370 and the shift operation of shift register 10371, which started at timing 12001, are completed, the result of the AD conversion of column AD 10370, which started at timing 12001, is output to shift register 10371, and as before, the input signal value is shifted and output from solid-state imaging unit output signal 10130. Also, at timing 12002, row selection signal 10300 is set to low level, row selection signal 10301 to low bell, row selection signal 10302 to high level, and row selection signal 10303 to low bell, and the voltage values ​​of packets 1 to 6 of pixel 10200 at pixel address 31, the voltage values ​​of packets 1 to 6 of pixel 10200 at pixel address 32, and the voltage values ​​of packets 1 to 6 of pixel 10200 at pixel address 3X are input to column AD 10370, and AD conversion to 12-bit signal values ​​is performed as before. By performing this operation for all rows, the signal values ​​of all pixels 10200 are output from solid-state imaging unit output signal 10130. Note that, although there are six FDAs 10211 to 10216 shown in FIG. 2 and six generation codes 10501 to 10506 for packets 1 to 6 shown in FIG. 4, this is not limited to six. If the number of signal charge storage units is greater than the number of packet generation codes, signal values ​​for packets 1 to 6 can be obtained in one frame, making it possible to calculate the section number corresponding to the distance using one frame's worth of data. If the number of signal charge storage units is greater than the number of packet generation codes, signal values ​​for packets 1 to 6 can be obtained using data from multiple frames, making it possible to calculate the section number corresponding to the distance. The time required for image data readout 10420, which corresponds to the image readout time, is calculated by multiplying the number of pixels (number of horizontal pixels x 320 + horizontal blanking period 80) x (number of vertical pixels Y 240 + vertical blanking period 23) taking blanking periods into account by the output clock frequency of the solid-state image sensor output signal 10130. If the output clock frequency is 39.319 MHz, the time required for image data readout 10420, which corresponds to the image readout time, is 16.053 ms.

[0080] 21 is a diagram showing the configuration of the distance calculation unit 10108 according to the first embodiment. As shown in FIG. 21, the distance calculation unit 10108 has the number of exposures 12101 to 12106 for packets 1 to 6, which are controlled by the control unit 10106 via a control bus, a memory (LUT) 12180, a selection circuit 12107 for selecting the number of exposures 12101 to 12106 for packets 1 to 6, and a memory (LUT) 12180 for selecting the number of exposures 12101 to 12106 for packets 1 to 6. a divider 12108 which divides the output signal of the divider 12108 by the pixel address; a synchronization unit (B) 12109 which synchronizes the output signal of the divider 12108 for each pixel address; a minimum value detector 12111 which detects the minimum value of the synchronization unit (B) output signals 12121 to 12126; a multiplier 12112 which multiplies the minimum value detector output signal 12127 by the exposure numbers 12101 to 12106 of packets 1 to 6; a synchronization unit (A) 12110 which synchronizes the solid-state imaging unit output signal 10130 for each pixel address; It is composed of a subtractor 12113 that performs subtraction, a maximum / minimum detector 12114 that detects the maximum and minimum values ​​of the subtraction signals 12151 to 12156, an average value calculator 12115 that calculates the average value of the maximum value signal 12157 and minimum value signal 12158 of the maximum / minimum detector and generates a threshold signal 12160, a comparator 12102 that compares the subtraction signals 12151 to 12156 with the threshold signal 12160, a packet generation pattern identification signal 12170 that identifies frame drive pattern A 10400 and frame drive pattern B 10401, and a memory (LUT) 12180.

[0081] Next, the operation of the distance calculation unit 10108 will be described. Note that the description will be made on the assumption that, among the signal values ​​of packets 1 to 6 of the solid-state imaging unit output signal 10130, there is one or more packets that do not contain reflected light 10111, and there is one or more packets that contain reflected light 10111. A method for realizing this constraint will be described with reference to FIGS. 22 and 23.

[0082] The signal values ​​of packets 1 to 6 of the solid-state imaging unit output signal 10130 are synchronized for each pixel address by a synchronization unit (A) 12110, and synchronization unit (A) output signals 12141 to 12146 are generated. Furthermore, since the number of times that exposure pulses 10121 to 10126 of packets 1 to 6 go high differs for each signal value of packets 1 to 6, in order to equalize the amount of background light reflection 10142 contained in the signal values ​​of packets 1 to 6, the exposure numbers 12101 to 12106 of packets 1 to 6 are selected by a selection circuit 12107 for each signal value of packets 1 to 6, divided by a divider 12108, and input to a synchronization unit (B) 12109. The method of generating the exposure numbers 12101 to 12106 of packets 1 to 6 will be described with reference to FIGS. 22 and 23. A synchronization unit (B) 12109 synchronizes the output signal of the divider 12108 for each pixel address and outputs the result to a minimum value detector 12111. The minimum value detector 12111 detects the minimum value of the synchronization unit (B) output signals 12121 to 12126, thereby estimating a signal value corresponding to the amount of reflected background light 10142, and generates a minimum value detector output signal 12127. The minimum value detector output signal 12127 is multiplied by the exposure counts 12101 to 12106 of packets 1 to 6 in a multiplier 12112, and multiplier output signals 12131 to 12136 are generated, which are signal values ​​corresponding to the amount of reflected background light 10142 contained in each signal value of packets 1 to 6. A subtractor 12113 subtracts the synchronization unit (A) output signals 12141 to 12146 from the multiplier output signals 12131 to 12136 to generate subtraction signals 12151 to 12156 from which the background reflected light 10142 component contained in the signal values ​​of packets 1 to 6 has been removed. A maximum / minimum detector 12114 generates a maximum value signal 12157 and a minimum value signal 12158 of the subtraction signals 12151 to 12156. Here, since the signal values ​​of packets 1 to 6 include one or more packets that do not include the reflected light 10111 and one or more packets that include the reflected light 10111, the maximum value signal 12157 is a signal value corresponding to the amount of reflected light 10111, and the minimum value signal 12158 is a black level value.The average value of the maximum value signal 12157 and the minimum value signal 12158 is generated by an average value calculator 12115, thereby generating a threshold signal 12160, which serves as a threshold for detecting packets that include reflected light 10111 and packets that do not include reflected light 10111. The threshold signal 12160, which is the average value of the maximum value signal 12157 and the minimum value signal 12158, is compared by a comparator 12102 with the subtraction signals 12151 to 12156, thereby reducing the effects of variations due to dark currents such as those of the photoelectric conversion pixels 10201 and the FDAs 10211 to 10216, and optical shot noise, and detecting the subtraction signal that includes reflected light 10111. It is possible to set the result of the comparator 12102 for signals 12151 to 12156 to "1" and the result of the comparator 12102 for subtraction signals 12151 to 12156 that do not contain reflected light 10111 to "0." Therefore, an imaging code 12120 obtained by bit-concatenating comparator output signals 12161 to 12166 indicates a packet that contains reflected light 10111. The imaging code 12120 is a specific example of a first imaging code generated based on six types of first packet generation codes. The first imaging code, i.e., the imaging code 12120, is used to access the memory (LUT) 12180 as the lower six bits of the read address. For the first imaging code captured with packet generation pattern A10600, a packet generation pattern identification signal 12170, which is a single bit "0," is used to access the memory 12180. When the 7-bit read address obtained in this way is input, the section number signal 10131 is output as read data from the memory (LUT) 12180.

[0083] Furthermore, a packet generation pattern identification signal 12170, which is one bit "1", is linked to the second imaging code captured using the packet generation pattern B 10700. A 7-bit read address consisting of the second imaging code and the packet generation pattern identification signal 12170 is used to access the memory (LUT) 12180. The memory (LUT) 12180 outputs a section number signal 10131 as read data. The initial value of the memory (LUT) 12180 is set by the control unit 10106 via the control bus, and a method for generating the initial value to be set in the memory (LUT) 12180 will be described with reference to FIGS. 22 and 23.

[0084] 22 is a diagram showing a method for generating initial values ​​(addresses 0x00 to 0x3F) of the memory (LUT) 12180 according to the first embodiment. The upper part of the diagram shows the packet generation pattern A10600, independent code A12200, and adjacent code A12201 shown in FIG. 6. The independent code A12200 is a specific example of a first independent code. The adjacent code A12201 is a specific example of a first adjacent code, and is assumed to be the logical sum of two first independent codes corresponding to two adjacent unit sections. Note that the first adjacent code may be the logical product of two first independent codes corresponding to two adjacent unit sections, or may be one of two types: a logical product and a logical sum.

[0085] The lower part of the figure shows the memory 12180, that is, the LUT.

[0086] 23 is a diagram showing a method for generating initial values ​​(addresses 0x40 to 0x7F) of the memory (LUT) 12180 according to the first embodiment. The upper part of the figure shows the packet generation pattern B10700, independent code B12300, and adjacent code B12301 shown in FIG. 7. The lower part of the figure shows the memory 12180, i.e., the LUT. The independent code B12300 is a specific example of a second independent code. The adjacent code B12301 is a specific example of a second adjacent code, and is the logical sum of two first independent codes corresponding to two adjacent unit sections. The second adjacent code may be the logical product of two first independent codes corresponding to two adjacent unit sections, or may be one of two types: a logical product and a logical sum.

[0087] In section number 10601 in FIG. 22, number 0 indicates the closest distance section. In contrast, in section number 10701 in FIG. 23, number 0 indicates the farthest section distance. Therefore, the LUT in the lower part of FIG. 23 indicates values ​​obtained by inverting section numbers 0 to 30 in FIG. 22 from section number 30 to 0. In addition, the LUT in the lower part of FIG. 23 is designed to use addresses with the upper bit "1" of the second independent code or second adjacent code added (an offset of 0x40 is added).

[0088] 22 is a first independent code generated by the control unit 10106 by converting the exposure pulses of packets 1 to 6 of the packet generation pattern A10600 into n-bit (here, n=6) binary numbers for each unit section. Also, the independent code B12300 in the upper part of FIG. 23 is a first independent code generated by the control unit 10106 by converting the exposure pulses of packets 1 to 6 of the packet generation pattern B10700 into n-bit (here, n=6) binary numbers for each unit section. This is a second independent code generated by control unit 10106 by treating the pulse as an n-bit (here, n=6) binary number for each unit interval. In FIG. 22, there are 30 independent codes A12200, and each of the independent codes A12200 is, in principle, different from any of the other independent codes A12200. In FIG. 23, there are 30 independent codes B12300, and each of the independent codes B12300 is, in principle, different from any of the other independent codes B12300.

[0089] When the first imaging code matches any of the first independent codes (that is, the independent code A12200), the distance value of the pixel is the distance indicated by the corresponding unit interval (distance interval).

[0090] On the other hand, if the second imaging code matches any of the second independent codes (i.e., independent code B12300), the distance value of the pixel is the distance indicated by the unit interval number (distance interval) obtained by inverting the corresponding unit interval. Here, the unit interval number obtained by inverting the corresponding unit interval refers to the unit interval number obtained by inverting the order of multiple unit interval numbers. For example, the unit interval number obtained by inverting unit interval number 7 is unit interval number 23.

[0091] 22 and 23, the independent code A12200 and the independent code B12300 corresponding to the same unit interval are set to have the same bit pattern, in order to standardize part of the processing in the distance calculation unit in the processing for identifying the distance interval corresponding to the first imaging code and the second imaging code.

[0092] Adjacent code A12201 is a specific example of a first adjacent code, and is a code obtained by the logical sum of each bit of two independent codes corresponding to two adjacent unit intervals. Adjacent code A12201 is generated by, for example, control unit 10106 by the logical sum of each bit of two first independent codes corresponding to two adjacent unit intervals.

[0093] The adjacent code B12301 is a specific example of a second disjunction code, and is a code obtained by the logical sum of each bit of two second independent codes corresponding to two adjacent unit intervals. The second adjacent code B12301 is generated by, for example, the control unit 10106 by the logical sum of each bit of two second independent codes corresponding to two adjacent unit intervals.

[0094] When the first imaging code matches any of the first adjacent codes, the intermediate distance between the two unit intervals corresponding to the matching first adjacent code becomes the distance value of the pixel.

[0095] On the other hand, if the second imaging code matches any of the second adjacent codes, the distance value of the pixel is the distance indicated by the unit interval number (distance interval) obtained by inverting the corresponding unit interval.

[0096] As shown in FIG. 22, the initial value of the memory (LUT) 12180 is generated from a packet generation pattern A 10600 that controls the light source unit 10102 and the solid-state imaging unit 10105.

[0097] First, a method for calculating the exposure counts 12101 to 12106 for packets 1 to 6 of packet generation pattern A 10600 will be described. The amount of background light reflection 10142 included in the signal values ​​of packets 1 to 6 is proportional to the number of times (exposure count) that the exposure pulses 10121 to 10126 of packets 1 to 6 are set to High level. For this reason, the control unit 10106 generates the exposure counts 12101 to 12106 for packets 1 to 6 by calculating, for each exposure pulse of packets 1 to 6, the number of sections in which the exposure pulse of packets 1 to 6 is "1" across all section numbers 10601.

[0098] Next, a method for generating the initial values ​​(addresses 0x00 to 0x3F) of the memory (LUT) 12180 will be described. The control unit 10106 sets the packet 1 exposure pulse of the packet generation pattern A10600 to bit 0, the packet 2 exposure pulse of the packet generation pattern A10600 to bit 3F, and the packet 3 exposure pulse of the packet generation pattern A10600 to bit 4F. The packet 3 exposure pulse of packet generation pattern A10600 is regarded as bit 1, the packet 4 exposure pulse of packet generation pattern A10600 as bit 3, the packet 5 exposure pulse of packet generation pattern A10600 as bit 4, and the packet 6 exposure pulse of packet generation pattern A10600 as bit 5, and an independent code A12200 is generated as a 6-bit binary number. For example, the independent code A12220 of 12221 where the section number 10601 is 7 is regarded as a 6-bit binary number where the "0" of the packet 1 exposure pulse where the section number 10601 of the packet generation pattern A10600 is 7 is bit 0, the "0" of the packet 2 exposure pulse where the section number 10601 of the packet generation pattern A10600 is 7 is bit 1, the "0" of the packet 3 exposure pulse where the section number 10601 of the packet generation pattern A10600 is 7 is bit 2, the "0" of the packet 4 exposure pulse where the section number 10601 of the packet generation pattern A10600 is 7 is bit 3, the "1" of the packet 5 exposure pulse where the section number 10601 of the packet generation pattern A10600 is 7 is bit 4, and the "0" of the packet 6 exposure pulse where the section number 10601 of the packet generation pattern A10600 is 7 is bit 5, and is expressed as "10" in hexadecimal.

[0099] Furthermore, the control unit 10106 generates adjacent code A12201 by performing a logical OR operation on the independent code A12200 of two adjacent sections. For example, adjacent code A12223 at the part where section numbers 10601 of 12224 are adjacent to 24 and 25 is generated by performing a logical OR operation on the value "1" of bit 0 of the independent code whose section number 10601 of packet generation pattern A10600 is 24 and the value "0" of bit 0 of the independent code whose section number 10601 of packet generation pattern A10600 is 25. The logical OR operation result "1" of the bit 1 value "1" of the independent code with 24 and the bit 1 value "1" of the independent code with 25 in the section number 10601 of the packet generation pattern A10600 is set to bit 1, and the logical OR operation result "1" of the bit 2 value "0" of the independent code with 24 in the section number 10601 of the packet generation pattern A10600 is set to bit 2. The logical OR operation result of the bit 3 value "0" of the independent code of the section number 10601 of the packet generation pattern A10600 of 24, which is "0", and the bit 3 value "0" of the independent code of the section number 10601 of the packet generation pattern A10600 of 25, which is "0", is set to bit 3, and the logical OR operation result of the bit 4 value "0" of the independent code of the section number 10601 of the packet generation pattern A10600 of 24, which is "0", and the bit 3 value "0" of the independent code of the section number 10601 of the packet generation pattern A10600 of 25, which is set to bit 4. The result of the logical OR operation between the value "1" of bit 4 of the independent code whose interval number 10601 is 25 and the value "1" of bit 5 of the independent code whose interval number 10601 is 24 in packet generation pattern A10600 and the value "1" of bit 5 of the independent code whose interval number 10601 is 25 in packet generation pattern A10600 is considered to be a 6-bit binary number, which is expressed as "33" in hexadecimal.Here, the independent code A12200 is a code that indicates when the reflected light 10111 is returned in only one section number and the signal values ​​of packets 1 to 6 contain the reflected light 10111 as "1", and when the reflected light 10111 is not included as "0". The adjacent code A12201 is a code that indicates when the reflected light 10111 is returned in two adjacent section numbers and the signal values ​​of packets 1 to 6 contain the reflected light 10111 as "1", and when the reflected light 10111 is not included as "0". The imaging code 12120 for each section number is estimated based on the packet generation pattern A10600. As described above, by initializing the memory (LUT) 12180 using the independent code A12200, adjacent code A12201, and the "0" of the packet generation pattern identification signal 12170 indicating the packet generation pattern A10600 as addresses and the section number 10601 corresponding to the independent code A12200 and adjacent code A12201 as data, and by reading and accessing the memory (LUT) 12180 using the imaging code 12120 and the packet generation pattern identification signal 12170 as addresses, it is possible to convert the imaging code 12120 into a section number corresponding to the distance for an image captured with the packet generation pattern A10600.

[0100] Table 12210 is part of the data set for initializing memory (LUT) 12180. Because independent code A12220 is "10" in hexadecimal notation, the data at address "10" in hexadecimal notation in table 12210 is 7, which is section number 12221 of independent code A12220. Also, because adjacent code A12223 is "33" in hexadecimal notation, the data at address "33" in hexadecimal notation in table 12210 is set to 24.5, which is the average value of 24 and 25, which is section number 12224 of adjacent code A12223. This is because, although it is clear that reflected light 10111 is returned in section number 12224 of adjacent code 12223, spanning section numbers 24 and 25, the more detailed timing at which reflected light 10111 is returned is not known, so by assuming that reflected light 10111 is returned midway between the two adjacent sections and using the average value of the two adjacent section numbers, it is possible to reduce the maximum error to half the section.

[0101] As shown in FIG. 23, the initial value of the memory (LUT) 12180 is generated from a packet generation pattern B 10700 that controls the light source unit 10102 and the solid-state imaging unit 10105.

[0102] First, a method for calculating the exposure counts 12101 to 12106 for packets 1 to 6 of packet generation pattern B 10700 will be described. The amount of background light reflection 10142 included in the signal values ​​of packets 1 to 6 is proportional to the number of times (exposure count) that the exposure pulses 10121 to 10126 of packets 1 to 6 are set to High level. For this reason, the control unit 10106 generates the exposure counts 12101 to 12106 for packets 1 to 6 by calculating, for each exposure pulse of packets 1 to 6, the number of sections in which the exposure pulse of packets 1 to 6 is "1" across all section numbers 10601.

[0103] Next, we will explain how to generate the initial values ​​(addresses 0x40 to 0x7F) of the memory (LUT) 12180. The control unit 10106 generates the independent code B12300 as a 6-bit binary number, regarding the packet 1 light emitting pulse of the packet generation pattern B10700 as bit 0, the packet 2 light emitting pulse of the packet generation pattern B10700 as bit 1, the packet 3 light emitting pulse of the packet generation pattern B10700 as bit 2, the packet 4 light emitting pulse of the packet generation pattern B10700 as bit 3, the packet 5 light emitting pulse of the packet generation pattern B10700 as bit 4, and the packet 6 light emitting pulse of the packet generation pattern B10700 as bit 5. For example, the independent code B12320 of 12321 where the section number 10601 is 7 is regarded as a 6-bit binary number where the "0" of the packet 1 light emitting pulse where the section number 10601 of the packet generation pattern B10700 is 7 is bit 0, the "0" of the packet 2 light emitting pulse where the section number 10601 of the packet generation pattern B10700 is 7 is bit 1, the "0" of the packet 3 light emitting pulse where the section number 10601 of the packet generation pattern B10700 is 7 is bit 2, the "0" of the packet 4 light emitting pulse where the section number 10601 of the packet generation pattern B10700 is 7 is bit 3, the "1" of the packet 5 light emitting pulse where the section number 10601 of the packet generation pattern B10700 is 7 is bit 4, and the "0" of the packet 6 light emitting pulse where the section number 10601 of the packet generation pattern B10700 is 7 is bit 5, and is expressed as "10" in hexadecimal.

[0104] Furthermore, the control unit 10106 generates adjacent code B12301 by performing a logical OR operation on each bit of the independent code B12300 of two adjacent sections. For example, the adjacent code 12323 in the part where the section number 10601 of 12324 is adjacent to 24 and 25 is set as bit 0, and the result of logical OR operation "1" of the value "1" of bit 0 of the independent code where the section number 10601 of the packet generation pattern B10700 is 24 and the value "0" of bit 0 of the independent code where the section number 10601 of the packet generation pattern B10700 is 25 is set as bit 1, and the result of logical OR operation "1" of the value "1" of bit 1 of the independent code where the section number 10601 of the packet generation pattern B10700 is 24 and the value "1" of bit 1 of the independent code where the section number 10601 of the packet generation pattern B10700 is 25 is set as bit 2. The result of the logical OR operation between the value "0" of bit 2 of the independent code and the value "0" of bit 2 of the independent code whose section number 10601 of packet generation pattern B10700 is 25 is set to bit 2, the result of the logical OR operation between the value "0" of bit 3 of the independent code whose section number 10601 of packet generation pattern B10700 is 24 and the value "0" of bit 3 of the independent code whose section number 10601 of packet generation pattern B10700 is 25 is set to bit 3, and the result of the logical OR operation between the value "0" of bit 3 of the independent code whose section number 10601 of packet generation pattern B10700 is 24 is set to bit 4. The result of the logical OR operation, "1", between the value "0" of bit 4 of the independent code of packet generation pattern B10700 whose section number 10601 is 25 and the value "1" of bit 4 of the independent code of packet generation pattern B10700 whose section number 10601 is 25 is bit 4, and the result of the logical OR operation, "1" between the value "1" of bit 5 of the independent code of packet generation pattern B10700 whose section number 10601 is 24 and the value "1" of bit 5 of the independent code of packet generation pattern B10700 whose section number 10601 is 25 is bit 5. These six bits are considered to be binary numbers, and are expressed in hexadecimal as "33". Here, the independent code B12300 is a code that indicates when the reflected light 10111 is returned in only one section number and the signal values ​​of packets 1 to 6 contain the reflected light 10111 as "1", and when the reflected light 10111 is not included as "0". The adjacent code B12301 is a code that indicates when the reflected light 10111 is returned in two adjacent section numbers and the signal values ​​of packets 1 to 6 contain the reflected light 10111 as "1", and when the reflected light 10111 is not included as "0". The imaging code 12120 for each section number is estimated based on the packet generation pattern B10700.

[0105] As described above, by initializing the memory (LUT) 12180 using the independent code B12300, adjacent code B12301, and the packet generation pattern identification signal 12170 of "1" indicating the packet generation pattern B10700 as addresses and the section number 10601 corresponding to the independent code B12300 and adjacent code B12301 as data, and by reading and accessing the memory (LUT) 12180 using the imaging code 12120 and the packet generation pattern identification signal 12170 as addresses, it is possible to convert the imaging code 12120 into a section number corresponding to the distance for an image captured with the packet generation pattern B10700.

[0106] Table 12310 is a data set for initializing memory (LUT) 12180. Because independent code 12320 is "10" in hexadecimal notation, the data at address "10" in hexadecimal notation in table 12310 is 23, which is obtained by subtracting 7, which is section number 12321 of independent code B12320, from 30, which is section number 10601 in which the exposure pulse is 1 in packet generation pattern B10700. Also, because adjacent code B12323 is "33" in hexadecimal notation, the data at address "33" in hexadecimal notation in table 12310 is set to 5.5, which is obtained by subtracting the average value 24.5 of 24 and 25, which is section number 12324 of adjacent code B12323, from 30, which is section number 10601 in which the exposure pulse is 1 in packet generation pattern B10700. This is because, although it is clear that reflected light 10111 is returned in section number 12324 of adjacent code B12323, spanning section numbers 24 and 25, the more detailed timing at which reflected light 10111 is returned is not known, so by assuming that reflected light 10111 is returned midway between the two adjacent sections and using the average value of the two adjacent section numbers, it is possible to reduce the maximum error to half the section.

[0107] Here, we will explain how to generate packet generation pattern A 10600 and packet generation pattern B 10700 to be given to the control unit 10106. In order to calculate the section number using the imaging code 12120 generated from the signal values ​​of packets 1 to 6 above, there must be a one-to-one correspondence between the imaging code 12120 and the section number.

[0108] Therefore, the packet generation pattern A10600 is determined so that the values ​​of the independent code A12200 and the adjacent code A12201 do not overlap, and there is a one-to-one correspondence between the imaging code 12120 and the section number. Similarly, the packet generation pattern B10700 is determined so that the values ​​of the independent code B12300 and the adjacent code B12301 do not overlap, and there is a one-to-one correspondence between the imaging code 12120 and the section number. Note that the packet generation pattern is determined on a frame-by-frame basis. Since the packet generation pattern is switched between the pattern A10600 and the packet generation pattern B10700, the independent code A12200 and the adjacent code A12201 may overlap with the independent code B12300 and the adjacent code B12301.

[0109] Furthermore, packet generation pattern A10600 and packet generation pattern B10700 are determined so that independent code A12200, adjacent code A12201, independent code B12300, and adjacent code B12301 do not have a value of "00" in hexadecimal notation. If reflected light 10111 returns at the timing when the value of independent code A12200, adjacent code A12201, independent code B12300, or adjacent code B12301 is "00," the exposure pulses 10121 to 10126 of packets 1 to 6 are low, and therefore the signal values ​​of packets 1 to 6 do not include the reflected light 10111 component. Similarly, if the target object 10101 is not present within the distance measurement range of section numbers 0 to 30, the signal values ​​of packets 1 to 6 also do not include the reflected light 10111 component. For this reason, it is impossible to distinguish between these two conditions from the signal values ​​of packets 1 to 6, so packet generation pattern A10600 and packet generation pattern B10700 are generated so that independent code A12200, adjacent code A12201, independent code B12300, and adjacent code B12301 do not have the value "00" in hexadecimal notation. Also, in preparation for the case where imaging code 12120 matches "00," which does not exist in independent code A12200, adjacent code A12201, independent code B12300, and adjacent code B12301, the write data (section number) of table 12210 and table 12310 is set to a negative value of -1, making it possible to determine that the section number has not been calculated correctly.

[0110] FIG. 24 is a timing chart of the distance calculation unit 10108 when driven by the packet generation pattern A10600 according to the first embodiment.

[0111] Regarding the notation in the figure, the notations "P1(11)Sig" to "P6(11)Sig" indicate the signal values ​​of packets 1 to 6 of pixel 10200 at pixel address 11 in the following explanation.

[0112] The notations “P1(11)CT” to “P6(11)CT” indicate the number of exposures of packets 1 to 6 of pixel 10200 at pixel address 11 in the following description, and correspond to the output of the selection circuit 12107.

[0113] The notation "P1(11)Sig / CT1" indicates (packet 1 signal value of solid-state imaging unit output signal 10130) / (packet 1 exposure count) of pixel 10200 at pixel address 11, and corresponds to packet 1 synchronized B signal 12121.

[0114] The notation "min(11)" indicates the minimum value among packet 1 synchronized B signals 12121 to 12126 of pixel 10200 at pixel address 11, and corresponds to synchronized B minimum signal 12127.

[0115] The notation "min(11) x CT1" indicates (synchronized B minimum signal 12127) x (packet 1 exposure count) of pixel 10200 at pixel address 11, and corresponds to packet 1 multiplication signal 12131.

[0116] The notation “P1(11)Sig-mul” indicates (packet 1 synchronized A signal 12141)-(packet 1 multiplication signal 12131) of pixel 10200 at pixel address 11, and corresponds to packet 1 subtraction signal 12151.

[0117] The notation "mx(11)" indicates the maximum value among the packet 1 subtraction signal 12151 to the packet 6 subtraction signal 12156 of pixel 10200 at pixel address 11, and the maximum value signal 121 This corresponds to 57.

[0118] The notation "mn(11)" indicates the minimum value among the packet 1 subtraction signal 12151 to the packet 6 subtraction signal 12156 of the pixel 10200 at pixel address 11, and corresponds to the minimum value signal 12158.

[0119] The notation “th(11)” indicates (mx(11)+mn(11)) / 2, that is, the average of the maximum value signal 12157 and the minimum value signal 12158 of pixel 10200 at pixel address 11, and corresponds to the threshold signal 12160.

[0120] The notations "P1(11)Bin" to "P6(11)Bin" indicate the codes of packets 1 to 6 of pixel 10200 at pixel address 11 in the following description, and correspond to the imaging code 12120 of pixel 10200 at pixel address 11.

[0121] The notation "Nd(11)" corresponds to the section number signal 10131 of pixel 10200 at pixel address 11. Here, "Nd(11)" and the like are expressed as integers.

[0122] 24, at timing 12400 before a valid signal value is output from the solid-state imaging unit output signal 10130, the control unit 10106 sets values ​​in the exposure counts 12101 to 12106 of packets 1 to 6 and in the memory (LUT) 12180 via the control bus. Note that the packet 1 exposure count 12101 is 11, the packet 2 exposure count 12102 is 11, the packet 3 exposure count 12103 is 12, the packet 4 exposure count 12104 is 11, the packet 5 exposure count 12105 is 11, and the packet 6 exposure count 12106 is 14, and the memory (LUT) 12180 writes the data of the tables 12210 and 12310. At timing 12401, the signal values ​​of packets 1 to 6 of pixel address 11 are sequentially sent from the solid-state imaging unit output signal 10130. The transmitted signal values ​​are sequentially sent to a synchronization unit (A) 12110, and at the same time, are divided by the exposure counts 12101 to 12106 of packets 1 to 6, and sent to a synchronization unit (B) 12109. At timing 12402, an imaging code 12120 is determined using synchronization unit (A) output signals 12141 to 12146, synchronization unit (B) output signals 12121 to 12126, and exposure counts 12101 to 12106 of packets 1 to 6. A bitwise concatenation of the imaging code 12120 and the packet generation pattern identification signal 12170 is used as an address to perform read access to the memory (LUT) 12180, and at timing 12403, a section number signal 10131 corresponding to the distance of the pixel address 11 is output. By performing this operation for all pixels 10200 arranged two-dimensionally, all two-dimensional section numbers are output.

[0123] Here, a method of switching between packet generation pattern A10600 and packet generation pattern B10700, that is, a method of switching between frame driving pattern A10400 and frame driving pattern B10401 shown in FIG. 4, will be described.

[0124] As shown in FIGS. 4 and 6, in the frame drive pattern A10400, the unit drive patterns A10431 to A10436 of packets 1 to 6 are executed 300 times x 12 = 3,600 times per frame. Since one packet-unit drive pattern A10431 performs 11 exposures, the packet-unit drive pattern A10431 performs 11 times x 3,600 = 39,600 exposures per frame. Since one packet-unit drive pattern A10432 performs 11 exposures, the packet-unit drive pattern A10432 performs 11 times x 3,600 = 39,600 exposures per frame. Since one packet-unit drive pattern A10433 performs 12 exposures, the packet-unit drive pattern A10433 performs 12 times x 3,600 = 43,200 exposures per frame. One packet 4 unit drive pattern A10434, 1 To perform one exposure, the 4-packet unit drive pattern A10434 performs 11 times x 3600 times = 39,600 exposures per frame. To perform 11 exposures with one 5-packet unit drive pattern A10435, the 5-packet unit drive pattern A10435 performs 11 times x 3600 times = 39,600 exposures per frame. To perform 14 exposures with one 6-packet unit drive pattern A10436, the 6-packet unit drive pattern A10436 performs 14 times x 3600 times = 50,400 exposures per frame. Therefore, a total of 39,600 times + 39,600 times + 43,200 times + 39,600 times + 39,600 times + 50,400 times = 252,000 exposures are performed per frame.

[0125] As shown in Figures 4 and 7, the frame drive pattern B10401 performs one exposure with one packet unit drive pattern B10451. The packet unit drive pattern B10451 is executed 300 times x 12 = 3600 times per frame, so the packet unit drive pattern B10451 performs 1 x 3600 = 3600 exposures per frame. Similarly, the unit drive patterns B of packets 2 to 6 also perform 3600 exposures per frame, so a total of 3600 x 6 packets = 21600 exposures per frame.

[0126] Therefore, since frame drive pattern B10401 has fewer exposures than frame drive pattern A10400, using frame drive pattern B10401 can reduce the influence of background light reflection 10142, thereby improving the SN ratio of the signal value.

[0127] On the other hand, the frame drive pattern A10400 emits light once for each packet unit drive pattern A10431, as shown in Figures 4 and 6. The packet unit drive pattern A10431 is executed 300 times x 12 times, or 3,600 times per frame, so the packet unit drive pattern A10431 emits light 1 time x 3,600 times = 3,600 times per frame. Similarly, the unit drive patterns A10432 to A10436 of packets 2 to 6 also emit light 3,600 times per frame, so a total of 3,600 times x 6 packets = 21,600 times of light emission per frame.

[0128] As shown in FIGS. 4 and 7, in the frame drive pattern B10401, unit drive patterns B10451 to 10456 of packets 1 to 6 are executed 300 times x 12 = 3,600 times per frame. Since one packet-unit drive pattern B10451 emits light 11 times, the packet-unit drive pattern B10451 emits light 11 times x 3,600 = 39,600 times per frame. Since one packet-unit drive pattern B10452 emits light 11 times, the packet-unit drive pattern B10452 emits light 11 times x 3,600 = 39,600 times per frame. Since one packet-unit drive pattern B10453 emits light 12 times, the packet-unit drive pattern B10453 emits light 12 times x 3,600 = 43,200 times per frame. One packet 4-unit drive pattern B10454 emits light 11 times, so the packet 4-unit drive pattern B10454 emits light 11 times x 3600 times = 39,600 times per frame. One packet 5-unit drive pattern B10455 emits light 11 times, so the packet 5-unit drive pattern B10455 emits light 11 times x 3600 times = 39,600 times per frame. One packet 6-unit drive pattern B10456 emits light 14 times, so the packet 6-unit drive pattern B10456 emits light 14 times x 3600 times = 50,400 times per frame. Therefore, the total number of emissions per frame is 39,600 times + 39,600 times + 43,200 times + 39,600 times + 39,600 times + 50,400 times = 252,000 times. The light emission will be

[0129] Therefore, since the frame drive pattern A 10400 emits light less frequently than the frame drive pattern B 10401, it is possible to reduce power consumption by using the frame drive pattern A 10400. Note that the power consumption may be measured by another means such as an ammeter, instead of the number of times light is emitted.

[0130] As described above, when the amount of reflected background light 10142 is small, it is possible to reduce power consumption by increasing the proportion of frame drive pattern A 10400 used and decreasing the proportion of frame drive pattern B 10401 used. Also, when the amount of reflected background light 10142 is large, it is possible to ensure the SN (ranging accuracy) of the signal value by increasing the proportion of frame drive pattern B 10401 used and decreasing the proportion of frame drive pattern A 10400 used.

[0131] According to this, packet generation pattern A10600 and packet generation pattern B10700 are switched on a frame-by-frame basis depending on the background light reflection 10142 and power consumption, and the ratio of using packet generation pattern A10600 and packet generation pattern B10700 is controlled, thereby optimizing power consumption and signal SN (ranging accuracy).

[0132] As described above, the distance measuring device of embodiment 1 includes a pulse generating unit that generates an emission pulse that indicates the timing of light irradiation and an exposure pulse that indicates the timing of exposure to light reflected from a subject, a solid-state imaging unit that generates a plurality of packets that hold pixel signal values ​​in accordance with the exposure pulse, a control unit that controls the pulse generating unit in accordance with a plurality of first packet generation codes that generate two or more exposure pulses in a plurality of unit sections that correspond to a plurality of distance sections into which the distance measurement range is divided, or a plurality of second packet generation codes that generate two or more emission pulses in a plurality of unit sections, a light source unit that irradiates light in accordance with the emission pulse, and a distance calculation unit that calculates the distance based on the plurality of packets output from the solid-state imaging unit, and the control unit switches between the plurality of first packet generation codes and the plurality of second packet generation codes.

[0133] This allows for further improvements, for example, making it possible to adjust the balance between suppressing deterioration in accuracy in identifying distance intervals when there is a lot of background light and suppressing power consumption.

[0134] Here, the number of the plurality of first packet generation codes is n1 (n1 is an integer equal to or greater than 4), the number of the plurality of second packet generation codes is n2 (n2 is an integer equal to or greater than 4), the control unit generates an n1-bit binary number indicating the presence or absence of an exposure pulse for each unit interval in the plurality of first packet generation codes as the first independent code, and generates an n2-bit binary number indicating the presence or absence of an emission pulse for each unit interval in the plurality of second packet generation codes as the second independent code, the distance calculation unit may determine the n1-bit binary number as the first imaging code by binarizing signal values ​​of the n1 types of packets generated based on the plurality of first packet generation codes, compare the first independent code with the first imaging code, and calculate a distance corresponding to the matching unit interval, and may determine the n2-bit binary number as the second imaging code by binarizing signal values ​​of the n2 types of packets generated based on the plurality of second packet generation codes, and compare the second independent code with the second imaging code, and calculate a distance corresponding to the matching unit interval.

[0135] This makes it possible to identify the distance section in which the object that generated the reflected light exists among the multiple distance sections divided into the distance measurement range.

[0136] Here, n1 may be equal to n2.

[0137] This allows the number of distance sections into which the ranging range is divided to be the same for the plurality of first packet generation codes and the plurality of second packet generation codes.

[0138] Here, each of the first independent codes may have the same bit pattern as any one of the second independent codes.

[0139] This allows a part of the processing in the distance calculation unit to be shared between the first independent code and the second independent code.

[0140] For example, the first independent code and the second independent code corresponding to the same unit interval may have the same bit pattern.

[0141] This allows a part of the processing in the distance calculation unit to be shared in the processing for identifying the distance interval corresponding to the unit interval of one of the first independent code and the second independent code.

[0142] Here, the control unit generates a first adjacent code of n1 bits by performing a logical sum or logical product of each bit of two first independent codes corresponding to two adjacent unit intervals, and generates a second adjacent code of n2 bits by performing a logical sum or logical product of each bit of two second independent codes corresponding to two adjacent unit intervals, and the distance calculation unit compares the first adjacent code with the first imaging code and, if they match, calculates an intermediate distance between the two corresponding unit intervals, and compares the second adjacent code with the second imaging code and, if they match, calculates an intermediate distance between the two corresponding unit intervals.

[0143] This can improve the accuracy of distance measurement.

[0144] Here, each of the plurality of first packet generation codes may indicate that a light emission pulse is to be generated once, and each of the plurality of second packet generation codes may indicate that an exposure pulse is to be generated once.

[0145] According to this, the multiple first packet generation codes are effective in reducing power consumption, and the multiple second packet generation codes are suitable for improving the signal-to-noise ratio even when there is a lot of background light, thereby suppressing deterioration in the accuracy of ranging to identify the distance section.

[0146] Here, each of the multiple first packet generation codes may indicate that light should be emitted in the first unit section of the multiple unit sections, and indicate whether exposure should be performed for each of the multiple unit sections, and each of the multiple second packet generation codes may indicate whether light should be emitted for each of the multiple unit sections, and indicate that exposure should be performed for the last unit section of the multiple unit sections.

[0147] According to this, the multiple first packet generation codes are effective in reducing power consumption, and the multiple second packet generation codes are suitable for improving the signal-to-noise ratio even when there is a lot of background light, thereby suppressing deterioration in the accuracy of ranging to identify the distance section.

[0148] Here, the control unit may calculate the amount of background light based on the packets generated by the solid-state imaging unit, and switch between the first packet generation code and the second packet generation code depending on the calculated amount of background light.

[0149] This makes it possible to suppress deterioration in accuracy in identifying distance intervals when there is a lot of background light, and to optimize power consumption.

[0150] Here, the control unit may measure the power consumption of the distance measuring device, and switch between the first packet generation code and the second packet generation code in accordance with the measured power consumption.

[0151] This makes it possible to optimize the suppression of deterioration in accuracy in identifying distance sections and the suppression of power consumption.

[0152] Here, the control unit may switch between the plurality of first packet generation codes and the plurality of second packet generation pattern codes for each frame.

[0153] This allows for easy switching.

[0154] In addition, the ranging method of embodiment 1 is a ranging method in a ranging device that includes a light source unit that irradiates light in accordance with an emission pulse that indicates the timing of light irradiation, a solid-state imaging unit that generates multiple packets that hold pixel signal values ​​in accordance with an exposure pulse that indicates the timing of exposure to light reflected from a subject, and a distance calculation unit that calculates distance based on the multiple packets output from the solid-state imaging unit, and obtains multiple first packet generation codes that generate two or more exposure pulses in multiple unit sections corresponding to multiple distance sections into which the ranging range is divided, and multiple second packet generation codes that generate two or more emission pulses in the multiple unit sections, and performs ranging operation while switching between the multiple first packet generation codes and the multiple second packet generation codes.

[0155] This allows for further improvements, for example, making it possible to adjust the balance between suppressing deterioration in accuracy in identifying distance intervals when there is a lot of background light and suppressing power consumption.

[0156] The number n1 of the plurality of first packet generation codes and the number n2 of the plurality of second packet generation codes may be different. For example, if n1>n2, the number of distance sections based on the plurality of first packet generation codes can be made greater than the number of distance sections based on the plurality of second packet generation codes. Furthermore, the pulse widths of the light emission pulse and the exposure pulse may be different between the frame drive pattern A10400 and the frame drive pattern B10401 in FIG.

[0157] (Embodiment 2) In the first embodiment, a configuration example was described in which power consumption and SN ratio are improved by switching between packet generation pattern A and packet generation pattern B on a frame-by-frame basis. In the second embodiment, a configuration example is described in which packet generation pattern A and packet generation pattern B are switched within one frame. Furthermore, in the first embodiment, an example was shown in which the first independent code and the second independent code have the same bit pattern for each unit interval. In the second embodiment, an example in which the first independent code and the second independent code are time-reversed in multiple unit intervals is also described. FIG. 25 is a diagram schematically showing the configuration of a TOF (Time Of Flight) type distance measuring device and a peripheral object according to the second embodiment.

[0158] The distance measuring device in this figure differs from the distance measuring device in Figure 1 mainly in that it has distance calculation unit 22508 instead of distance calculation unit 10108, and in that control unit 10106 switches between a plurality of first packet generation codes and a plurality of second packet generation codes within one frame. Below, we will avoid duplication of explanations of the same points and focus on the differences.

[0159] The distance calculation unit 22508 is almost the same as the distance calculation unit 10108. However, the distance calculation unit 22508 calculates the distance such that the first independent code and the second independent code are time-reversed in a plurality of unit intervals. The difference is how they respond when

[0160] The pixel configuration of the distance measuring device of the second embodiment and the configuration of the solid-state imaging unit 10105 may be the same as those shown in FIGS.

[0161] Fig. 26 shows a control sequence for the light source unit 10102 and solid-state imaging unit 10105 according to the second embodiment, in which imaging is performed using a frame drive pattern C22600 for all frames. Fig. 26 shows details of the frame drive pattern C22600. In the control sequence shown in Fig. 26, as shown in Fig. 25, the control unit 10106 instructs the pulse generation unit 10107 via the control bus the number of repetitions of the frame-unit drive pattern (12 times) and the number of repetitions of the unit drive patterns of packets 1 to 6 (100 times and 200 times), and the pulse generation unit 10107 generates the light emission pulse 10120, the exposure pulses 10121 to 10126 of packets 1 to 6, and the discharge drive pulse 10127 in accordance with the number of repetitions of the frame-unit drive pattern and the number of repetitions of the unit drive patterns of packets 1 to 6. Note that Figure 26 explains the generation of unit drive patterns A10431 to 10436 of packets 1 to 6, and Figures 29 to 42 explain how to generate light emission pulse 10120 from unit drive patterns A10431 to 10436 of packets 1 to 6 and unit drive patterns B10451 to 10456 of packets 1 to 6, exposure pulses 10121 to 10126 of packets 1 to 6, and discharge drive pulse 10127.

[0162] As shown in Figure 26, one frame is composed of a frame drive pattern C22600. The frame drive pattern C22600 is composed of 12 repetitions of a frame-by-frame drive pattern C22610 and an imaging data readout 10420 that outputs signal charges accumulated in the signal charge accumulation units of all pixels 10200 from the solid-state imaging unit 10105. The frame-by-frame drive pattern C22610 is composed of a packet 1 drive pattern C22621, a packet 2 drive pattern C22622, a packet 3 drive pattern C22623, a packet 4 drive pattern C22624, a packet 5 drive pattern C22625, and a packet 6 drive pattern C22626. The packet 1 drive pattern C22621 is composed of 100 repetitions of a packet 1-unit drive pattern A10431 and 200 repetitions of a packet 1-unit drive pattern B10451. It consists of 100 repetitions of a packet 2-unit drive pattern A10432 and 200 repetitions of a packet 2-unit drive pattern B10452. It consists of 100 repetitions of a packet 3-unit drive pattern A10433 and 200 repetitions of a packet 3-unit drive pattern B10453. It consists of 100 repetitions of a packet 4-unit drive pattern A10434 and 200 repetitions of a packet 4-unit drive pattern B10454. It consists of 100 repetitions of a packet 5-unit drive pattern A10435 and 200 repetitions of a packet 5-unit drive pattern B10455. It consists of 100 repetitions of a packet 6-unit drive pattern A10436 and 200 repetitions of a packet 6-unit drive pattern B10456. Unit drive patterns A 10431 to 10436 of packets 1 to 6 and unit drive patterns B 10451 to 10456 of packets 1 to 6 drive the light emission pulse 10120, exposure pulses 10121 to 10126 of packets 1 to 6, and discharge drive pulse 10127. Details of unit drive patterns A 10431 to 10436 of packets 1 to 6 will be described in Fig. 29 and Figs. 31 to 36. Details of unit drive patterns B 10451 to 10456 of packets 1 to 6 will be described in Fig. 30 and Figs. 37 to 42.26 is an example of the control sequence of the light source unit 10102 and the solid-state imaging unit 10105, and is not limited to this. For example, the frame drive pattern C22600 may be configured by switching between the frame-unit drive pattern A10410 and the frame-unit drive pattern B10411.

[0163] The packet 1 unit drive pattern A10431 and the packet 1 unit drive pattern B10451 are repeated a total of 300 times in the packet 1 drive pattern C22621, and the packet 1 drive pattern C22621 is repeated 12 times in the frame unit drive pattern C22610. The packet 2 unit drive pattern A10432 and the packet 2 unit drive pattern B10452 are repeated a total of 300 times in the packet 2 drive pattern C22622, and the packet 2 drive pattern C22622 is repeated 12 times in the frame unit drive pattern C22610. The packet 3 unit drive pattern A10433 and the packet 3 unit drive pattern B10453 are repeated a total of 300 times in the packet 3 drive pattern C22623, and the packet 3 drive pattern C22623 is repeated 12 times in the frame unit drive pattern C22610. The packet 4 unit drive pattern A10434 and the packet 4 unit drive pattern B10454 are repeated a total of 300 times in the packet 4 drive pattern C22624, and the packet 4 drive pattern C22624 is repeated 12 times in the frame unit drive pattern C22610. The packet 5 unit drive pattern A10435 and the packet 5 unit drive pattern B10455 are repeated a total of 300 times in the packet 5 drive pattern C22625, and the packet 5 drive pattern C22625 is repeated 12 times in the frame unit drive pattern C22610. The packet 6 unit drive pattern A10436 and the packet 6 unit drive pattern B10456 are repeated a total of 300 times in the packet 6 drive pattern C22626, and the packet 6 drive pattern C22626 is repeated 12 times in the frame unit drive pattern C22610. In other words, unit drive patterns A 10431 to 10436 of packets 1 to 6 are each repeated 100 x 12 = 1200 times. Unit drive patterns B 10451 to 10456 of packets 1 to 6 are each repeated 200 x 12 = 2400 times. By repeating them this many times, it is possible to ensure a sufficient amount of light even if the amount of irradiation light 10110 per time is small.On the other hand, by dividing the frame drive pattern C22600 into 12 frame-unit drive patterns C22610, the time required for each frame-unit drive pattern C22610 is shortened, and the apparent imaging timing of packets 1 to 6 can be synchronized. Furthermore, by repeating the frame-unit drive pattern C22610 12 times, blurring caused by movement of the object 10101 occurs evenly across packets 1 to 6, making it possible to suppress side effects such as data corruption during distance calculation caused by movement of the object 10101.

[0164] FIG. 27 shows a simplified timing chart of the frame drive pattern C22600. The frame drive pattern C22600 is generated from the packet generation pattern A22900 and packet generation pattern B23000 shown in FIGS. 29 and 30. The unit drive patterns A10431 to A10436 of packets 1 to 6 are specific examples of multiple first packet generation codes, and as shown in FIG. 27, are drive patterns that generate multiple exposure pulses for one light emission pulse. On the other hand, the unit drive patterns B10451 to B10456 of packets 1 to 6 are specific examples of multiple second packet encoding codes, and as shown in FIG. 27, are drive patterns that generate one exposure pulse for multiple light emission pulses. The control unit 10106 switches between the packet generation pattern A22900 and the packet generation pattern B23000 within a frame. 28 shows an enlarged view of the switching portion between the packet generation pattern A22900 and the packet generation pattern B23000. A timing chart of the packet 1 unit drive pattern A22630 and the packet 1 unit drive pattern B10451 shown in FIG. 26 is shown. The packet 1 unit drive pattern A22630 is generated from the packet generation pattern A22900 shown in FIG. 29, and the packet 1 unit drive pattern B10451 is generated from the packet generation pattern B23000 shown in FIG. 30. The packet 1 unit drive pattern A22630 is a drive that generates multiple exposure pulses for one light emission pulse, and the packet 1 unit drive pattern B10451 is a drive that generates one exposure pulse for multiple light emission pulses, and this is the point where switching between the packet generation pattern A22900 and the packet generation pattern B23000 occurs.

[0165] Furthermore, timing chart 22800 of packet 1 unit drive pattern A22630 and timing chart 22801 of packet 1 unit drive pattern B10451 are drawn together to create timing chart 22802. Here, packet 1 exposure pulse 10121 of packet 1 unit drive pattern A22630 generated from packet generation pattern A22900 and light emission pulse 10120 of packet 1 unit drive pattern B10451 generated from packet generation pattern B have a time-reversed relationship. For example, exposure pulse 22803 of packet 1 exposure pulse 10121 of packet 1 unit drive pattern A22630 corresponds to light emission pulse 22804 of light emission pulse 10120 of packet 1 unit drive pattern B10451, and exposure pulse 22805 of packet 1 exposure pulse 10121 of packet 1 unit drive pattern A22630 corresponds to light emission pulse 22806 of light emission pulse 10120 of packet 1 unit drive pattern B10451. In this way, by using packet generation pattern A22900 and packet generation pattern B23000 so that packet 1 unit drive pattern A22630 and packet 1 unit drive pattern B10451 have a time-reversed relationship, it is possible to switch between packet generation pattern A22900 and packet generation pattern B23000 within a frame.

[0166] 29 is a diagram showing a packet generation pattern A22900 according to the second embodiment that is given to the control unit 10106 to generate the light emission pulse 10120 that controls the light source unit 10102, unit drive patterns A10431 to 10436 of packets 1 to 6 that control the solid-state imaging unit 10105, and an ejection drive pulse 10127. As shown in FIG. 29, in the packet generation pattern A22900, the section number 10601 is divided into 31 sections from 0 to 30, and a value of "0" or "1" is assigned to each section number 10601, and the packet generation pattern A22900 is information for controlling the driving of the light emission pulse 10120 and the exposure pulses 10121 to 10126. Here, the section numbers 10601 are consecutive numbers assigned to a plurality of distance sections (also called unit sections) that divide the distance measurement range. Furthermore, the packet generation pattern A22900 may be stored in advance in the internal memory of the control unit 10106, or may be dynamically acquired from the outside and stored in the internal memory.

[0167] The section number 10601 and packet generation pattern A22900 are sent to the pulse generation unit 10107 via a control bus, and the pulse generation unit 10107 generates unit drive patterns A10431 to A10436 for packets 1 to 6 from the section number 10601, the light emission pulses and exposure pulses for packets 1 to 6. Note that the packet generation pattern A22900 shown in Fig. 29 is just an example, and the packet generation pattern A22900 is not limited to this.

[0168] 31 to 36 are timing charts showing packet 1 unit drive pattern A10431 to packet 6 unit drive pattern A10436 according to embodiment 2. As shown in Fig. 31 to Fig. 36, the pulse generation unit 10107 switches the section number 10601 between 80 sections from 0 to 79 for each unit section (10 ns) and controls the light emission pulse 10120, exposure pulses 10121 to 10126 of packets 1 to 6, and discharge drive pulse 10127 for each section number 10601, thereby generating unit drive patterns A10431 to 10436 of packets 1 to 6. The reason why the section number 10601 of the pulse generation unit 10107 is set to a value (79) that is more than twice the maximum value (30) of the section number 10601 of the packet generation pattern A22900 is to prevent the irradiation light 10110 from receiving the reflected light 10111 from the object 10101 located outside the distance measurement range (a section number greater than the maximum value of the section number 10601). For this reason, in section numbers that do not exist in the section number 10601 of the packet generation pattern A22900, a pulse is generated in which the light emission pulse 10120 is at a low level, the exposure pulses 10121 to 10126 of packets 1 to 6 are at a low level, and the discharge drive pulse 10127 is at a high level. In this way, the solid-state imaging unit 10105 By controlling this, the time required for 12 repetitions of the frame-unit drive pattern C22610, which corresponds to the imaging exposure time, is 17.28 ms (unit interval 10 ns x number of interval numbers 80 x number of packet-unit drive pattern repetitions 300 x number of packets 6 x number of frame-unit drive pattern repetitions 12). Note that this unit interval specifies that the pulse widths of the irradiation light 10110 and the exposure pulses 10121 to 10126 of packets 1 to 6 are the same, and does not limit the pulse width to 10 ns.

[0169] The following describes a method of controlling the light emission pulse 10120, the exposure pulses 10121 to 10126 of packets 1 to 6, and the discharge drive pulse 10127 for the section numbers 0 to 30 in which the section number 10601 of the packet generation pattern A22900 exists.

[0170] 31 is a timing chart showing the packet-unit drive pattern A10431. The light emission pulse 10120 is generated as a high level when the light emission pulse of packet 1 of packet generation pattern A22900 is "1" and as a low level when the light emission pulse of packet 1 of packet generation pattern A22900 is "0". The packet 1 exposure pulse 10121 is generated as a high level when the exposure pulse of packet 1 of packet generation pattern A22900 is "1" and as a low level when the exposure pulse of packet 1 of packet generation pattern A22900 is "0". The packet 2 exposure pulse 10122, packet 3 exposure pulse 10123, packet 4 exposure pulse 10124, packet 5 exposure pulse 10125, and packet 6 exposure pulse 10126 are generated as low levels in all sections. In addition, the discharge drive pulse 10127 is generated as a pulse with the logic inverted from the packet 1 exposure pulse 10121, with the low level being when the exposure pulse of packet 1 of packet generation pattern A22900 is "1" and the high level being when the exposure pulse of packet 1 of packet generation pattern A22900 is "0".

[0171] 32 is a timing chart showing the packet 2 unit drive pattern A10432. The light emission pulse 10120 is generated as a high level when the light emission pulse of packet 2 of packet generation pattern A22900 is "1" and as a low level when the light emission pulse of packet 2 of packet generation pattern A22900 is "0". The packet 2 exposure pulse 10122 is generated as a high level when the exposure pulse of packet 2 of packet generation pattern A22900 is "1" and as a low level when the exposure pulse of packet 2 of packet generation pattern A22900 is "0". The packet 1 exposure pulse 10121, packet 3 exposure pulse 10123, packet 4 exposure pulse 10124, packet 5 exposure pulse 10125, and packet 6 exposure pulse 10126 are generated as low levels in all sections. In addition, the discharge drive pulse 10127 is generated as a pulse with the logic inverted from the packet 2 exposure pulse 10122, with the low level being when the exposure pulse of packet 2 of packet generation pattern A22900 is "1" and the high level being when the exposure pulse of packet 2 of packet generation pattern A22900 is "0".

[0172] 33 is a timing chart showing the packet 3 unit drive pattern A10433. The light emission pulse 10120 is generated as a high level when the light emission pulse of packet 3 of packet generation pattern A22900 is "1" and as a low level when the light emission pulse of packet 3 of packet generation pattern A22900 is "0". The packet 3 exposure pulse 10123 is generated as a high level when the exposure pulse of packet 3 of packet generation pattern A22900 is "1" and as a low level when the exposure pulse of packet 3 of packet generation pattern A22900 is "0". The packet 1 exposure pulse 10121, packet 2 exposure pulse 10122, packet 4 exposure pulse 10124, packet 5 exposure pulse 10125, and packet 6 exposure pulse 10126 are generated as low levels in all sections. In addition, the discharge drive pulse 10127 is at a low level when the exposure pulse of packet 3 of the packet generation pattern A22900 is "1"; When the exposure pulse of packet 3 of the generated pattern A22900 is "0", it is set to a high level, and a pulse whose logic is inverted from that of packet 3 exposure pulse 10123 is generated.

[0173] 34 is a timing chart showing the packet 4 unit drive pattern A10434. The light emission pulse 10120 is generated as a high level when the light emission pulse of packet 4 of the packet generation pattern A22900 is "1" and as a low level when the light emission pulse of packet 4 of the packet generation pattern A22900 is "0". The packet 4 exposure pulse 10124 is generated as a high level when the exposure pulse of packet 4 of the packet generation pattern A22900 is "1" and as a low level when the exposure pulse of packet 4 of the packet generation pattern A22900 is "0". The packet 1 exposure pulse 10121, packet 2 exposure pulse 10122, packet 3 exposure pulse 10123, packet 5 exposure pulse 10125, and packet 6 exposure pulse 10126 are generated as low levels in all sections. In addition, the discharge drive pulse 10127 is generated as a pulse with the logic inverted from the packet 4 exposure pulse 10124, with the low level being when the exposure pulse of packet 4 of the packet generation pattern A22900 is "1" and the high level being when the exposure pulse of packet 4 of the packet generation pattern A22900 is "0".

[0174] 35 is a timing chart showing the packet 5 unit drive pattern A10435. The light emission pulse 10120 is generated as a high level when the light emission pulse of packet 5 of packet generation pattern A22900 is "1" and as a low level when the light emission pulse of packet 5 of packet generation pattern A22900 is "0". The packet 5 exposure pulse 10125 is generated as a high level when the exposure pulse of packet 5 of packet generation pattern A22900 is "1" and as a low level when the exposure pulse of packet 5 of packet generation pattern A22900 is "0". The packet 1 exposure pulse 10121, packet 2 exposure pulse 10122, packet 3 exposure pulse 10123, packet 4 exposure pulse 10124, and packet 6 exposure pulse 10126 are generated as low levels in all sections. In addition, the discharge drive pulse 10127 is generated as a pulse with the logic inverted from the packet 5 exposure pulse 10125, with the low level being when the exposure pulse of packet 5 of packet generation pattern A22900 is "1" and the high level being when the exposure pulse of packet 5 of packet generation pattern A22900 is "0".

[0175] 36 is a timing chart showing the packet 6 unit drive pattern A10436. The light emission pulse 10120 is generated as a high level when the light emission pulse of packet 6 of packet generation pattern A22900 is "1" and as a low level when the light emission pulse of packet 6 of packet generation pattern A22900 is "0". The packet 6 exposure pulse 10126 is generated as a high level when the exposure pulse of packet 6 of packet generation pattern A22900 is "1" and as a low level when the exposure pulse of packet 6 of packet generation pattern A22900 is "0". The packet 1 exposure pulse 10121, packet 2 exposure pulse 10122, packet 3 exposure pulse 10123, packet 4 exposure pulse 10124, and packet 5 exposure pulse 10125 are generated as low levels in all sections. In addition, the discharge drive pulse 10127 is generated as a pulse with the logic inverted from the packet 6 exposure pulse 10126, with the low level being when the exposure pulse of packet 6 of packet generation pattern A22900 is "1" and the high level being when the exposure pulse of packet 6 of packet generation pattern A22900 is "0".

[0176] 30 is obtained by time-reversing the exposure pulse of the packet generation pattern A22900 as the light emission pulse of the packet generation pattern B, and by time-reversing the light emission pulse of the packet generation pattern A22900 as the exposure pulse of the packet generation pattern B. Note that time-reversal means that when the section number 10601 of the packet generation pattern A22900 is K, the section number 10601 of the packet generation pattern B corresponds to the section calculated from 30-K. The time reversal of packet generation pattern A22900 where section number 10601 is 0 is packet generation pattern B23000's section number 10601, which is 30, and the time reversal of packet generation pattern A22900 where section number 10601 is 1 is packet generation pattern B23000's section number 10601, which is 29. Note that 30 is the maximum value of packet generation pattern A22900's section number 10601.

[0177] As described above, packet generation pattern B23000 is created so that, in all packets of section number 10601 of packet generation pattern A22900, the light emission pulse with section number 10601 K in packet generation pattern A22900 matches the exposure pulse with section number 10601 30-K in packet generation pattern B23000, and so that the exposure pulse with section number 10601 K in packet generation pattern A22900 matches the light emission pulse with section number 10601 30-K in packet generation pattern B23000.

[0178] Note that the method for creating the light emission pulse 10120, unit drive patterns B10451 to 10456 of packets 1 to 6, and exhaust drive pulse 10127 shown in Figures 37 to 42 from packet generation pattern B23000 in Figure 30 is the same as the method for creating the light emission pulse 10120, unit drive patterns A10431 to 10436 of packets 1 to 6, and exhaust drive pulse 10127 shown in Figures 31 to 36 from packet generation pattern A22900 in Figure 29, so explanation will be omitted.

[0179] The timing of the image data readout 10420 of the solid-state image pickup unit 10105 according to the second embodiment may be the same as that shown in FIG.

[0180] 43 is a diagram showing the configuration of the distance calculation unit 22508 according to the second embodiment. As shown in FIG. 43, the distance calculation unit 22508 has the numbers of exposures 24301 to 24306 of packets 1 to 6, which are controlled by the control unit 10106 via a control bus, and a memory (LUT) 24380, and also has a selection circuit 12107 which selects the numbers of exposures 24301 to 24306 of packets 1 to 6, a divider 12108 which divides the solid-state imaging unit output signal 10130 and the output signal of the selection circuit 12107, a synchronization unit (B) 12109 which synchronizes the output signal of the divider 12108 for each pixel address, a minimum value detector 12111 which detects the minimum value of the synchronization unit (B) output signals 12121 to 12126, and a minimum value detector output signal 12127 which synchronizes the number of exposures 24301 to 24306 of packets 1 to 6. a synchronization unit (A) 12110 that synchronizes the solid-state imaging unit output signal 10130 for each pixel address; a subtractor 12113 that subtracts the synchronization unit (A) output signals 12141 to 12146 from the multiplier output signals 12131 to 12136; a maximum / minimum detector 12114 that detects the maximum and minimum values ​​of the subtraction signals 12151 to 12156; an average value calculator 12115 that calculates the average value of the maximum value signal 12157 and minimum value signal 12158 of the maximum / minimum detector and generates a threshold signal 12160; a comparator 12102 that compares the subtraction signals 12151 to 12156 with the threshold signal 12160; and a memory (LUT) 24380.

[0181] Next, the operation of the distance calculation unit 22508 will be described. Note that the description will be made on the assumption that, among the signal values ​​of packets 1 to 6 of the solid-state imaging unit output signal 10130, there is one or more packets that do not contain the reflected light 10111, and there is one or more packets that contain the reflected light 10111. A method for realizing this constraint will be described with reference to FIG. 44.

[0182] The signal values ​​of packets 1 to 6 of the solid-state imaging unit output signal 10130 are synchronized for each pixel address by the synchronization unit (A) 12110, and synchronization unit (A) output signals 12141 to 12146 are generated. Also, the solid-state imaging unit output signal 10130 is generated when exposure pulses 10121 to 10126 of packets 1 to 6 become High level for each signal value of packets 1 to 6. Since the number of exposures differs, in order to align the amount of background light reflection 10142 contained in the signal values ​​of packets 1 to 6, a selection circuit 12107 selects the number of exposures 24301 to 24306 for packets 1 to 6 for each signal value of packets 1 to 6, divides the selected number of exposures by a divider 12108, and inputs the result to a synchronization unit (B) 12109. The method for generating the number of exposures 24301 to 24306 for packets 1 to 6 will be described with reference to FIG. 44. The synchronization unit (B) 12109 synchronizes the output signal of the divider 12108 for each pixel address and outputs the result to a minimum value detector 12111. The minimum value detector 12111 detects the minimum value of the synchronization unit (B) output signals 12121 to 12126 to estimate a signal value corresponding to the amount of background light reflection 10142, and generates a minimum value detector output signal 12127. The minimum value detector output signal 12127 is multiplied by the exposure counts 24301 to 24306 of packets 1 to 6 in a multiplier 12112 to generate multiplier output signals 12131 to 12136, which are signal values ​​corresponding to the amount of background light reflection 10142 contained in each signal value of packets 1 to 6. The synchronization unit (A) output signals 12141 to 12146 and the multiplier output signals 12131 to 12136 are subtracted in a subtractor 12113 to generate subtraction signals 12151 to 12156 from which the background light reflection 10142 component contained in the signal values ​​of packets 1 to 6 has been removed. The maximum / minimum detector 12114 generates a maximum value signal 12157 and a minimum value signal 12158 of the subtraction signals 12151 to 12156. Here, since the signal values ​​of packets 1 to 6 include one or more packets that do not contain reflected light 10111 and one or more packets that contain reflected light 10111, the maximum value signal 12157 is a signal value corresponding to the amount of reflected light 10111, and the minimum value signal 12158 is a black level value. The average value of the maximum value signal 12157 and the minimum value signal 12158 is generated by the average value calculator 12115, thereby generating a threshold signal 12160 that serves as a threshold for detecting packets that contain reflected light 10111 and packets that do not contain reflected light 10111.By comparing the threshold signal 12160, which is the average value of the maximum value signal 12157 and the minimum value signal 12158, with the subtraction signals 12151 to 12156 in the comparator 12102, it is possible to reduce the effects of variations due to dark current of the photoelectric conversion pixels 10201 and the FDAs 10211 to 10216, etc., and optical shot noise, and to set the result of the comparator 12102 for the subtraction signals 12151 to 12156 that include the reflected light 10111 to "1", and the result of the comparator 12102 for the subtraction signals 12151 to 12156 that do not include the reflected light 10111 to "0". Therefore, the imaging code 12120, which is the bit-connected result of the comparator output signals 12161 to 12166, indicates a packet that includes the reflected light 10111. The imaging code 12120 is used as a read address to access the memory (LUT) 24380, and the read data of the memory (LUT) 24380 is output as the section number signal 10131. The initial value of the memory (LUT) 24380 is set by the control unit 10106 via the control bus, and a method for generating the initial value to be set in the memory (LUT) 24380 will be described with reference to FIG.

[0183] FIG. 44 is a diagram showing a method for generating initial values ​​of the memory (LUT) 24380 according to the second embodiment. The upper part of the diagram shows the packet generation pattern A22900, independent code A24400, and adjacent code A24401 shown in FIG. 29. The lower part of the diagram shows the memory 24380, i.e., the LUT. FIG. 45 is a diagram showing a method for generating initial values ​​of the memory (LUT) 24380 according to the second embodiment. The upper part of the diagram shows the packet generation pattern B23000, independent code B24500, and adjacent code B24501 shown in FIG. 30. The lower part of the diagram shows the memory 24380, i.e., the LUT. Note that the table 24410 generated from the packet generation pattern A22900 and the table 24510 generated from the packet generation pattern B23000 are the same. Therefore, it is sufficient to perform either generation of the initial values ​​of the memory (LUT) 24380 from the packet generation pattern A22900 shown in FIG. 44 or generation of the initial values ​​of the memory (LUT) 24380 from the packet generation pattern B23000 shown in FIG.

[0184] The independent code A24400 in the upper row of FIG. 44 is a first independent code generated by the control unit 10106 by converting the exposure pulses of packets 1 to 6 of packet generation pattern A22900 into an n-bit (here, n = 6) binary number for each unit interval. The independent code B24500 in the upper row of FIG. 45 is a second independent code generated by the control unit 10106 by converting the light emission pulses of packets 1 to 6 of packet generation pattern B23000 into an n-bit (here, n = 6) binary number for each unit interval. FIG. 44 shows 30 first independent codes, each of which is, in principle, different from any of the other first independent codes. FIG. 45 also shows 30 second independent codes, each of which is, in principle, different from any of the other second independent codes. If the first imaging code matches any of the first independent codes, the distance value of the pixel is the distance indicated by the corresponding unit interval (distance interval).

[0185] On the other hand, if the second imaging code matches any of the second independent codes (that is, the independent code B24500), the distance value of the pixel is the distance indicated by the unit interval number (distance interval) obtained by inverting the corresponding unit interval.

[0186] 44 and 45, the first independent code and the second independent code corresponding to two unit sections that are inverted from each other are set to have the same bit pattern. This makes it easy to mix the first packet generation code and the second packet generation code within one frame, facilitating switching. This is also because part of the processing in the distance calculation unit is shared in the processing for identifying the distance sections corresponding to the first imaging code and the second imaging code.

[0187] Adjacent code A24401 is a specific example of a first adjacent code, and is a code obtained by the logical sum of each bit of two first independent codes corresponding to two adjacent unit intervals. Adjacent code A24401 is generated by, for example, control unit 10106 by the logical sum of each bit of two first independent codes corresponding to two adjacent unit intervals.

[0188] Adjacent code B24501 is a specific example of a second adjacent code, and is a code obtained by the logical sum of each bit of two second independent codes corresponding to two adjacent unit intervals. Adjacent code B24501 is generated by control unit 10106, for example, by the logical sum of each bit of two second independent codes corresponding to two adjacent unit intervals.

[0189] When the first imaging code matches any of the first adjacent codes, the intermediate distance between the two unit intervals corresponding to the matching first adjacent code becomes the distance value of the pixel.

[0190] On the other hand, if the second imaging code matches any of the second adjacent codes, the distance value of the pixel is the distance indicated by the unit interval number (distance interval) obtained by inverting the corresponding unit interval.

[0191] As shown in FIG. 44, the initial value of the memory (LUT) 24380 is generated from a packet generation pattern A22900 that controls the light source unit 10102 and the solid-state imaging unit 10105.

[0192] First, a method for calculating the exposure counts 24431 to 24436 for packets 1 to 6 of packet generation pattern A22900 will be described. The amount of background light reflection 10142 included in the signal values ​​of packets 1 to 6 is proportional to the number of times (exposure count) that the exposure pulses 10121 to 10126 of packets 1 to 6 are set to High level. For this reason, the control unit 10106 generates the exposure counts 24431 to 24436 for packets 1 to 6 by calculating, for each exposure pulse of packets 1 to 6, the number of sections in which the exposure pulse of packets 1 to 6 is "1" across all section numbers 10601.

[0193] Next, a method for generating the initial value of the memory (LUT) 24380 will be described. The control unit 10106 generates the packet 1 exposure pulse of the packet generation pattern A22900 from bit 0, packet The packet 2 exposure pulse of packet generation pattern A22900 is regarded as bit 1, the packet 3 exposure pulse of packet generation pattern A22900 as bit 2, the packet 4 exposure pulse of packet generation pattern A22900 as bit 3, the packet 5 exposure pulse of packet generation pattern A22900 as bit 4, and the packet 6 exposure pulse of packet generation pattern A22900 as bit 5 to generate an independent code A24400 as a 6-bit binary number. For example, the independent code A24420 of 24421 where the section number 10601 is 7 is regarded as a 6-bit binary number where the "0" of the packet 1 exposure pulse where the section number 10601 of the packet generation pattern A22900 is 7 is bit 0, the "0" of the packet 2 exposure pulse where the section number 10601 of the packet generation pattern A22900 is 7 is bit 1, the "0" of the packet 3 exposure pulse where the section number 10601 of the packet generation pattern A22900 is 7 is bit 2, the "0" of the packet 4 exposure pulse where the section number 10601 of the packet generation pattern A22900 is 7 is bit 3, the "1" of the packet 5 exposure pulse where the section number 10601 of the packet generation pattern A22900 is 7 is bit 4, and the "0" of the packet 6 exposure pulse where the section number 10601 of the packet generation pattern A22900 is 7 is bit 5, and is expressed as "10" in hexadecimal.

[0194] Furthermore, the control unit 10106 generates adjacent code A24401 by performing a logical OR operation on the independent code A24400 of two adjacent sections. For example, adjacent code A24423 at the part where section numbers 10601 of 24424 are adjacent to 24 and 25 is generated by performing a logical OR operation on the value "1" of bit 0 of the independent code whose section number 10601 of packet generation pattern A22900 is 24 and the value "0" of bit 0 of the independent code whose section number 10601 of packet generation pattern A22900 is 25. The logical OR operation result "1" of the bit 1 value "1" of the independent code with 24 and the bit 1 value "1" of the independent code with 25 in section number 10601 of packet generation pattern A22900 is set to bit 1, and the logical OR operation result of the bit 2 value "0" of the independent code with 24 in section number 10601 of packet generation pattern A22900 and the bit 2 value "0" of the independent code with 25 in section number 10601 of packet generation pattern A22900 is set to bit 1. The logical OR operation result of the bit 3 value "0" of the independent code of the section number 10601 of the packet generation pattern A22900 of 24 (the value "0") and the section number 10601 of the packet generation pattern A22900 of 25 (the value "0") is set to bit 3, and the logical OR operation result of the bit 3 value "0" of the independent code of the section number 10601 of the packet generation pattern A22900 of 24 (the value "0") and the section number 10601 of the packet generation pattern A22900 of 25 (the value "0") is set to bit 4. The result of the logical OR operation between the value "1" of bit 4 of the independent code whose interval number is 10601 and the value "1" of bit 4 of the independent code whose interval number is 25 in packet generation pattern A22900 is bit 4, and the result of the logical OR operation between the value "1" of bit 5 of the independent code whose interval number is 10601 and the value "1" of bit 5 of the independent code whose interval number is 24 in packet generation pattern A22900 is bit 5. These are considered to be a 6-bit binary number, and are expressed as "33" in hexadecimal.Here, the independent code A24400 is a code that indicates when the reflected light 10111 is returned in only one section number and the signal values ​​of packets 1 to 6 contain the reflected light 10111 as "1", and when the reflected light 10111 is not included as "0". The adjacent code A24401 is a code that indicates when the reflected light 10111 is returned in two adjacent section numbers and the signal values ​​of packets 1 to 6 contain the reflected light 10111 as "1", and when the reflected light 10111 is not included as "0". The imaging code 12120 for each section number is estimated based on the packet generation pattern A22900.

[0195] As described above, by initializing memory (LUT) 24380 using independent code A24400 and adjacent code A24401 as addresses and section number 10601 corresponding to independent code A24400 and adjacent code A24401 as data, and then reading and accessing memory (LUT) 24380 using imaging code 12120 and packet generation pattern identification signal 12170 as addresses, it is possible to convert imaging code 12120 into a section number corresponding to distance for an image captured with packet generation pattern A22900.

[0196] The table 24410 is data for initializing the memory (LUT) 24380. Because independent code A24420 is "10" in hexadecimal notation, the data at address "10" in hexadecimal notation in table 24410 is 7, which is section number 24421 of independent code A24420. Also, because adjacent code A24423 is "33" in hexadecimal notation, the data at address "33" in hexadecimal notation in table 24410 is set to 24.5, the average value of 24 and 25, which is section number 24424 of adjacent code A24423. This is because although it is clear that reflected light 10111 has been returned across section numbers 24 and 25 for section number 24424 of adjacent code 24423, the more detailed timing at which reflected light 10111 returned is unknown. Therefore, by assuming that reflected light 10111 has been returned midway between the two adjacent sections and using the average value of the two adjacent section numbers, it is possible to reduce the maximum error to half the section.

[0197] As shown in FIG. 45, the initial value of the memory (LUT) 24380 is generated from a packet generation pattern B23000 that controls the light source unit 10102 and the solid-state imaging unit 10105.

[0198] First, a method for calculating the exposure counts 24531 to 24536 for packets 1 to 6 of packet generation pattern B23000 will be described. The amount of background light reflection 10142 included in the signal values ​​of packets 1 to 6 is proportional to the number of times (exposure count) that the exposure pulses 10121 to 10126 of packets 1 to 6 are set to High level. For this reason, the control unit 10106 generates the exposure counts 24531 to 24536 for packets 1 to 6 by calculating, for each exposure pulse of packets 1 to 6, the number of sections in which the exposure pulse of packets 1 to 6 is "1" across all section numbers 10601.

[0199] Next, we will explain how to generate the initial values ​​of the memory (LUT) 24380. The control unit 10106 generates an independent code B24500 as a 6-bit binary number by regarding the packet 1 light emitting pulse of packet generation pattern B23000 as bit 0, the packet 2 light emitting pulse of packet generation pattern B23000 as bit 1, the packet 3 light emitting pulse of packet generation pattern B23000 as bit 2, the packet 4 light emitting pulse of packet generation pattern B23000 as bit 3, the packet 5 light emitting pulse of packet generation pattern B22900 as bit 4, and the packet 6 light emitting pulse of packet generation pattern B23000 as bit 5. For example, the independent code B24520, in which the section number 10601 of 24521 is 23, uses the "0" of the packet 1 light emitting pulse in which the section number 10601 of the packet generation pattern B23000 is 23 as bit 0, the "0" of the packet 2 light emitting pulse in which the section number 10601 of the packet generation pattern B23000 is 23 as bit 1, and the "0" of the packet 3 light emitting pulse in which the section number 10601 of the packet generation pattern B23000 is 23 as bit 2. In step 2, the "0" of the light emitting pulse in packet 4 when section number 10601 of packet generation pattern B23000 is 23 is bit 3, the "1" of the light emitting pulse in packet 5 when section number 10601 of packet generation pattern B23000 is 23 is bit 4, and the "0" of the light emitting pulse in packet 6 when section number 10601 of packet generation pattern B23000 is 23 is bit 5, which are regarded as a 6-bit binary number and are expressed as "10" in hexadecimal.

[0200] Furthermore, the control unit 10106 generates adjacent code B24501 by performing a bitwise OR operation on the independent code B24500 of two adjacent sections. For example, adjacent code A24423 at the portion where section numbers 10601 of 24524 are adjacent to 5 and 6 is generated by ORing the value "1" of bit 0 of the independent code whose section number 10601 of packet generation pattern B23000 is 5 with the value "0" of bit 0 of the independent code whose section number 10601 of packet generation pattern B23000 is 6 as bit 0, and the value "1" of bit 0 of the independent code whose section number 10601 of packet generation pattern B23000 is 5 as bit 0. The logical OR operation result "1" of the bit 1 value "1" of the independent code whose section number 10601 of packet generation pattern B23000 is 6 is set to bit 1, the logical OR operation result "0" of the bit 2 value "0" of the independent code whose section number 10601 of packet generation pattern B23000 is 5 is set to bit 2, and the logical OR operation result "0" of the bit 2 value "0" of the independent code whose section number 10601 of packet generation pattern B23000 is 6 is set to bit 3. The result of the logical OR operation of the value "0" of bit 3 of the independent code whose section number 10601 of packet generation pattern B23000 is 5 and the value "0" of bit 3 of the independent code whose section number 10601 of packet generation pattern B23000 is 6 is bit 3, the result of the logical OR operation of the value "0" of bit 4 of the independent code whose section number 10601 of packet generation pattern B23000 is 5 and the value "1" of bit 4 of the independent code whose section number 10601 of packet generation pattern B23000 is 6 is bit 4, and the result of the logical OR operation of the value "1" of bit 5 of the independent code whose section number 10601 of packet generation pattern B23000 is 5 and the value "1" of bit 5 of the independent code whose section number 10601 of packet generation pattern B23000 is 6 is bit 5. These 6-bit binary numbers are regarded as "33" in hexadecimal notation. Here, the independent code B24500 is a code that indicates when the reflected light 10111 is returned in only one section number and the signal values ​​of packets 1 to 6 contain the reflected light 10111 as "1", and when the reflected light 10111 is not included as "0". The adjacent code B24501 is a code that indicates when the reflected light 10111 is returned in two adjacent section numbers and the signal values ​​of packets 1 to 6 contain the reflected light 10111 as "1", and when the reflected light 10111 is not included as "0". The imaging code 12120 for each section number is estimated based on the packet generation pattern B23000.

[0201] As described above, by initializing memory (LUT) 24380 using independent code B24500 and adjacent code B24501 as addresses and section number 10601 corresponding to independent code B24500 and adjacent code B24501 as data, and then performing read access to memory (LUT) 24380 using imaging code 12120 as an address, it is possible to convert imaging code 12120 into a section number corresponding to distance for an image captured using packet generation pattern B23000.

[0202] Table 24510 is a data set for initializing memory (LUT) 24380. Because independent code B24520 is "10" in hexadecimal notation, the data at address "10" in hexadecimal notation in table 24510 is 7, which is obtained by subtracting 23, which is section number 24521 of independent code B24520, from 30, which is section number 10601 in which the exposure pulse is 1 in packet generation pattern B23000. Also, because adjacent code B24523 is "33" in hexadecimal notation, the data at address "33" in hexadecimal notation in table 24510 is 24.5, which is obtained by subtracting the average value 5.5 of 5 and 6, which is section number 24524 of adjacent code B24523, from 30, which is section number 10601 in which the exposure pulse is 1 in packet generation pattern B23000. This is because, although it is clear that reflected light 10111 is returned in section number 24524 of adjacent code B24523 across section numbers 5 and 6, the more detailed timing at which reflected light 10111 is returned is not known. Therefore, by assuming that reflected light 10111 is returned midway between the two adjacent sections and using the average value of the two adjacent section numbers, it is possible to reduce the maximum error to half the section.

[0203] Here, we will explain how to generate packet generation pattern A22900 and packet generation pattern B23000 to be given to the control unit 10106. In order to calculate the section number using the imaging code 12120 generated from the signal values ​​of packets 1 to 6 above, there must be a one-to-one correspondence between the imaging code 12120 and the section number.

[0204] Therefore, the packet generation pattern A22900 is determined so that the values ​​of the independent code A24400 and the adjacent code A24401 do not overlap, and there is a one-to-one correspondence between the imaging code 12120 and the section number. Similarly, the packet generation pattern B23000 is determined so that the values ​​of the independent code B24500 and the adjacent code B24501 do not overlap, and there is a one-to-one correspondence between the imaging code 12120 and the section number. Note that, because the packet generation pattern A22900 and the packet generation pattern B23000 are switched on a frame-by-frame basis, the independent code A24400 and the adjacent code A24401, and the independent code B24500 and , and adjacent code B24501 may overlap.

[0205] Furthermore, packet generation pattern A22900 and packet generation pattern B23000 are determined so that independent code A24400, adjacent code A24401, independent code B24500, and adjacent code B24501 do not have a value of "00" in hexadecimal notation. If reflected light 10111 returns at the timing when the value of independent code A24400, adjacent code A24401, independent code B24500, or adjacent code B24501 is "00," the exposure pulses 10121 to 10126 of packets 1 to 6 are low, and therefore the signal values ​​of packets 1 to 6 do not include the reflected light 10111 component. Similarly, if the target object 10101 is not present within the distance measurement range of section numbers 0 to 30, the signal values ​​of packets 1 to 6 also do not include the reflected light 10111 component. For this reason, it is impossible to distinguish between these two conditions from the signal values ​​of packets 1 to 6, so packet generation pattern A22900 and packet generation pattern B23000 are generated so that independent code A24400, adjacent code A24401, independent code B24500, and adjacent code B24501 do not have the value "00" in hexadecimal notation. Also, in preparation for the case where imaging code 12120 matches "00," which does not exist in independent code A24400, adjacent code A24401, independent code B24500, and adjacent code B24501, by setting the write data (section number) of table 24410 or table 24510 to a negative value of -1, it is possible to determine that the section number has not been calculated correctly.

[0206] Next, the reason why the table 24410 generated from the packet generation pattern A22900 and the table 24510 generated from the packet generation pattern B23000 are the same will be explained. The packet generation pattern A22900 and the packet generation pattern B23000 are created so that the exposure pulse whose section number 10601 is 0 in the packet generation pattern A22900 matches the light emission pulse whose section number 10601 is 30 in the packet generation pattern B23000 in all packets. Furthermore, the packet generation pattern A22900 is created so that the exposure pulse whose section number 10601 is 1 matches the light emission pulse whose section number 10601 is 29 in the packet generation pattern B23000 in all packets. In this way, the section numbers 10601 of the exposure pulse of the packet generation pattern A22900 and the light emission pulse of the packet generation pattern B23000 are reversed. As a result, the independent code A24400 and the independent code B24500 have a relationship in which the section number 10601 is inverted. Similarly, the adjacent code A24401 and the adjacent code B24501 have a relationship in which the section number 10601 is inverted. The write data (section number) of table 24410 uses the section number of packet generation pattern A22900 as is, and the write data (section number) of table 24510 uses the section number of packet generation pattern B23000 subtracted from the largest section number in which the exposure pulse of packet generation pattern B23000 is 1, thereby restoring the relationship in which the section number 10601 is inverted to its original state, and it becomes possible to match the table 24410 generated from packet generation pattern A22900 with the table 24510 generated from packet generation pattern B23000. This eliminates the need to distinguish between the charges accumulated in FDA10211 to 10216 in packet generation pattern A22900 and the charges accumulated in FDA10211 to 10216 in packet generation pattern B23000, eliminating the need to read out the charges accumulated in FDA10211 to 10216 for each packet generation pattern, making it possible to switch between packet generation pattern A22900 and packet generation pattern B23000 in one frame.

[0207] 46 is a diagram showing a method for calculating the exposure numbers 24301 to 24306 of packets 1 to 6. The exposure numbers 24431 to 24436 of packets 1 to 6 of unit drive patterns 10431 to 10436 of packets 1 to 6 of packet generation pattern A22900 and the repetition number 1 of unit drive patterns A10431 to 10436 of packets 1 to 6 are calculated. 100, and multiplying this by the exposure numbers 24531 to 24536 of packets 1 to 6 of unit drive patterns 10451 to 10456 of packets 1 to 6 of packet generation pattern B23000 and the repetition number 200 of unit drive patterns B10451 to 10456 of packets 1 to 6, and adding these together to generate the exposure numbers 24301 to 24306 of packets 1 to 6. This makes it possible to correct the difference in the number of exposures for each packet of background light reflected light 10142 included in the solid-state imaging unit output signal 10130.

[0208] 47 is a timing chart of the distance calculation unit 22508 according to embodiment 2. Regarding the notation in the figure, the notations "P1(11)Sig" to "P6(11)Sig" indicate the signal values ​​of packets 1 to 6 of pixel 10200 at pixel address 11 in the following description.

[0209] The notations “P1(11)CT” to “P6(11)CT” indicate the number of exposures of packets 1 to 6 of pixel 10200 at pixel address 11 in the following description, and correspond to the output of the selection circuit 12107.

[0210] The notation "P1(11)Sig / CT1" indicates (packet 1 signal value of solid-state imaging unit output signal 10130) / (packet 1 exposure count) of pixel 10200 at pixel address 11, and corresponds to packet 1 synchronized B signal 12121.

[0211] The notation "min(11)" indicates the minimum value among packet 1 synchronized B signals 12121 to 12126 of pixel 10200 at pixel address 11, and corresponds to synchronized B minimum signal 12127.

[0212] The notation "min(11) x CT1" indicates (synchronized B minimum signal 12127) x (packet 1 exposure count) of pixel 10200 at pixel address 11, and corresponds to packet 1 multiplication signal 12131.

[0213] The notation “P1(11)Sig-mul” indicates (packet 1 synchronized A signal 12141)-(packet 1 multiplication signal 12131) of pixel 10200 at pixel address 11, and corresponds to packet 1 subtraction signal 12151.

[0214] The notation “mx(11)” indicates the maximum value among the packet 1 subtraction signal 12151 to the packet 6 subtraction signal 12156 of the pixel 10200 at pixel address 11, and corresponds to the maximum value signal 12157.

[0215] The notation "mn(11)" indicates the minimum value among the packet 1 subtraction signal 12151 to the packet 6 subtraction signal 12156 of the pixel 10200 at pixel address 11, and corresponds to the minimum value signal 12158.

[0216] The notation “th(11)” indicates (mx(11)+mn(11)) / 2, that is, the average of the maximum value signal 12157 and the minimum value signal 12158 of pixel 10200 at pixel address 11, and corresponds to the threshold signal 12160.

[0217] The notations "P1(11)Bin" to "P6(11)Bin" indicate the codes of packets 1 to 6 of pixel 10200 at pixel address 11 in the following description, and correspond to the imaging code 12120 of pixel 10200 at pixel address 11.

[0218] The notation "Nd(11)" corresponds to the section number signal 10131 of pixel 10200 at pixel address 11. Here, "Nd(11)" and the like are expressed as integers.

[0219] 47, at timing 12400 before a valid signal value is output from the solid-state imaging unit output signal 10130, the control unit 10106 sets values ​​in the exposure counts 24301 to 24306 of packets 1 to 6 and in the memory (LUT) 24380 via the control bus. Note that the packet 1 exposure count 24310 is 11, the packet 2 exposure count 24302 is 11, the packet 3 exposure count 24303 is 12, the packet 4 exposure count 24304 is 11, the packet 5 exposure count 24305 is 11, and the packet 6 exposure count 24306 is 14, and the memory (LUT) 24380 writes data in the table 24410 or the table 24510. At timing 12401, the signal values ​​of packets 1 to 6 of pixel address 11 are sequentially sent from the solid-state imaging unit output signal 10130. The transmitted signal values ​​are sent sequentially to the synchronization unit (A) 12110, and at the same time, are divided by the exposure numbers 24301 to 24306 for packets 1 to 6, and sent to the synchronization unit (B) 12109. At timing 12402, the imaging code 12120 is determined using the synchronization unit (A) output signals 12141 to 12146, the synchronization unit (B) output signals 12121 to 12126, and the exposure numbers 24301 to 24306 for packets 1 to 6. Using the imaging code 12120 as an address, read access is performed to the memory (LUT) 24380, and at timing 12403, a section number signal 10131 corresponding to the distance of the pixel address 11 is output. By performing this operation for all pixels 10200 arranged two-dimensionally, all two-dimensional section numbers are output.

[0220] Here, a method of switching between packet generation pattern A22900 shown in FIG. 29 and packet generation pattern B23000 shown in FIG. 30 will be described.

[0221] As shown in FIGS. 26 and 29, in the packet generation pattern A22900, the unit drive patterns A10431 to A10436 of packets 1 to 6 are executed 100 times x 12 = 1200 times per frame. Since one packet one-unit drive pattern A10431 performs 11 exposures, the packet one-unit drive pattern A10431 performs 11 times x 1200 = 13200 exposures per frame. Since one packet two-unit drive pattern A10432 performs 11 exposures, the packet two-unit drive pattern A10432 performs 11 times x 1200 = 13200 exposures per frame. Since one packet three-unit drive pattern A10433 performs 12 exposures, the packet three-unit drive pattern A10433 performs 12 times x 1200 = 14400 exposures per frame. One packet 4-unit drive pattern A10434 performs 11 exposures, so the packet 4-unit drive pattern A10434 performs 11 times x 1200 times = 13,200 exposures per frame. One packet 5-unit drive pattern A10435 performs 11 exposures, so the packet 5-unit drive pattern A10435 performs 11 times x 1200 times = 13,200 exposures per frame. One packet 6-unit drive pattern A10436 performs 14 exposures, so the packet 6-unit drive pattern A10436 performs 14 times x 1200 times = 16,800 exposures per frame.

[0222] As shown in FIGS. 26 and 30, the packet generation pattern B23000 performs one exposure for one packet unit drive pattern B10451. The packet unit drive pattern B10451 is executed 200 times x 12 = 2400 times per frame, so the packet unit drive pattern B10451 performs 1 x 2400 = 2400 exposures per frame. Similarly, the unit drive patterns B of packets 2 to 6 also perform 2400 exposures per frame, so a total of 2400 x 6 packets = 14400 exposures per frame. Therefore, a total of 13200 + 13200 + 14400 + 13200 + 13200 + 16800 + 14400 = 98400 exposures per frame.

[0223] Therefore, packet generation pattern B23000 is more efficient than packet generation pattern A22 Since the number of exposures is less than that of 900, by using packet generation pattern B23000, the influence of the background light reflection light 10142 can be reduced, and the SN ratio of the signal value can be improved.

[0224] On the other hand, the packet generation pattern A22900 emits light once for each packet-unit drive pattern A10431, as shown in Figures 26 and 29. The packet-unit drive pattern A10431 is executed 100 times x 12 = 1200 times per frame, so the packet-unit drive pattern A10431 emits light 1 time x 1200 = 1200 times per frame. Similarly, the unit drive patterns A10432 to A10436 of packets 2 to 6 also emit light 1200 times per frame, so a total of 1200 times x 6 packets = 7200 times of light emission per frame.

[0225] As shown in FIGS. 26 and 30, in the packet generation pattern B23000, the unit drive patterns B10451 to 10456 of packets 1 to 6 are executed 200 times x 12 = 2400 times per frame. Since one packet-unit drive pattern B10451 emits light 11 times, the packet-unit drive pattern B10451 emits light 11 times x 2400 times = 26400 times per frame. Since one packet-unit drive pattern B10452 emits light 11 times, the packet-unit drive pattern B10452 emits light 11 times x 2400 times = 26400 times per frame. Since one packet-unit drive pattern B10453 emits light 12 times, the packet-unit drive pattern B10453 emits light 12 times x 2400 times = 28800 times per frame. One 4-packet unit drive pattern B10454 emits light 11 times, so the 4-packet unit drive pattern B10454 emits light 11 times x 2400 times = 26,400 times per frame. One 5-packet unit drive pattern B10455 emits light 11 times, so the 5-packet unit drive pattern B10455 emits light 11 times x 2400 times = 26,400 times per frame. One 6-packet unit drive pattern B10456 emits light 14 times, so the 6-packet unit drive pattern B10456 emits light 14 times x 2400 times = 33,600 times per frame. Therefore, in total, light is emitted 7200 times + 26400 times + 26400 times + 28800 times + 26400 times + 26400 times + 33600 times = 175200 times in one frame.

[0226] Therefore, because packet generation pattern A22900 has fewer light emissions than packet generation pattern B23000, it is possible to reduce power consumption by increasing the number of repetitions of packet generation pattern A22900 and decreasing the number of repetitions of packet generation pattern B23000. Note that power consumption may be measured by another means, such as an ammeter, instead of the number of light emissions.

[0227] As described above, when the amount of background light reflection 10142 is small, it is possible to reduce power consumption by increasing the proportion of packet generation pattern A22900 used and decreasing the proportion of packet generation pattern B23000 used. Also, when the amount of background light reflection 10142 is large, it is possible to ensure the SN (ranging accuracy) of the signal value by increasing the proportion of packet generation pattern B23000 used and decreasing the proportion of packet generation pattern A22900 used.

[0228] According to this, the packet generation pattern A22900 and the packet generation pattern B23000 are switched within a frame depending on the background light reflection 10142 and the power consumption, and the ratio of using the packet generation pattern A22900 and the packet generation pattern B23000 is controlled, thereby making it possible to achieve an optimum of the power consumption and the SN (ranging accuracy) of the signal value. do.

[0229] As described above, in the distance measuring device according to the second embodiment, the control unit switches between a plurality of first packet generation codes and a plurality of second packet generation codes within one frame.

[0230] This makes it possible to optimize the suppression of deterioration in accuracy in identifying distance intervals and the suppression of power consumption, and also makes it possible to perform optimization at a finer granularity.

[0231] Here, each of the first packet generating codes is the same as any of the second packet generating codes obtained by time-inverting a plurality of unit intervals.

[0232] This makes it possible to switch between multiple first packet generation codes and multiple second packet generation codes within one frame. Also, the first independent code and the second independent code in the same unit interval can have the same bit pattern, reducing the processing load for calculating the distance.

[0233] Here, the first independent code and the second independent code corresponding to two unit intervals in a positional relationship obtained by reversing the arrangement order of the plurality of unit intervals may have the same bit pattern.

[0234] This allows a part of the processing in the distance calculation unit to be further shared in the processing for identifying the distance interval corresponding to the unit interval of one of the first independent code and the second independent code.

[0235] In the first and second embodiments, an example of a configuration in which one pixel 10200 has n (n is 6) signal charge accumulation units (FDAs) as shown in Fig. 2 has been shown. However, the pixel 10200 may have a configuration in which it has one signal charge accumulation unit. In this case, n types of packets can be obtained by repeating the packet accumulation operation and the readout operation thereof n times. [Industrial Applicability]

[0236] The distance measuring device according to the present disclosure can realize three-dimensional measurement of a measurement target at a long distance without depending on the surrounding environment, and is therefore useful for three-dimensional measurement of people, buildings, etc., for example. [Explanation of symbols]

[0237] 10102 Light source section 10105 Solid-state imaging unit 10106 Control unit 10107 Pulse generation unit 10108, 22508 Distance calculation section 10120 Light emitting pulse 10121 Packet 1 exposure pulse 10122 Packet 2 exposure pulse 10123 Packet 3 exposure pulses 10124 packets of 4 exposure pulses 10125 packets 5 exposure pulses 10126 packet 6 exposure pulses 10130 Solid-state imaging unit output signal 10131 Section number signal 10201 Photoelectric conversion pixel 10211, 10212, 10213, 10214, 10215, 10216 FDA (signal charge storage unit) 10231, 10232, 10233, 10234, 10235, 10236 Output selection Select transistor (signal output section) 10600, 22900 Packet generation pattern A 10700, 23000 Packet generation pattern B 12300, 24400 Independent code A 12400, 24500 Independent code B 12301, 24401 Adjacent code A 12401, 24501 Adjacent code B 12220 imaging code 10400 Frame drive pattern A 10401 Frame drive pattern B 22600 Frame drive pattern C

Claims

1. a pulse generating unit that generates a light emission pulse that indicates the timing of light irradiation and an exposure pulse that indicates the timing of exposure to reflected light from a subject at a timing linked to the light emission pulse; a solid-state imaging unit that generates a packet holding a signal value of a pixel in accordance with the exposure pulse; a control unit that controls the pulse generation unit in accordance with a plurality of first packet generation codes that generate two or more exposure pulses in a plurality of unit sections corresponding to a plurality of distance sections obtained by dividing a distance measurement range, or a plurality of second packet generation codes that generate two or more light emission pulses in the plurality of unit sections, which are selected in accordance with a predetermined condition; a light source unit that irradiates light in accordance with the light emission pulse; a distance calculation unit that calculates a distance based on the plurality of packets output from the solid-state imaging unit, The control unit switches between a drive that controls the pulse generation unit in accordance with the plurality of first packet generation codes and a drive that controls the pulse generation unit in accordance with the plurality of second packet generation codes. Ranging device.

2. the number of the plurality of first packet generation codes is n1 (n1 is an integer equal to or greater than 4); the number of the plurality of second packet generation codes is n2 (n2 is an integer equal to or greater than 4); The control unit generating, as a first independent code, a binary number of n1 bits indicating the presence or absence of an exposure pulse for each unit section in the plurality of first packet generating codes; generating, as a second independent code, a binary number of n2 bits indicating the presence or absence of a light emitting pulse for each unit section in the plurality of second packet generating codes; The distance calculation unit determining an n1-bit binary number as a first imaging code by binarizing signal values ​​of n1 types of packets generated based on the plurality of first packet generation codes, comparing the first independent code with the first imaging code, and calculating a distance corresponding to a matching unit section; The signal values ​​of n2 types of packets generated based on the plurality of second packet generation codes are binarized to determine an n2-bit binary number as a second imaging code, and the second independent code and the second imaging code are compared to calculate a distance corresponding to a matching unit section.

2. The distance measuring device according to claim 1.

3. The n1 is equal to the n2 3. The distance measuring device according to claim 2.

4. Each of the first independent codes has the same bit pattern as any one of the second independent codes.

4. The distance measuring device according to claim 3.

5. The control unit generating a first adjacent code of n1 bits by performing a logical sum or a logical product of each bit of the two first independent codes corresponding to the two adjacent unit intervals; generating a second adjacent code of n2 bits by performing a logical sum or a logical product of each bit of the two second independent codes corresponding to the two adjacent unit intervals; The distance calculation unit comparing the first adjacent code with the first imaging code, and if they match, calculating an intermediate distance between the two corresponding unit sections; The second adjacent code is compared with the second imaging code, and if they match, the intermediate distance between the two corresponding unit sections is calculated.

5. A distance measuring device according to claim 2.

6. each of the plurality of first packet generation codes indicates that the light emitting pulse is to be generated once; Each of the plurality of second packet generation codes indicates that the exposure pulse is to be generated once.

6. A distance measuring device according to claim 1.

7. each of the plurality of first packet generation codes indicates that light should be emitted in a first unit section of the plurality of unit sections, and indicates whether exposure should be performed for each of the plurality of unit sections; The second packet generation codes indicate whether or not light should be emitted for each of the unit sections, and indicate that light should be emitted in the last unit section of the unit sections.

7. A distance measuring device according to claim 1.

8. The control unit calculates a background light amount based on packets generated by the solid-state imaging unit, and switches between a drive that controls the pulse generation unit in accordance with the plurality of first packet generation codes and a drive that controls the pulse generation unit in accordance with the plurality of second packet generation codes in accordance with the calculated background light amount. The distance measuring device according to any one of claims 1 to 7.

9. The control unit switches between a drive for controlling the pulse generation unit in accordance with the plurality of first packet generation codes and a drive for controlling the pulse generation unit in accordance with the plurality of second packet generation codes, depending on power consumption in the distance measuring device.

9. A distance measuring device according to claim 1.

10. The control unit switches between a drive that controls the pulse generation unit in accordance with the plurality of first packet generation codes and a drive that controls the pulse generation unit in accordance with the plurality of second packet generation codes for each frame corresponding to the entire distance measurement range.

10. A distance measuring device according to claim 1.

11. The control unit switches between a drive that controls the pulse generation unit in accordance with the plurality of first packet generation codes and a drive that controls the pulse generation unit in accordance with the plurality of second packet generation codes within one frame corresponding to the entire distance measurement range.

10. A distance measuring device according to claim 1.

12. Each of the plurality of first packet generation codes is a bit string having a first pattern in which bits indicating timings for generating the exposure pulse for each of the plurality of unit sections are arranged in time, each of the plurality of second packet generation codes is a bit string having a second pattern in which bits indicating timings for generating the light emission pulse for each of the plurality of unit sections are arranged in time, the first pattern of each of the plurality of first packet generation codes matches an inverted second pattern of any of the plurality of second packet generation codes; The distance measuring device according to any one of claims 1 to 11.

13. A distance measuring method for a distance measuring device including a light source unit that irradiates light in accordance with a light emission pulse that indicates a light irradiation timing, a solid-state imaging unit that generates packets that hold pixel signal values ​​in accordance with an exposure pulse that indicates an exposure timing of reflected light from a subject at a timing linked to the light emission pulse, and a distance calculation unit that calculates a distance based on a plurality of packets output from the solid-state imaging unit, obtaining a plurality of first packet generation codes for generating two or more exposure pulses in a plurality of unit sections corresponding to a plurality of distance sections obtained by dividing the distance measurement range, and a plurality of second packet generation codes for generating two or more light emission pulses in the plurality of unit sections; A distance measurement operation is performed while switching between driving according to the plurality of first packet generation codes and driving according to the plurality of second packet generation codes in accordance with a predetermined condition. Distance measurement method.

Citation Information

Patent Citations

  • Range gating code super-resolution three-dimensional imaging method

    CN103438863A

  • Speed control device for DC motor

    JP1989055088A

  • Three-dimensional image detector

    JP2001028766A

  • Range image data generating device for vehicle

    JP2010066221A

  • Distance measuring device, distance measuring method, and program

    JP2014119414A