Distance measurement device, distance measurement method, and program

The distance measuring device uses a single camera with a state setting mechanism to alternate light paths for compact design and precise distance measurement, addressing the space constraints of stereo camera systems.

WO2026115869A1PCT designated stage Publication Date: 2026-06-04JAPAN DISPLAY INC

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
JAPAN DISPLAY INC
Filing Date
2025-09-12
Publication Date
2026-06-04

AI Technical Summary

Technical Problem

Conventional distance measurement techniques using stereo cameras require two separate cameras, occupying significant space and limiting their applicability in space-constrained environments.

Method used

A distance measuring device that uses a single camera with a state setting mechanism to alternate between two distinct light passing regions, capturing multiple images with different light paths to calculate depth, allowing for compact design and efficient space utilization.

Benefits of technology

Enables accurate distance measurement with reduced device size by leveraging a single camera and alternating light paths, improving spatial efficiency and measurement precision.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure JP2025032254_04062026_PF_FP_ABST
    Figure JP2025032254_04062026_PF_FP_ABST
Patent Text Reader

Abstract

The present invention facilitates reduction of the space occupied by a distance measurement device. A distance measurement device (1) comprises: an imaging unit (21) that images an object to be imaged; a state setting unit (22) that is disposed between the object to be imaged and the imaging unit (21), and that is capable of setting a first state in which light coming from the object to be imaged and passing through a first passage region is incident on the imaging means, and a second state in which light coming from the object to be imaged and passing through a second passage region different from the first passage region is incident on the imaging means; an imaging control unit (101) that controls the imaging unit (21) and the state setting unit (22) so as to acquire a first image in which the object to be imaged appears in the first state and a second image in which the object to be imaged appears in the second state; and a depth calculation unit (102) that searches for a second image region, which is a region of the second image corresponding to a first image region, which is at least one region of the first image, and calculates the depth of what appears in the first image region or the second image region on the basis of the position of the first image region and the position of the second image region.
Need to check novelty before this filing date? Find Prior Art

Description

Distance Measuring Device, Distance Measuring Method, and Program

[0001] The present disclosure relates to a distance measuring device, a distance measuring method, and a program.

[0002] Conventionally, a technique for performing distance measurement by performing stereo matching processing on a pair of images captured by a stereo camera has been known (see, for example, Patent Document 1).

[0003] Japanese Patent Application Laid-Open No. 2011-22072

[0004] However, in the conventional technique, since it is necessary to arrange two cameras so as to be separated from each other to configure a stereo camera, it has been a factor that takes up space.

[0005] The present disclosure has been made in view of the above problems, and an object thereof is to provide a distance measuring device, a distance measuring method, and a program that can easily save space.

[0006] (1) The distance measuring device according to the present disclosure includes imaging means for imaging an imaging target, and is disposed between the imaging target and the imaging means, and among the light from the imaging target, the light passing through the first passing region is incident on the imaging means. State setting means capable of setting a first state and a second state in which the light passing through a second passing region different from the first passing region is incident on the imaging means; and the imaging target in the first state. Imaging control means for controlling the imaging means and the state setting means so as to acquire a first image in which the imaging target is imaged and a second image in which the imaging target is imaged in the second state; and at least one region of the first image. While searching for a second image region that is a region of the second image corresponding to the first image region, based on the position of the first image region and the position of the second image region, the object imaged in the first image region or the second image region An in-depth calculation means for calculating the depth.

[0007] (2) In the distance measuring device of (1), the shooting control means may control the state setting means to set to the first state and control the shooting means to take a picture to acquire the first image, and after acquiring the first image, control the state setting means to set to the second state and control the shooting means again to take a picture to acquire the second image.

[0008] (3) In the distance measuring device of (1) or (2), the depth calculation means calculates the depth based on the difference between the position of the first image region and the position of the second image region in a predetermined direction, and the predetermined direction may indicate a direction based on the position of the first passing region and the position of the second passing region.

[0009] (4) In any of the distance measuring devices of (1) to (3), the second passing region does not have to overlap with the first passing region.

[0010] (5) In any of the distance measuring devices of (1) to (3), the second passage area may be separated from the first passage area.

[0011] (6) In any of the distance measuring devices of (3) to (5), the width of the first passage region in the predetermined direction may be narrower than the width of the first passage region in the direction perpendicular to the predetermined direction, and the width of the second passage region in the predetermined direction may be narrower than the width of the second passage region in the direction perpendicular to the predetermined direction.

[0012] (7) In any of the distance measuring devices of (3) to (6), the second passing region indicates a region obtained by reversing or translating the first passing region, and the predetermined direction may indicate the direction of reversal or the direction of translation.

[0013] (8) In the distance measuring devices of (1) to (7), the state setting means may include a liquid crystal, and the first state or the second state may be set based on whether or not a voltage is applied to the liquid crystal.

[0014] (9) The distance measuring method according to the present disclosure includes: a shooting means for photographing a target object; a state setting means disposed between the target object and the shooting means, which can set a first state in which light from the target object that passes through a first passing region is incident on the shooting means, and a second state in which light that passes through a second passing region different from the first passing region is incident on the shooting means; a shooting control step for acquiring a first image in which the target object is photographed in the first state and a second image in which the target object is photographed in the second state; and a depth calculation step for searching for a second image region which is a region of the second image that corresponds to a first image region which is at least one region of the first image, and calculating the depth of what is photographed in the first image region or the second image region based on the position of the first image region and the position of the second image region.

[0015] (10) The program relating to the present disclosure causes a computer to function as: an imaging means for imaging a subject to be imaged; a state setting means disposed between the subject to be imaged and the imaging means, which can set a first state in which light from the subject to be imaged that passes through a first passing region is incident on the imaging means, and a second state in which light passing through a second passing region different from the first passing region is incident on the imaging means; an imaging control means for acquiring a first image in which the subject to be imaged is depicted in the first state and a second image in which the subject to be imaged is depicted in the second state; and a depth calculation means for searching for a second image region which is a region of the second image that corresponds to a first image region which is at least one region of the first image, and calculating the depth of what is depicted in the first image region or the second image region based on the position of the first image region and the position of the second image region. The program may be stored in a computer-readable information storage medium such as a magneto-optical disk or semiconductor memory.

[0016] According to this disclosure, it is possible to easily reduce the size of the distance measuring device.

[0017] This figure shows an example of a situation in which the distance measuring device according to the first embodiment is being used. This figure shows an example of a hardware configuration for realizing the distance measuring device according to the first embodiment. This figure shows an example of the settings of the state setting means according to the first embodiment. This figure shows an example of a pass-through region according to the first embodiment. This figure explains the direction of reversal. This is a block diagram showing an example of a function realized in the distance measuring device according to the first embodiment. This figure shows an example of an image acquired by the shooting control unit according to the first embodiment. This figure shows an example of the position of the object to be photographed and the path of light from the object to be photographed. This figure shows an example of a pass-through region according to the second embodiment. This figure shows an example of an image acquired by the shooting control unit according to the second embodiment. This figure shows an example of a pass-through region according to the third embodiment. This figure shows an example of an image acquired by the shooting control unit according to the third embodiment.

[0018] The distance measuring device, distance measuring method, and program related to this disclosure will be described in detail below with reference to the drawings.

[0019] In addition, for the purpose of clarifying the explanation, the drawings may schematically represent the width, thickness, shape, etc. of each part, rather than the actual embodiment. However, these are merely examples and do not limit the interpretation of this disclosure. In this specification and each drawing, elements having the same function as those described in previously shown drawings are denoted by the same reference numerals, and redundant explanations may be omitted.

[0020] [1. First Embodiment] Firstly, a first embodiment, which is an example of an embodiment of the distance measuring device according to the present disclosure, will be described.

[0021] [1-1. Overview of the Distance Measuring Device According to the First Embodiment] Figure 1 shows an example of a situation in which the distance measuring device according to the first embodiment is being used. The distance measuring device 1 is a device that photographs and measures the distance of a subject 2. The subject 2 may be a stationary object, or a moving object such as a moving vehicle or person. Furthermore, the subject 2 may be a specific object of interest, or it may be a landscape or the like without any specific object of interest.

[0022] From this point forward, for the sake of clarity, the mutually orthogonal directions X, Y, and Z shown in Figure 1 will be introduced. Direction X will be the direction of photography.

[0023] [1-2. Hardware Configuration for Realizing the Distance Measuring Device According to the First Embodiment] Figure 2 is a diagram showing an example of a hardware configuration for realizing the distance measuring device according to the first embodiment. As shown in Figure 2, the distance measuring device 1 includes a control unit 10 and a camera module 20. The control unit 10 includes a processing unit 11, a storage unit 12, a display unit 13, and an input unit 14. The camera module 20 also includes an imaging unit 21 and a state setting unit 22. Details will be described below.

[0024] [Processing Unit] The processing unit 11 includes, for example, a CPU or GPU, and operates according to the program stored in the memory unit 12. An FPGA may be used as the processing unit 11.

[0025] [Storage Unit] The storage unit 12 includes a main memory and an auxiliary storage unit, and stores programs executed by the processing unit 11 and various data to be processed. For example, the main memory is a volatile memory such as RAM, and the auxiliary storage unit is a non-volatile memory such as ROM, EEPROM, flash memory, or hard disk.

[0026] [Display Unit] The display unit 13 is, for example, a liquid crystal display or an organic EL display, and displays data stored in the storage unit 12 and the processing results of the processing unit 11.

[0027] [Input Unit] The input unit 14 is a user interface such as a keyboard, mouse, or touch panel, which receives user input and inputs a signal indicating the content of that input to the processing unit 11.

[0028] [Shooting Unit] The shooting unit 21 photographs the object to be photographed 2. The shooting unit 21 may be a monocular camera having one optical system. As shown in Figure 2, the shooting unit 21 includes a lens 23 and an image sensor 24. The shooting unit 21 is not limited to the configuration shown in Figure 2, and may have various configurations that are commonly mounted on cameras to realize the imaging function. For example, the shooting unit 21 may have a shutter or the like to adjust the amount of exposure to the image sensor 24.

[0029] The lens 23 collects the light 3 arriving from the object to be photographed 2 and forms an image on the light-receiving surface of the image sensor 24. The lens 23 can be one used in a general camera and may be configured to allow adjustment of its focal length. In Figure 2, one lens is schematically shown, but it may be one optical system including a lens group consisting of multiple lenses.

[0030] The image sensor 24 is an electronic component that performs photoelectric conversion. It converts the brightness of the image formed on the light-receiving surface into an amount of electric charge, and acquires the resulting photoelectrically converted electrical signal to obtain the captured image. The image sensor 24 can be a CMOS (complementary metal-oxide-semiconductor) sensor or a CCD (charge-coupled device) commonly used in cameras. The image detected by the image sensor 24 may be a color image or a monochrome image.

[0031] [State Setting Unit] The state setting unit 22 is positioned between the object to be photographed 2 and the imaging unit 21, and causes the light 3 from the object to be photographed 2 that passes through the passing region 4 to be incident on the imaging unit 21. As shown in Figure 2, the state setting unit 22 includes a light limiting unit 25. In each embodiment, the state setting unit 22 is described as being positioned between the object to be photographed 2 and the imaging unit 21, but the state setting unit 22 may also be positioned within the imaging unit 21. Specifically, it may be positioned between the lens 23 and the image sensor 24, or within a group of lenses.

[0032] The light limiting unit 25 allows light 3 to pass through the passing region 4, while restricting the passage of light 3 in other regions. The light limiting unit 25 can switch between multiple patterns with different positions, shapes, sizes, etc., of the passing region 4.

[0033] The state setting unit 22 can set multiple states based on each of the multiple patterns of the light limiting unit 25's passage region 4. Details are described below.

[0034] Figure 3 is a diagram showing an example of the settings of the state setting means according to the first embodiment. As shown in Figure 3, the state setting unit 22 can set a first state 5a in which light 3 from the object to be photographed 2 that passes through a first passage region 4a is incident on the photographing unit 21, and a second state 5b in which light 3 that passes through a second passage region 4b different from the first passage region 4a is incident on the photographing unit 21.

[0035] As shown in Figure 3, for example, the first passing region 4a and the second passing region 4b are in different positions. Therefore, the path of the light 3 to reach the light-receiving surface of the image sensor 24 is different in the first state 5a and the second state 5b. Furthermore, as shown in Figure 3, if the focal point 6 is far from the light-receiving surface of the image sensor and is not in focus, the arrival position 7 of the light 3 on the light-receiving surface of the image sensor 24 is different in the first state 5a and the second state 5b. The dashed line passing through arrival position 7 in Figure 3 conveniently represents the path of the centroid of the light 3. The centroid of the light 3 is the position corresponding to the centroid of the cross-section perpendicular to the direction of photography of the light beam of light 3. In the case of not being in focus, as in the example in Figure 3, the image of the object being photographed 2 based on the light 3 reaching the light-receiving surface of the image sensor 24 will be an image with blurring spreading around arrival position 7.

[0036] Figure 4 shows an example of a pass-through region according to the first embodiment. In Figure 4, for the sake of explanation, a schematic diagram showing the first pass-through region 4a and a schematic diagram showing the second pass-through region 4b are placed side by side. As shown in Figure 4, the first pass-through region 4a and the second pass-through region 4b are each included in the light limiting range 40.

[0037] The light limiting range 40 is the range in which the light limiting unit 25 can restrict the passage of light 3. The light limiting range 40 may be, for example, the range corresponding to the cross-section perpendicular to the imaging direction at the position of the light limiting unit 25 of the light beam of light 3 that can be captured by the optical system of the imaging unit 21. In other words, the light limiting range 40 may be a range corresponding to the size of the lens 23 of the imaging unit 21.

[0038] As shown in Figure 4, the position of the first passing region 4a in the light limiting range 40 and the position of the second passing region 4b in the light limiting range 40 may be different from each other. That is, the first passing region 4a and the second passing region 4b may be shifted in a predetermined direction (hereinafter referred to as the "passing region position shift direction") based on the position of the first passing region 4a in the light limiting range 40 and the position of the second passing region 4b in the light limiting range 40.

[0039] Furthermore, as shown in Figure 4, the second passing region 4b may be a region that does not overlap with the first passing region 4a. More specifically, the range from one end to the other of the second passing region 4b in the direction of passing region misalignment does not have to overlap with the range from one end to the other of the first passing region 4a in the direction of passing region misalignment. More specifically, the light limiting range 40 may be divided into two in the direction of passing region misalignment, with the first passing region 4a in one range but the second passing region 4b not being present, and the other range may be containing the second passing region 4b but the first passing region 4a not being present.

[0040] For example, if the direction of displacement of the passing region is direction Y, as shown in Figure 4, the range 41b from the left end to the right end of the second passing region 4b in direction Y does not need to overlap with the range 41a from the left end to the right end of the first passing region 4a in direction Y. More specifically, as shown in Figure 4, the light limiting range 40 is divided into two parts in direction Y, and the left side may contain a passing region 4a but not a passing region 4b, while the right side may contain a passing region 4b but not a passing region 4a.

[0041] Furthermore, as shown in Figure 4, the second passing region 4b may be the inverted region of the first passing region 4a. In this case, the direction of the passing region displacement may be the direction indicating the inversion. The definition of the inversion direction is explained below.

[0042] Figure 5 is a diagram illustrating the direction of reversal. As shown in Figure 5, the direction of reversal is the direction 42 which is perpendicular to the axis of rotation of the reversal.

[0043] Furthermore, the second passing region 4b may be a region obtained by translating the first passing region 4a, not limited to the example above. In this case, the direction of the displacement of the passing region may be the direction indicating the translation direction. Alternatively, the shape and size of the first passing region 4a and the second passing region 4b may be different.

[0044] Further, the state setting unit 22 may include liquid crystal and be capable of setting the first state 5a or the second state 5b based on the presence or absence of voltage applied to the liquid crystal. More specifically, the state setting unit 22 may include a plurality of liquid crystal layers respectively arranged in a plurality of compartments, and be capable of setting the first state 5a or the second state 5b based on the presence or absence of voltage applied to each of the plurality of liquid crystal layers. For example, the light limiting unit 25 included in the state setting unit 22 has a structure in which a plurality of liquid crystal layers respectively arranged in a matrix in a plurality of compartments are sandwiched between two linear polarizing plates arranged such that their polarization directions intersect each other. The liquid crystal layer in a compartment where no voltage is applied is in a state of transmitting light 3, and the liquid crystal layer in a region where voltage is applied is in a state of not transmitting light 3. Note that the linear polarizing plates may be arranged such that their polarization directions are parallel to each other, and the liquid crystal layer in a compartment where no voltage is applied may be in a state of not transmitting light 3, and the liquid crystal layer in a region where voltage is applied may be in a state of transmitting light 3. By using liquid crystal in this way, the pattern of the passage region 4 can be flexibly set to various patterns only by electronic control.

[0045] In the first embodiment, the case where the state setting unit 22 is incorporated in the camera module 20 has been described, but the present invention is not limited to this, and the state setting unit 22 may be externally attached as a configuration separate from the camera module 20.

[0046] [1-3. Functions realized in the distance measuring device according to the first embodiment] Although an example of the hardware configuration for realizing the distance measuring device according to the first embodiment has been described above, next, functions for operating the distance measuring device in cooperation with the hardware will be described.

[0047] FIG. 6 is a block diagram showing an example of functions realized in the distance measuring device according to the first embodiment. As shown in FIG. 6, the control unit 10 included in the distance measuring device 1 includes a photographing control unit 101 and a depth calculation unit 102 as functions for operating the distance measuring device 1. Note that the camera module 20 shown in FIG. 6, as well as the photographing unit 21 and the state setting unit 22 included in the camera module 20, are as described in the above hardware configuration.

[0048] The above functions may be implemented by the processing unit 11 executing a program installed in the distance measuring device 1, which is a computer, and including commands corresponding to the above functions. This program may be supplied to the distance measuring device 1 via a computer-readable information storage medium such as an optical disk, magnetic disk, magnetic tape, magneto-optical disk, flash memory, etc., or via the Internet or the like. The details of each function will be described below.

[0049] [Shooting control unit] FIG. 7 is a diagram showing an example of an image acquired by the shooting control unit according to the first embodiment. In FIG. 7, for convenience of explanation, a schematic diagram showing the first image 9a acquired by the shooting control unit 101 and a schematic diagram showing the second image 9b acquired by the shooting control unit 101 are arranged vertically side by side.

[0050] The shooting control unit 101 controls the shooting unit 21 and the state setting unit 22 so as to acquire a first image 9a in which the shooting target 2 is imaged in the first state 5a and a second image 9b in which the shooting target 2 is imaged in the second state 5b. More specifically, the shooting control unit 101 controls the state setting unit 22 to set it to the first state 5a and controls the shooting unit 21 to shoot to acquire the first image 9a. After acquiring the first image 9a, the state setting unit 22 is controlled to set it to the second state 5b, and the shooting unit 21 is controlled again to shoot to acquire the second image 9b. That is, the shooting times of the first image 9a and the second image 9b are different. Also, the processing of the shooting control unit 101 may be a series of processing performed in chronological order.

[0051] Also, depending on the usage scenario, a series of processing may be performed at high speed so that the shooting times of the first image 9a and the second image 9b are close. For example, when the shooting target 2 is a moving object, the movement of the shooting target 2 affects the position of the shooting target 2 in the first image 9a imaged in the first image 9a and the position of the shooting target 2 in the second image 9b imaged in the second image 9b, which affects the distance measurement accuracy. In order to reduce the influence of the movement of the shooting target 2, it is effective to perform high-speed processing so that the shooting times of the first image 9a and the second image 9b are close. This is the same in the scenario where the distance measuring device 1 itself is used while moving.

[0052] Furthermore, when the object to be photographed 2 is stationary or the distance measuring device 1 is fixed, the above processing does not need to be high-speed, nor does it need to be a series of processes. For the sake of explanation, from here on, we will assume that the object to be photographed 2 or the distance measuring device 1 is moving, but the processing of the shooting control unit 101 is performed at a sufficiently high speed, or that the object to be photographed 2 and the distance measuring device 1 are stationary, and will not consider the effects of the movement of the object to be photographed 2 or the distance measuring device 1.

[0053] As shown in Figure 3, if the arrival position 7 differs between the first state 5a and the second state 5b, a discrepancy occurs between the position of the object 2 in the first image 9a as seen in the first image 9a and the position of the object 2 in the second image 9b as seen in the second image 9b (hereinafter referred to as "image position shift 50"). The image position shift 50 will be described in detail in the explanation of the depth calculation unit described later.

[0054] As shown in Figure 7, the outlines of the photographic object 2 in the first image 9a and the photographic object 2 in the second image 9b are blurred. This blurring is due to the image being out of focus, and the further the photographic object 2 is from the in-focus position, the greater the spread of blurring centered on the target position 7. Improving the blurring can improve the distance measurement accuracy, and these improvement measures will be explained in the second and third embodiments described later.

[0055] [Depth Calculation Unit] The depth calculation unit 102 searches for a second image region, which is a region of the second image 9b that corresponds to a first image region, which is at least one region of the first image 9a. For example, the search for the second image region may be performed using a process that is generally known in stereo matching techniques, such as a region-based matching method or a feature-based matching method.

[0056] The depth calculation unit 102 may search the second image region along the direction of the passing region displacement. The direction of the passing region displacement corresponds to the direction of the image displacement 50. In other words, searching along the direction of the passing region displacement is equivalent to searching along the direction of the image displacement 50. Therefore, efficient searching can be performed, and the processing load can be easily reduced.

[0057] Furthermore, the depth calculation unit 102 calculates the depth of an object in the first image region or the second image region based on its position in the first image 9a of the first image region and its position in the second image 9b of the second image region. Calculating the depth of an object in the first image region or the second image region means, for example, calculating information regarding the position of the object in the depth direction (same as the shooting direction). More specifically, this could involve calculating the distance from the object in the first image region or the second image region to the distance measuring device 1, or calculating the distance from the object in the first image region or the second image region to a position offset from the distance measuring device 1. An object in the first image region or the second image region does not refer to the entire object in the first image region or the second image region, but rather to a local part of the object in the first image region or the second image region. Next, the principle of depth calculation will be explained.

[0058] Figure 8 shows examples of the position of the object to be photographed and the path of light from the object. Examples 81a and 81b show the case where the object to be photographed 2 is located at a position 61 that is further away than the focus position (not shown), and examples 82a and 82b show the case where the object to be photographed 2 is located at a position 62 that is even further away than position 61. Also, examples 81a and 82a show the case where the state setting unit 22 is set to the first state 5a, and examples 81b and 82b show the case where the state setting unit 22 is set to the second state 5b.

[0059] When the object to be photographed 2 is located further away than the focus position, as can be seen by comparing Example 81a and Example 82a, the further the object to be photographed 2 is from the rangefinder 1, the further the focal point 6 shifts forward (towards the lens 23). The further the focal point 6 shifts forward, the greater the difference in the reached positions 7 between the first state 5a and the second state 5b, and the greater the image displacement 50.

[0060] When the object to be photographed 2 is located at the in-focus position (not shown), the image displacement 50 between the first state 5a and the second state 5b becomes zero. When the object to be photographed 2 is located closer than the in-focus position (not shown), the closer the object to be photographed 2, the further the focal point 6 shifts inward (away from the lens), and the larger the image displacement 50 between the first state 5a and the second state 5b becomes. This relationship between the image displacement 50 and depth is determined geometrically and optically based on various factors such as the distance from the lens 23 to the image sensor 24 and the refractive index of the lens 23. The depth calculation unit 102 calculates the depth using this geometrically and optical relationship.

[0061] Furthermore, since depth is calculated using the principle described above, it may be difficult to determine whether the image displacement is due to the subject 2 being farther away from the focus point or closer to the focus point. This problem can be resolved by pre-setting the focus point so that it is always in front of the subject 2 (closer to the rangefinder 1). Alternatively, this problem can also be resolved by pre-setting the focus point so that it is always behind the subject 2 (away from the rangefinder 1). In this way, the depth can be uniquely determined from the image displacement 50.

[0062] Furthermore, the depth calculation unit 102 may calculate the depth of objects projected into the first or second image region based on the difference between the positions of the first and second image regions in the direction of displacement of the passing region.

[0063] Since the direction of displacement of the passing region corresponds to the direction of the image displacement 50, the difference between the positions of the first image region and the second image region in the direction of displacement of the passing region corresponds to the magnitude of the image displacement 50. Furthermore, the magnitude of the image displacement 50 corresponds to the depth. Therefore, it is possible to calculate the depth based on the difference between the positions of the first image region and the second image region in the direction of displacement of the passing region.

[0064] In this embodiment, the case in which the first passing region 4a and the second passing region 4b formed by the light limiting unit 25 do not overlap has been described, but the first passing region 4a and the second passing region 4b may overlap in part. When the first passing region 4a and the second passing region 4b overlap in part, it is necessary to set the centroid of the first passing region 4a and the centroid of the second passing region 4b to be different. The difference in the centroids of the first passing region 4a and the second passing region 4b causes an image shift 50, which allows the depth to be calculated. In addition, by partially overlapping the first passing region 4a and the second passing region 4b, more light can enter the image sensor 24. As a result, an image with less noise can be captured even with a short exposure time.

[0065] [1-4. Summary of the First Embodiment] As described above, the distance measuring device (distance measuring device 1) according to the first embodiment of the present disclosure includes: an imaging unit 21 for photographing a target object; a state setting unit 22 positioned between the target object and the imaging unit 21, which can set a first state in which light from the target object that passes through a first passing region is incident on the imaging unit 21, and a second state in which light that passes through a second passing region different from the first passing region is incident on the imaging unit 21; an imaging control unit 101 that controls the imaging unit 21 and the state setting unit 22 to acquire a first image in which the target object is photographed in the first state and a second image in which the target object is photographed in the second state; and a depth calculation unit 102 that searches for a second image region which is a region of the second image that corresponds to a first image region which is at least one region of the first image, and calculates the depth of what is photographed in the first image region or the second image region based on the position of the first image region and the position of the second image region. This distance measuring device 1 makes it easy to reduce the size of the distance measuring device.

[0066] [2. Second Embodiment] Secondly, a second embodiment of the distance measuring device 1 will be described. In the second embodiment, the passage area 4a and passage area 4b are particularly limited from those of the first embodiment. In the following description of the second embodiment, the same points as in the first embodiment will be omitted from the explanation.

[0067] Figure 9 shows an example of a passage region according to the second embodiment. As shown in Figure 9, the second passage region 4b may be a region separated from the first passage region 4a. More specifically, the range from one end to the other end of the second passage region 4b in the direction of passage region misalignment may be separated from the range from one end to the other end of the first passage region 4a in the direction of passage region misalignment. For example, if the direction of passage region misalignment is direction Y, as shown in Figure 9, the range 41b from one end to the other end (left end to right end) of the second passage region 4b in direction Y may be separated from the range 41a from one end to the other end (left end to right end) of the first passage region 4a in direction Y.

[0068] Furthermore, it is preferable that the first passing region 4a and the second passing region 4b be as far apart as possible. For example, it is preferable that the first passing region 4a be close to one end of the light limiting range 40 of the light limiting unit 25 in the direction of displacement of the passing region, and the second passing region 4b be close to the other end of the light limiting range 40 in the direction of displacement of the passing region.

[0069] Furthermore, it is preferable that the sizes of the first passing region 4a and the second passing region 4b are small. For example, the sizes of the first passing region 4a and the second passing region 4b should be such that they satisfy the desired depth of field according to the usage scenario, which has been calculated in advance by the designer. In other words, it is preferable that the sizes of the first passing region 4a and the second passing region 4b can be changed according to the usage scenario.

[0070] In other words, the state setting unit 22 should be able to appropriately set the sizes of the pre-calculated first passage region 4a and second passage region 4b according to the usage scenario. More specifically, the state setting unit 22 should be able to set a first state 5a in which light 3 from the object to be photographed 2 that passes through the first passage region 4a of a size appropriate to the usage scenario is incident on the photographing unit 21, and a second state 5b in which light 3 that passes through a second passage region 4b, which is different from the first passage region 4a and of a size appropriate to the usage scenario, is incident on the photographing unit 21.

[0071] Furthermore, the shooting control unit 101 may control the state setting unit 22 so that the sizes of the first passing area 4a and the second passing area 4b become the size corresponding to the selected usage scene, according to the user's selection of usage scene.

[0072] In the example shown in Figure 9, the first passing region 4a and the second passing region 4b are shown as circular regions of the same size. However, the first passing region 4a and the second passing region 4b do not have to be circular, and their shapes and sizes may differ from each other.

[0073] Figure 10 shows an example of an image according to the second embodiment. Compared to the example of an image according to the first embodiment shown in Figure 7, the image displacement 50 is larger than that of the first embodiment. Furthermore, the blurring of the outlines of the photographed object 2 in the first image 9a and the image of the photographed object 2 in the second image 9b is improved compared to the first embodiment.

[0074] In other words, as described above, by separating the first passing region 4a and the second passing region 4b as far apart as possible, the parallax between the path of light 3 passing through the first passing region 4a and the path of light 3 passing through the second passing region 4b increases, and the image position shift 50 becomes more pronounced, making it easier to improve the distance measurement accuracy.

[0075] Furthermore, by reducing the size of the first passing region 4a and the second passing region 4b according to the usage scenario, the blurring of the outlines of the target object 2 in the first image 9a and the image of the target object 2 in the second image 9b is improved, making it easier to improve the distance measurement accuracy.

[0076] Note that the first image 9a and the second image 9b shown in Figure 10 have low brightness and appear dark. This is because the amount of light incident on the imaging unit 21 is insufficient due to the reduced size of the first passing region 4a and the second passing region 4b. Further improvement in distance measurement accuracy can be achieved by improving the amount of light, and this improvement measure will be explained in the third embodiment described later.

[0077] [3. Third Embodiment] Thirdly, a third embodiment of the distance measuring device 1 will be described. In the third embodiment, the passage area is further limited compared to the second embodiment. In the following description of the third embodiment, the same points as in the first and second embodiments will be omitted.

[0078] Figure 11 shows an example of a passage region according to the third embodiment. As shown in Figure 11, the width 401 of the first passage region 4a in the direction of passage region displacement may be narrower than the width 402 in the direction perpendicular to the direction of passage region displacement. The same applies to the second passage region 4b. For example, if the direction of passage region displacement is direction Y, as shown in Figure 11, the width 401 from one end to the other (left end to right end) of the first passage region 4a in direction Y may be narrower than the width 402 from one end to the other (upper end to lower end) of the first passage region 4a in direction Z. The same applies to the second passage region 4b.

[0079] Furthermore, it is preferable that the width of the first passing region 4a and the second passing region 4b in the direction of displacement of the passing region is narrow. For example, the width of the first passing region 4a and the second passing region 4b in the direction of displacement of the passing region should be narrow enough to satisfy the desired depth of field according to the usage scenario, as calculated in advance by the designer. In other words, it is preferable that the width of the first passing region 4a and the second passing region 4b in the direction of displacement of the passing region can be changed according to the usage scenario.

[0080] In other words, the state setting unit 22 should be able to appropriately set the width of the first passing region 4a and the second passing region 4b in the direction of passing region misalignment, which have been calculated in advance, according to the usage scenario. More specifically, the state setting unit 22 should be able to set a first state 5a in which the light 3 from the object to be photographed 2 that passes through the first passing region 4a, which has a width in the direction of passing region misalignment according to the usage scenario, is incident on the photographing unit 21, and a second state 5b in which the light 3 that passes through the second passing region 4b, which has a width in the direction of passing region misalignment that is different from the first passing region 4a, is incident on the photographing unit 21.

[0081] Furthermore, the shooting control unit 101 may control the state setting unit 22 so that the width of the first passing area 4a and the second passing area 4b in the direction of the passing area position displacement becomes a width corresponding to the selected usage scene, according to the usage scene selected by the user.

[0082] In Figure 11, the first passing region 4a and the second passing region 4b are shown as elliptical regions of the same size. However, the first passing region 4a and the second passing region 4b do not have to be elliptical in shape. For example, they may be elongated holes formed by combining two semicircles in a rectangle, polygons, slits, etc., and the shapes and sizes of the first passing region 4a and the second passing region 4b may be different from each other.

[0083] Figure 12 shows an example of an image according to the third embodiment. Compared with the example of an image according to the second embodiment shown in Figure 10, the brightness of the first image 9a and the second image 9b has improved, and the lack of light has been resolved. On the other hand, blurring is greater in direction Z, but since the depth calculation process is performed based on information in direction Y, deterioration of distance measurement accuracy due to blurring can be avoided.

[0084] In this way, by narrowing the width of the first passing region 4a and the second passing region 4b in a predetermined direction according to the usage scenario, and widening the width in a direction perpendicular to the predetermined direction, the amount of light is secured while blurring is improved only in the direction that affects the distance measurement process, making it easier to improve the distance measurement accuracy.

[0085] [4. Modifications] This disclosure is not limited to the embodiments described above. Modifications can be made as appropriate without departing from the spirit of this disclosure.

[0086] For example, the direction of displacement of the passing region is not limited to the direction of reversal or translation. Specifically, the designer may calculate the centroids of the first passing region 4a and the second passing region 4b in advance, and then apply an optical correction in the direction connecting the calculated centroids of the first passing region 4a and the second passing region 4b. Alternatively, for example, the designer may have experimentally determined it in advance.

[0087] Furthermore, the liquid crystals arranged in the light limiting section 25 do not necessarily have to be divided into two-dimensional sections in a matrix; for example, they may be divided into one-dimensional sections in one direction. Also, the liquid crystals arranged in the light limiting section 25 do not necessarily have to be divided into rectangular sections; for example, they may be divided into sections that match the shape of the passing region 4.

[0088] Furthermore, the light limiting unit 25 does not necessarily have to include liquid crystal, and may be mechanical. For example, it may be a mechanical type that mechanically switches between multiple light-shielding plates, each having multiple patterns of apertures.

[0089] Furthermore, the search of the second image region may be an omnidirectional search that comprehensively explores multiple directions, rather than just one direction.

[0090] Furthermore, the state setting unit 22 may allow the direction of the passing area displacement to be set according to the usage scenario. For example, when using the system in a scenario where the target of the camera moves in a specific direction, such as when photographing a road from the side and measuring the distance to a vehicle traveling on the road, the shooting control unit 101 may control the state setting unit 22 so that the direction of the passing area displacement is perpendicular to the direction of movement of the target of the camera, according to the user's selection of the usage scenario. By doing so, the influence of the movement of the target of the camera 2 on the distance measurement accuracy can be reduced, and the distance measurement accuracy can be easily improved.

Claims

1. A distance measuring device comprising: a shooting means for photographing a target object; a state setting means disposed between the target object and the shooting means, capable of setting a first state in which light from the target object passing through a first passing region is incident on the shooting means, and a second state in which light passing through a second passing region different from the first passing region is incident on the shooting means; a shooting control means for controlling the shooting means and the state setting means to acquire a first image in which the target object is photographed in the first state, and a second image in which the target object is photographed in the second state; and a depth calculation means for searching for a second image region which is a region of the second image that corresponds to a first image region which is at least one region of the first image, and calculating the depth of what is photographed in the first image region or the second image region based on the position of the first image region and the position of the second image region.

2. The distance measuring device according to claim 1, wherein the shooting control means controls the state setting means to set to the first state and controls the shooting means to take a picture to acquire the first image, and after acquiring the first image, controls the state setting means to set to the second state and controls the shooting means again to take a picture to acquire the second image.

3. The distance measuring device according to claim 1 or 2, wherein the depth calculation means calculates the depth based on the difference between the position of the first image region and the position of the second image region in a predetermined direction, and the predetermined direction indicates a direction based on the position of the first passing region and the position of the second passing region.

4. The distance measuring device according to any one of claims 1 to 3, wherein the second passing region does not overlap with the first passing region.

5. The distance measuring device according to any one of claims 1 to 3, wherein the second passage region is separated from the first passage region.

6. The distance measuring device according to any one of claims 3 to 5, wherein the width of the first passage region in the predetermined direction is narrower than the width of the first passage region in the direction perpendicular to the predetermined direction, and the width of the second passage region in the predetermined direction is narrower than the width of the second passage region in the direction perpendicular to the predetermined direction.

7. The distance measuring device according to any one of claims 3 to 6, wherein the second passing region represents a region obtained by inverting or translating the first passing region, and the predetermined direction represents the direction of inversion or the direction of translation.

8. The distance measuring device according to any one of claims 1 to 7, wherein the state setting means includes a liquid crystal, and the first state or the second state can be set based on whether or not a voltage is applied to the liquid crystal.

9. A distance measuring method comprising: a shooting means for photographing a subject to be photographed; a state setting means disposed between the subject to be photographed and the shooting means, which can set a first state in which light from the subject to be photographed that passes through a first passing region is incident on the shooting means, and a second state in which light passing through a second passing region different from the first passing region is incident on the shooting means; a shooting control step for acquiring a first image in which the subject to be photographed is depicted in the first state and a second image in which the subject to be photographed is depicted in the second state; and a depth calculation step for searching for a second image region which is a region of the second image that corresponds to a first image region which is at least one region of the first image, and calculating the depth of what is depicted in the first image region or the second image region based on the position of the first image region and the position of the second image region.

10. A program for causing a computer to function as: a shooting means for photographing a subject to be photographed; a state setting means positioned between the subject to be photographed and the shooting means, which can set a first state in which light from the subject to be photographed that passes through a first passing region is incident on the shooting means, and a second state in which light passing through a second passing region different from the first passing region is incident on the shooting means; and a shooting control means for controlling these means to acquire a first image in which the subject to be photographed is depicted in the first state, and a second image in which the subject to be photographed is depicted in the second state; and a depth calculation means for searching for a second image region which is a region of the second image that corresponds to a first image region which is at least one region of the first image, and calculating the depth of what is depicted in the first image region or the second image region based on the positions of the first image region and the second image region.