Distance measuring device, distance measuring method, and program

The TOF camera system addresses multipath errors by using controlled angles and correction parameters based on known planes, enhancing measurement accuracy.

JP2026096708APending Publication Date: 2026-06-15GLORY LTD

Patent Information

Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
GLORY LTD
Filing Date
2024-12-03
Publication Date
2026-06-15

AI Technical Summary

Technical Problem

Existing TOF cameras face measurement errors due to the multipath phenomenon, particularly in environments with walls and floors, leading to inaccurate distance measurements.

Method used

A TOF camera system with a controlled depression angle and correction means that uses theoretical distances and spatial information to correct measured distances based on known planes, such as floors and tables, by calculating correction parameters to minimize errors.

🎯Benefits of technology

This approach simplifies the correction process for TOF camera measurements, providing more accurate distance calculations by accounting for known planes in the environment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2026096708000001_ABST
    Figure 2026096708000001_ABST
Patent Text Reader

Abstract

This technology provides a simpler way to correct the measurement distance of a TOF camera. [Solution] The system comprises a TOF camera 20 for measuring the distance to an object, and a control means for correcting the measured distance measured by the TOF camera 20. The TOF camera 20 is installed with a depression angle θ and measures the distance to an object in the space below the measurement target. The control means determines correction information for the TOF camera 20 in advance of the actual measurement based on the theoretical distance d to each point on a known specific plane 50 (bed surface 92a, etc.) and the measured distance d to each point in a preliminary measurement, and corrects the measured distance to each point in the actual measurement using the correction information. The theoretical distance D is calculated based on the spatial position information of the specific plane 50 (height h from the floor (reference horizontal plane), etc.), the installation height of the TOF camera 20 (height H from the floor, etc.), and the depression angle θ.
Need to check novelty before this filing date? Find Prior Art

Description

【Technical Field】 , , 【0006】 【0001】 The present invention relates to a distance measuring device for measuring the distance to an object and related technologies. 【Background Art】 【0002】 There is known a distance measuring device that includes a light emitting unit that emits light and a light receiving unit that receives reflected light from an object, and measures the distance to the object by a method (hereinafter, TOF method: Time-of-Flight method) of measuring the distance to the target object based on the propagation time of light. As such a distance measuring device, there is a TOF camera that includes a two-dimensionally arranged light receiving element group (an imaging element such as a CCD or CMOS) as a light receiving unit, and can obtain the distance to each point on the object surface as a distance image (depth image) based on the light receiving results of each two-dimensionally arranged light receiving element. 【0003】 A TOF camera is a distance measuring device of the TOF method as described above, and calculates the distance to the object by measuring the time from when the irradiation light emitted from the light source is reflected by the object until it returns to the light receiving unit. 【0004】 When using a TOF camera in an environment where there are walls, floors, etc., the multipath phenomenon may have an adverse effect on the measurement value. The multipath phenomenon is a phenomenon in which not only the light (direct reflected light) that is reflected by the object at the shortest distance after emission and returns, but also unnecessary light (indirect reflected light) that is reflected by the object after passing through walls, floors, etc. after emission is received by the light receiving unit. When this phenomenon occurs, a distance larger than the actual distance is measured (as a measurement value), and a distance error (measurement error) occurs. 【0005】 As a technique for correcting the measurement error caused by such a multipath phenomenon, there is a technique described in Citation 1. 【0006】 In the technique described in Reference 1, the region within the measurement target space is divided into an object region and a planar region. Then, a plane equation approximating the plane of the planar region is determined, and a correction value for the planar region is generated based on the plane equation and the measured values ​​of the distance image in the planar region. 【0007】 Reference 1 primarily assumes a situation where the plane equation is unknown, and describes how to determine three points to identify the unknown plane equation (simply put, the unknown plane) based on luminance and depth images. 【0008】 Although reference 1 mentions a situation where the coordinates of a plane are known, it does not explicitly state a specific method for calculating the distance to a point on a known plane. [Prior art documents] [Patent Documents] 【0009】 [Patent Document 1] Japanese Patent Publication No. 2023-68814 [Overview of the Initiative] [Problems that the invention aims to solve] 【0010】 The technique described in Reference 1 above primarily assumes a situation where the plane equation is unknown, and complex processing is performed to identify the unknown plane. 【0011】 On the other hand, the inventors of the present invention focused on the fact that, depending on the conditions of the space being measured, it is not always necessary to assume that the plane equation is unknown. In such cases, they thought that the correction process for measurement errors caused by multipath phenomena could be simplified based on information about a known plane. 【0012】 Therefore, the objective of this invention is to provide a technology that can more easily correct the measurement distance of a TOF camera. [Means for solving the problem] 【0013】 To solve the above problems, the distance measuring device according to the present invention comprises a TOF camera that measures the distance to an object within the camera's field of view, and control means provided inside and / or outside the TOF camera that corrects the measured distance measured by the TOF camera. The TOF camera is installed with a depression angle and measures the distance to an object in the measurement target space below the TOF camera. The control means determines correction information for the TOF camera in advance of the actual measurement based on the theoretical distance from the TOF camera to each point on the specific plane, which is determined according to the theoretical position of each point on a known specific plane, and the measured distance from the TOF camera to each point on the specific plane in a preliminary measurement taken before the actual measurement by the TOF camera. The control means then corrects the measured distance of each point in the actual measurement using the correction information. The theoretical distance is calculated based on the spatial position information of the specific plane, the installation height of the TOF camera, and the depression angle of the TOF camera. 【0014】 The aforementioned specific plane may be any of the following: the floor surface of the living room, the surface of the bed, or the surface of the table. 【0015】 The depression angle of the TOF camera can be changed between a predetermined number of angles, and the correction information is determined in advance for each of the predetermined number of angles. The control means may, in the actual measurement, correct the measurement distance by the TOF camera using the correction information corresponding to the angle of the TOF camera at the time of the actual measurement from among the predetermined number of angles. 【0016】 The correction information is calculated as a correction parameter to bring the position of each corresponding point, which corresponds to the measured distance measured in the preliminary measurement as the distance from the TOF camera to each point on the specific plane, closer to the theoretical position of each point on the specific plane. The correction parameter may include a parameter that shows the ratio of the theoretical distance to the measured distance in the preliminary measurement. 【0017】 The correction parameter may also include a parameter indicating whether to increase the degree of correction on the near side or the far side in the depth direction of the measurement target space. 【0018】 The correction information may include correction parameters calculated to minimize the error function relating to the difference between the theoretical distance and the measured distance. 【0019】 Prior to the actual measurement, the control means may calculate correction information for each plane, specifying a plurality of known planes as the specific plane, and generate corrected correction information in advance by averaging the plurality of correction information obtained for the plurality of planes, and then correct the measurement position based on the measurement distance in the actual measurement using the corrected correction information. 【0020】 Prior to the actual measurement, the control means may pre-calculate first correction information, which is the correction information when the first plane is the specific plane, and second correction information, which is the correction information when the second plane is the specific plane. In the actual measurement, the control means may correct the measurement position based on the measurement distance of the TOF camera for points on the first plane using the first correction information, and correct the measurement position based on the measurement distance of the TOF camera for points on the second plane using the second correction information. 【0021】 Prior to the measurement, the control means may pre-calculate first correction information, which is the correction information when the first plane is the specific plane, and second correction information, which is the correction information when the second plane is the specific plane. In the measurement, the control means may determine the position of the person in the measurement target space, and if the person is on the first plane, it may use the first correction information to correct the measurement position based on the measurement distance of the TOF camera to calculate the position of each point on the person's surface. If the person is on the second plane, it may use the second correction information to correct the measurement position based on the measurement distance of the TOF camera to calculate the position of each point on the person's surface. 【0022】 Prior to the measurement, the control means may pre-generate first correction information, which is the correction information when the first plane, which is the bed surface in the living room, is the specific plane, and second correction information, which is the correction information when the second plane, which is the floor surface in the living room, is the specific plane, and pre-generate averaged correction information by averaging the first correction information and the second correction information. In the measurement, until the person being measured has finished moving from the first plane to the second plane, the control means may pre-generate the measurement position based on the measurement distance of the TOF camera for at least the region including the first plane and the second plane using the averaged correction information. After the person has finished moving from the first plane to the second plane, the control means may pre-generate the measurement position based on the measurement distance of the TOF camera for at least the region including the second plane using the second correction information. 【0023】 To solve the above problems, the distance measurement method according to the present invention comprises: a) a step of obtaining the measured distance from the TOF camera to each point on a known specific plane in a preliminary measurement using a TOF camera that is installed with a depression angle and measures the distance to an object in the space to be measured below; b) a step of obtaining the theoretical distance from the TOF camera to each point on the specific plane; c) a step of obtaining correction information for the TOF camera in advance based on the measured distance and the theoretical distance; and d) a step of obtaining the measured distance in the main measurement using the TOF camera and correcting the measured distance in the main measurement using the correction information, wherein the theoretical distance is calculated based on the spatial position information of the specific plane, the installation height of the TOF camera and the depression angle of the TOF camera. 【0024】 To solve the above problems, the program according to the present invention causes a computer to execute the following steps: a) in a preliminary measurement by a TOF camera installed in a state having a depression angle and measuring the distance to an object in a measurement target space below, obtaining measurement distances from the TOF camera to each point on a known specific plane; b) obtaining theoretical distances from the TOF camera to each point on the specific plane; c) obtaining correction information regarding the TOF camera in advance based on the measurement distances and the theoretical distances; and d) obtaining a measurement distance in a main measurement by the TOF camera and correcting the measurement distance in the main measurement using the correction information. The theoretical distance is calculated based on the spatial position information of the specific plane, the installation height of the TOF camera, and the depression angle of the TOF camera. 【0025】 To solve the above problems, a distance measurement device according to the present invention includes a TOF camera that measures the distance to an object within the camera's field of view, and control means provided inside and / or outside the TOF camera for correcting the measurement distance measured by the TOF camera. The TOF camera is installed in a state having a depression angle and measures the distance to an object in a measurement target space below the TOF camera. The control means obtains correction information regarding the TOF camera in advance before the main measurement based on a theoretical vertical position, which is the vertical position among the theoretical positions of each point on a known specific plane, and a corresponding vertical position, which is the vertical position in the vertical direction of each corresponding point corresponding to the measurement distance from the TOF camera to each point on the specific plane in a preliminary measurement prior to the main measurement by the TOF camera. The control means corrects the measurement position based on the measurement distance in the main measurement using the correction information. The theoretical vertical position is calculated based on the spatial position information of the specific plane and the installation height of the TOF camera, and the corresponding vertical position is calculated based on the measurement distance from the TOF camera to each point on the specific plane in the preliminary measurement and the depression angle of the TOF camera. 【0026】 To solve the above problems, the distance measurement method according to the present invention includes the steps of: a) obtaining the measured distance from the TOF camera to each point on a known specific plane in a preliminary measurement using a TOF camera that is installed with a downward angle and measures the distance to an object in the space to be measured below; b) obtaining the theoretical vertical position, which is the vertical position among the theoretical positions of each point on the specific plane; c) obtaining the corresponding vertical position, which is the vertical position of each corresponding point corresponding to the measured distance from the TOF camera to each point on the specific plane in the preliminary measurement; and d) obtaining the corresponding vertical The method comprises the steps of: a) obtaining correction information for the TOF camera in advance based on the perpendicular position and the theoretical vertical position; and b) obtaining the measurement distance in the actual measurement using the TOF camera and correcting the measurement position based on the measurement distance in the actual measurement using the correction information, wherein the theoretical vertical position is calculated based on the spatial position information of the specific plane and the installation height of the TOF camera, and the corresponding vertical position is calculated based on the measurement distance from the TOF camera to each point on the specific plane in the preliminary measurement and the depression angle of the TOF camera. 【0027】 To solve the above problems, the program according to the present invention includes: a) in preliminary measurement by a TOF camera installed in a state having a depression angle and measuring the distance to an object in the lower measurement target space, obtaining the measurement distances from the TOF camera to each point on a known specific plane; b) obtaining the theoretical vertical position, which is the vertical position among the theoretical positions of each point on the specific plane; c) obtaining the corresponding vertical position, which is the vertical position of each corresponding point corresponding to the measurement distance from the TOF camera to each point on the specific plane in the preliminary measurement; d) preliminarily obtaining correction information regarding the TOF camera based on the corresponding vertical position and the theoretical vertical position; and e) obtaining the measurement distance in the main measurement by the TOF camera and correcting the measurement position based on the measurement distance in the main measurement using the correction information. The program is for causing a computer to execute the above steps, wherein the theoretical vertical position is calculated based on the spatial position information of the specific plane and the installation height of the TOF camera, and the corresponding vertical position is calculated based on the measurement distance from the TOF camera to each point on the specific plane and the depression angle of the TOF camera in the preliminary measurement. 【Effect of the Invention】 【0028】 According to the present invention, it is possible to more simply correct the measurement distance of the TOF camera. 【Brief Description of the Drawings】 【0029】 [Figure 1] It is a diagram showing a monitoring system for monitoring a person in a room. [Figure 2] It is a functional block diagram showing the schematic configuration of a detection device (distance measurement device). [Figure 3] It is a conceptual diagram showing that information on the three-dimensional positions of each specific part of a subject person is obtained based on depth information and the like. [Figure 4] It is a flowchart regarding preliminary measurement and the like. [Figure 5] It is a flowchart regarding the calculation of correction information. [Figure 6]This is a flowchart related to the measurement process. [Figure 7] This diagram shows three depression angles. [Figure 8] This is a side view of a living room with a bed. [Figure 9] This is a view of the living space from above. [Figure 10] This diagram shows the virtual adjustment state of the TOF camera. [Figure 11] This is a diagram explaining the correction process. [Figure 12] This is a diagram explaining the correction process. [Figure 13] This figure shows the measurement positions (point cloud before and after correction) for each point on a specific plane. [Figure 14] This is Figure 13 with auxiliary lines added. [Figure 15] This diagram shows an image of the interior of a living space, taken from an oblique angle above. [Figure 16] This diagram shows a situation where a specific shape is drawn on the operation screen, including the captured image. [Figure 17] This is a flowchart showing the processing (preliminary measurement) of the second embodiment. [Figure 18] This is a flowchart showing the processing (calculation of correction information) of the second embodiment. [Modes for carrying out the invention] 【0030】 Embodiments of the present invention will be described below with reference to the drawings. 【0031】 <1. First Embodiment> <1-1. System Overview> Figure 1 shows a monitoring system 1 that monitors a person (specifically, the person's behavior, etc.) in a living room 90. As shown in Figure 1, the monitoring system 1 comprises multiple detection devices 10 and multiple terminal devices 70, 80. Terminal device 70 is also called a management device 70, and terminal device 80 is also called a portable terminal device 80. The monitoring system 1 detects the presence or absence of a person to be monitored (such as a person receiving care) in the living room 90 and the person's posture, etc. (such as "falling down"). 【0032】 This section primarily provides examples of how the monitoring system 1 is used in nursing care facilities. However, it is not limited to this, and the monitoring system 1 may also be used in nursing facilities (hospitals, etc.) or private homes. 【0033】 As shown in Figure 1, each detection device 10 and each terminal device 70, 80 are connected to each other via a network 108. The network 108 consists of a LAN (Local Area Network) and the Internet, etc. The connection to the network 108 may be wired or wireless. For example, the management device 70 may be wired to the network 108, and each detection device 10 and each mobile terminal device 80 may be wirelessly connected to the network 108. Alternatively, all devices 10, 70, and 80 may be wirelessly connected to the network 108. 【0034】 Each detection device 10 is placed in the room 90 of each person being monitored (in this case, the person receiving care (resident)) (for example, in each person's individual room). Each detection device 10 is a device that detects target events of the person being monitored based on measurement data related to the person being monitored (measurement data from a TOF camera (described later), etc.). 【0035】 In detail, the camera unit 20 of the detection device 10 (see also Figure 2) acquires distance images (also referred to as depth images) to objects (floor, bed, person, etc.) within the detection target space (measurement target space). Each detection device 10 calculates the three-dimensional position of the object based on the distance image, etc., and also detects (acquires) skeletal information of the person being detected (position information of multiple specific body parts, etc.), the person's position information, and various detection target events (also referred to as behavior-related events) related to the person. Examples of detection target events include "normal supine position (normal lying position (a state of lying normally on a bed))", "getting up (upper body) on the bed", "sitting on the edge", "sleeping on the edge", "sliding off the bed", "normal standing position", "normal sitting position", and "falling (on the floor, etc.)". 【0036】 <1-2. Overview of detection device 10> As shown in Figures 1 and 2, the detection device 10 comprises a camera unit 20, a drive unit 27, and a processing unit 30. The camera unit 20 also comprises an imaging unit (light receiving unit) 23, an illumination unit (light emitting unit) 25, and a lens optical system 24 (see Figure 2). Figure 2 is a functional block diagram showing the schematic configuration of the detection device (distance measuring device) 10. 【0037】 The camera unit 20 is a camera that photographs the space to be detected (in this case, the space inside the living room 90). In this case, a Time of Flight (TOF) type 3D camera (TOF camera) is used as the camera unit 20. 【0038】 As shown in Figure 1, the camera unit 20 (hereinafter also referred to as the TOF camera 20) is installed at a high position (height H) within the living room 90 with a depression angle θ (see also Figure 8). The TOF camera 20 is installed on the ceiling or upper part of the wall of the living room 90 (more specifically, above and near the bed 92) and is capable of photographing the interior of the living room 90. 【0039】 The TOF camera 20 is a three-dimensional camera that measures the distance to an object (more specifically, each point on the object) within the camera's field of view. As described above, the TOF camera 20 is installed with a depression angle θ, and the TOF camera 20 measures the distance from its position (installation position) to an object in the measurement target space below the TOF camera 20. 【0040】 In detail, the TOF camera 20 acquires images with depth information. Specifically, the TOF camera 20 captures images (infrared images, etc.) 110 (see Figure 3) of the subject object (person, wall, floor, bed 92, etc.) and acquires depth information (depth distance information) 120 for each pixel in the captured image 110. The depth information 120 for each pixel in the captured image is information about the distance (distance from the TOF camera 20) to each point on the subject object (person, wall, floor, bed, etc.) corresponding to each pixel in the captured image 110. Also, depth information 120 for multiple pixels can be expressed as an image with depth information. 【0041】 As described above, the TOF camera 20 includes an illumination unit 25, an imaging unit 23, and a lens optical system 24. 【0042】 The illumination unit 25 has a light source (light emitter) that emits light such as infrared light, and is a light-emitting unit that emits light from the light source (such as infrared light for distance measurement in the TOF (Time of Flight) method) toward an object. The light emitted from the illumination unit 25 also functions as illumination light to illuminate the shooting range of the imaging unit 23. 【0043】 The imaging unit 23 is a light-receiving unit that receives reflected light (infrared light) from an object. The imaging unit 23 has an image sensor (infrared image sensor) such as a CCD or CMOS. The image sensor has a plurality of light-receiving elements (a group of light-receiving elements arranged in a two-dimensional array). 【0044】 The lens optical system 24 is composed of optical elements such as lenses. The lens optical system 24 guides reflected light from an object (by collecting it) to the imaging unit 23 (light receiving unit). The lens optical system 24 is configured to be fixed in position relative to the imaging unit 23 and to be integrated with the imaging unit 23. 【0045】 Furthermore, the illumination unit 25, the imaging unit 23, and the lens optical system 24 are fixed in position and integrated together. The imaging unit 23 and the lens optical system 24 are driven in conjunction with the illumination unit 25 by the drive unit 27, making it possible to capture images of the shooting range illuminated by light from the illumination unit 25. 【0046】 The depression angle θ of a TOF camera can also be expressed as the angle at which the optical axis of the lens optical system 24 is shifted downward relative to the horizontal plane of the camera position (the horizontal plane at the camera height). 【0047】 A Time of Flight (TOF) 3D camera is a camera that measures the distance to a subject using the time of flight of light (infrared light in this case). Specifically, the distance from the imaging unit 23 to the object (depth distance information) is calculated (acquired) for each pixel in the captured image based on the time from when infrared light is emitted (irradiated) from the illumination unit (light-emitting unit) 25 until the infrared light reaches the object (subject), is reflected, and the reflected light from the object returns to the imaging unit (light-receiving unit) 23. The TOF camera 20 measures the distance to each point on the object within the camera's field of view (each point on the object corresponding to each pixel) based on the detection result from the imaging unit (light-receiving unit) 23. This distance calculation process is performed by a controller 21 or the like built into the TOF camera 20. In addition, the imaging unit 23 may be further provided with an RGB image sensor (or grayscale image sensor) that captures visible light images (color images, etc.), and color images (or grayscale images, etc.) may be captured. 【0048】 The TOF camera 20 also includes a controller 21. The controller 21 has a hardware configuration similar to that of the controller 31 (described later), etc. 【0049】 The drive unit 27 is a processing unit that can (mechanically) drive the TOF camera 20 (more specifically, the imaging unit 23 and the illumination unit 25, etc.) to change the orientation of the TOF camera 20. The drive unit 27 is configured with a drive mechanism (motor and gears, etc.). The drive operation by the drive unit 27 is controlled by the controller 31 (described later) of the processing unit 30. 【0050】 The drive unit 27 is configured to include a drive mechanism (motor and gears, etc.) capable of achieving rotational drive operation around a predetermined single axis. The drive (rotational drive operation) of the drive unit 27 changes the attitude (attitude angle) of the TOF camera 20. For example, the TOF camera 20 is installed (positioned) on a ceiling or the like in a state where it can rotate around a single axis (horizontal axis) parallel to the horizontal direction. Then, as the drive unit 27 rotates, the TOF camera 20 rotates around this horizontal axis. In addition, as a result of this rotational drive operation, the shooting angle (attitude angle) of the TOF camera 20 (specifically, the depression angle θ of the TOF camera 20) is changed, and the field of view (shooting range) of the imaging unit 23 is changed. The controller 31 (described later) can automatically recognize the current depression angle θ of the TOF camera 20. Note that the drive unit 27 is not limited to being provided outside the TOF camera 20, but may be built into the TOF camera 20 and drive the imaging unit 23, etc. 【0051】 In this case, the imaging range (field of view) of the imaging unit 23 can, in principle, change to an infinite number of imaging ranges (field of view) in accordance with the rotational drive operation. However, in this embodiment, only a predetermined number (in this case, three) of the infinite number of imaging ranges (field of view) of the imaging unit 23 are used. In other words, of the infinite number of attitude angles related to the TOF camera 20, only three (a predetermined number) attitude angles (depression angles) θp, θq, and θr related to the TOF camera 20 are used (see Figure 7). The depression angle θ of the TOF camera 20 is controlled so that it does not change continuously during the monitoring period, but rather remains at the same angle for a certain period of time (is fixed at the same angle). 【0052】 In this way, the TOF camera 20 acquires a captured image of the subject (captured image information) 110 (see Figure 3) and depth information (information on the distance to the object corresponding to each pixel (depth distance information)) 120 for each pixel in the captured image. 【0053】 The measured distance to an object (measured distance to the object) measured by the TOF camera 20 includes errors due to the multipath phenomenon, as described above. Therefore, a value larger than the original value (theoretical value) is measured as the value obtained by the TOF camera 20. In this embodiment, a correction process to correct the measured distance is performed by the processing unit 30, etc. Specifically, the processing unit 30 performs a correction process to correct the measured distance to the object acquired by the TOF camera 20, corrects the distance image obtained by the TOF camera 20, and generates a corrected distance image. In addition, in this correction process, the processing unit 30 corrects the measurement position based on the measured distance (distance image) obtained by the TOF camera 20. This correction process will be described in detail later. 【0054】 Furthermore, the processing unit 30 can acquire the three-dimensional position (especially time-series information) of multiple specific body parts (eyes, ears, nose, neck, chest, waist, shoulders, elbows, wrists, knees, ankles, etc.) of the person being detected, based on the images (distance images, etc.) captured by the TOF camera 20. In this example, the TOF camera 20 and the processing unit 30 are provided separately, but the system is not limited to this configuration, and the TOF camera 20 and the processing unit 30 may be integrated into a single unit. 【0055】 Figure 3 is a conceptual diagram showing how 3D position information of specific parts of a subject person is acquired (calculated) based on the captured image 110 and depth information 120. Note that in Figure 3, the captured image 110 and depth information 120 are shown schematically. For example, in the actual captured image 110, the person is captured as it was, whereas in the captured image 110 in Figure 3, the person is represented (simplified) as a figure of connected ellipses. The same applies to the other depth information 120. Also, while the actual depth information 120 contains information on the distance to the object corresponding to each pixel, in the depth information 120 in Figure 3, the distance to the object corresponding to each pixel is expressed by converting it into the density of each pixel. In detail, the magnitude of the distance is expressed by the magnitude of the density (shade). 【0056】 First, the processing unit 30 (especially the controller 31) analyzes the captured image 110 and obtains skeletal information (skeletal model information) 140 (see the lower left part of Figure 3) of the subject person based on the texture information of the captured image 110. This skeletal information 140 is information that (simplifies) represents the skeleton of the person using multiple specific parts of the subject person (in detail, the chest, nose, neck, shoulders, elbows, wrists, waist, knees, ankles, eyes, ears, etc.) (mainly joints) and skeletal lines (links) connecting these multiple specific parts. In the skeletal information 140 in Figure 3, each specific part is shown as a "point," and each skeletal line (connecting line) is shown as a "line segment." The skeletal information 140 based on the captured image contains information about multiple specific parts (here, B0 to B17) (such as the planar position information of each part in the image). 【0057】 Furthermore, the processing unit 30 acquires planar position information (two-dimensional position information in the captured image in the camera coordinate system) of each specific part of the subject (for example, their respective representative positions) within the captured image 110, based on the subject's skeletal information 140. In addition, the processing unit 30 also acquires distance information from the TOF camera 20 to each specific part, based on the depth information 120 of one or more pixels at the planar position (within the captured image 110) corresponding to each specific part. Then, the processing unit 30 acquires three-dimensional position information 150 (three-dimensional position information within the living space) of each specific part, based on the planar position information of each specific part of the subject within the captured image and the distance information (depth information) to each specific part. 【0058】 Furthermore, since the detection device 10 also measures the distance to an object using the TOF camera 20, it is also referred to as the distance measuring device 10 (or TOF camera system 10). Additionally, since the detection device 10 also measures the position of an object, it is also referred to as the position measuring device. The monitoring system 1 is also sometimes referred to as the detection system or image processing system. 【0059】 <1-3. Processing Unit 30> As shown in Figure 2, the processing unit 30 of the detection device 10 comprises a controller (also called a control unit) 31, a storage unit 32, a communication unit 34, and an operation unit 35. 【0060】 The controller 31 is a control device built into the processing unit 30 that controls the detection device 10. 【0061】 The controller 31 is configured as a computer system equipped with one or more hardware processors (for example, a CPU (Central Processing Unit) and a GPU (Graphics Processing Unit)). The controller 31 performs various processes by executing a predetermined software program (hereinafter also simply referred to as a program) stored in a storage unit (ROM and / or a non-volatile storage unit such as a hard disk) 32 using the CPU, etc. The program (more specifically, a group of program modules) may be recorded on a portable recording medium such as a USB memory stick and read from the recording medium to be installed on the detection device 10. Alternatively, the program may be downloaded via a communication network or the like and installed on the detection device 10. 【0062】 The controller 31 acquires captured image information about the subject (person to be detected, etc.) from the TOF camera 20, and also acquires distance information to each specific part of the person from the TOF camera 20. The controller 31 also performs a correction process to correct the measured distance to the object (measured distance to the object) measured by the TOF camera 20. Then, the controller 31 acquires 3D position information of each specific part based on the captured image information (particularly the planar position information of each specific part of the subject in the captured image) and the corrected measured distance (corrected distance image, etc.). 【0063】 Furthermore, the controller 31 uses the learning model 400 (Figure 2) to detect behavior-related events of the target person. 【0064】 As the learning model 400, for example, a neural network model consisting of multiple layers is used. Then, the weighting coefficients, etc. (learning parameters) between the layers (input layer, (one or more) hidden layers, output layer) of the neural network model are adjusted using a predetermined machine learning method. The learning model 400 after being trained by machine learning is also called a trained model. Specifically, the learning parameters of the learning model (learner) 400 are adjusted using a predetermined machine learning method, and a trained learning model (trained model) 400 is generated. 【0065】 Therefore, first, the controller 31 performs the learning phase processing in machine learning. Specifically, the controller 31 pre-trains the learning model 400 using multiple training data sets. Each training data set uses data that takes as input information indicating the positional relationships of multiple specific body parts of a person, and outputs behavior-related events concerning the person. Then, using a predetermined machine learning method, the weighting coefficients (learning parameters) between the layers (input layer, (one or more) hidden layers, output layer) of the neural network model are adjusted (learned). As a result, the trained learning model 400 (trained model) is generated (produced). 【0066】 Subsequently, the controller 31 performs inference processing using the trained learning model 400. Specifically, the controller 31 uses the learning model 400 (trained model), which has been machine-learned using the multiple training data, to detect behavior-related events concerning the target person (also referred to as the person to be detected or the person to be judged) based on information indicating the positional relationships of multiple specific body parts of the target person. More specifically, the controller 31 inputs the positional relationships of multiple specific body parts of the target person into the trained model 400 and obtains output from the trained model 400 (processing results of the event detection process related to the behavior-related events of the target person). 【0067】 Here, the detection device 10 (controller 31) performs both the learning phase processing and the inference phase processing in machine learning. However, it is not limited to this, and for example, the learning phase processing and the inference phase processing may be performed by separate devices. 【0068】 Furthermore, the controller 31, in cooperation with the communication unit 34, transmits the detection result to the terminal devices 70 and 80, and the terminal devices 70 and 80 output the detection result (display output and / or audio output, etc.). 【0069】 The memory unit 32 is composed of a storage device such as a hard disk drive (HDD) or a solid-state drive (SSD). The memory unit 32 stores the aforementioned programs and various data. For example, the memory unit 32 stores time-series data such as the three-dimensional positions of multiple specific body parts related to the person to be detected, as well as various data and programs used for training and utilizing the learning model 400. 【0070】 The communication unit 34 is capable of performing network communication via the network 108. Various protocols, such as TCP / IP (Transmission Control Protocol / Internet Protocol), are used in this network communication. By using this network communication, the detection device 10 can exchange various types of data with a desired partner (for example, terminal devices 70, 80). 【0071】 The operation unit 35 includes an operation input unit 35a that receives operation input to the detection device 10, and a display unit 35b that outputs various information. 【0072】 <1-4. Overview of Correction Process> Next, the correction processing in the processing unit 30 (correction processing of the measurement distance acquired by the TOF camera 20, and correction processing of the measurement position by the TOF camera 20) will be explained with reference to Figures 4 to 6, etc. The generation process of the correction information and the correction processing based on the correction information are performed individually for each of the three depression angles θp, θq, and θr mentioned above. In the following, it will be assumed that the depression angle θ of the TOF camera 20 is one of the three angles θp, θq, and θr (for example, θq). The same processing should be performed for the other two angles. Figures 4 to 6 are flowcharts showing the processing performed by the controller 31, etc. 【0073】 First, in step S11, a preliminary measurement is performed using the TOF camera 20. This preliminary measurement is performed to generate correction information for the TOF camera 20, prior to the main measurement which measures the actual object. The preliminary measurement is performed before the main measurement using the TOF camera 20 (step S31 (see Figure 6)). It is preferable that the preliminary measurement is performed when there are no people in the room 90. 【0074】 In preliminary measurements and correction processing, a known specific plane 50 within the camera field of view of the TOF camera 20 is used. A horizontal plane (a plane whose normal vector points in the vertical direction (vertically upward)) is used as the specific plane 50. Here, we mainly illustrate an example in which the bed surface 92a (the top surface of the bed 92) (see Figure 8) is used as the specific plane 50. The bed surface 92a is a horizontal plane parallel to the floor surface 91 (also called the reference horizontal plane) and has a height h from the floor surface 91 (reference horizontal plane). However, it is not limited to this, and the floor surface 91 (see Figure 1) or the table surface, etc., may also be used as the specific plane 50. 【0075】 Figure 8 is a side view of the living room 90 where the bed 92 is located, and Figure 9 is a top view of the living room 90. Figures 8 and 9 show the XYZ coordinate system fixed to the TOF camera 20 (and the living room 90). The Z axis is positioned vertically downward, and the X and Y axes are positioned along the horizontal plane (a plane perpendicular to the vertical direction). In Figure 8, the X axis is positioned perpendicular to the plane of the paper (and towards the viewer), and the Y axis is positioned to the left within the plane of the paper. As mentioned above, the TOF camera 20 is positioned at a height H from the floor surface 91 and with a depression angle θ. 【0076】 In this preliminary measurement, the TOF camera 20 acquires (measures) the measurement distance d (measured distance to each point) from the TOF camera 20 to each point on the specific plane 50 (for example, the bed surface 92a). The controller 31 also acquires this measurement distance d. 【0077】 In detail, measurement distances d are acquired for multiple points on a specific plane 50 (for example, the bed surface 92a) and within a specific region (correction region). The specific region can be specified by an operation performed by the user. For example, the specific region can be specified by enclosing a specific region (a part of the bed surface 92a) with a specific shape 81 (a rectangle or a circle, etc.) (see Figure 16) within the image captured by the TOF camera 20 (see Figure 15). Alternatively, the controller 31 may automatically extract a region of a specific type of object (such as the bed surface region) through image processing involving object recognition, and automatically determine all or part of that region (such as the bed surface region) as the specific region. Figure 15 is a photograph taken of the interior of the living room 90 viewed from diagonally above. Figure 16 shows the situation where a rectangle matching the shape of the bed surface 92a is drawn as the specific shape 81 in the operation screen including the photograph. 【0078】 In step S12, the theoretical distance D (theoretical value of the distance to each point) from the TOF camera 20 to each point on the specific plane 50 is determined. 【0079】 The theoretical distance D from the TOF camera 20 to each point on the specific plane 50 is determined according to the theoretical position Pa of each point on the specific plane 50 (see Figures 8 and 9). 【0080】 Here, the theoretical distance D is calculated based, for example, on known spatial position information of a specific plane 50 (here, the bed surface 92a) (here, the height h from the floor surface 91 (reference horizontal plane)), the installation height of the TOF camera 20 (height H from the floor surface 91), and the depression angle θ of the TOF camera 20. The angle (depression angle) θ of the TOF camera 20 is also referred to as the line of sight angle of the TOF camera 20 or the installation angle (mounting angle) of the TOF camera 20. 【0081】 Specifically, the theoretical position Pa(x,y,z) of each point on the specific plane 50 (bed surface 92a) is first determined by the following equations (1) to (3), based on the values ​​h, H, and θ (all predetermined fixed values) (see also Figures 8 and 9). The values ​​α and β are angles determined according to the pixel position (i,j) of each pixel in the image sensor. Angle α is the shift angle with respect to the camera line of sight in the YZ plane, and angle β is the shift angle with respect to the camera line of sight in the XY plane. Although a detailed explanation is omitted here, it is preferable that each value x,y,z is corrected using a coefficient to correct lens distortion, etc. 【0082】 【number】 【0083】 【number】 【0084】 【number】 【0085】 Based on these equations, the theoretical distance D to each point on a specific plane 50 (the distance from the origin A1 of the XYZ coordinate system to the theoretical position Pa of each point) can be calculated by the following equation (4). 【0086】 【number】 【0087】 Note that equation (4) can also be expressed as equation (5) using equations (1) to (3). 【0088】 【number】 【0089】 In this way, in step S12, the controller 31 obtains the theoretical distance D to each point on the specific plane 50. 【0090】 Figure 8 shows a situation where the measured distance d is greater than the theoretical distance D; in other words, the corresponding point Pb (see Figure 8) corresponding to the measured distance d is located below the theoretical position Pa (coordinate values ​​(x,y,z)) (below the specific plane 50 (bed surface 92a)). The coordinate values ​​(xb,yb,zb) of the corresponding point Pb (also referred to as the measurement position of each point on the specific plane 50) can be calculated, for example, by the following equations (6) to (8). 【0091】 【number】 【0092】 【number】 【0093】 【number】 【0094】 However, the value C is expressed by equation (9). 【0095】 【number】 【0096】 These equations are derived based on the following relationships (10) to (12). 【0097】 【number】 【0098】 【number】 【0099】 【number】 【0100】 Then, in step S13, the controller 31 generates correction information for the TOF camera 20 (correction information to correct measurement errors due to multipath effects) based on the theoretical distance D to each point on the specific plane 50 (theoretical distance D corresponding to the theoretical position Pa of each point) and the measured distance d to each point. In other words, the correction information is generated based on the theoretical position of each point on the specific plane 50 and the measured distance d to each point. This correction information is information for correcting the measured distance by the TOF camera 20 and the measured position based on that measured distance. The details of step S13 will be described in detail later. 【0101】 Subsequently, as shown in Figure 6, the main measurements are performed using the TOF camera 20. These measurements may be performed with people present in the room 90. 【0102】 Specifically, in step S31, the TOF camera 20 performs a measurement process, and the TOF camera 20 measures the distance to the object (each point on the object) in the measurement target space. In short, the measured distance for this measurement (the measured distance to the object at the time of this measurement) is obtained. More specifically, the controller 21 generates a distance image as a collection of distances to each point on the object corresponding to each pixel in the image sensor. Then, the controller 31 acquires this distance image (the distance image before correction). 【0103】 In the next step S32, the controller 31 uses the correction information obtained in step S13 (see Figures 4 and 5) (in detail, the correction parameters k, Δθ, ΔH (described later)) to correct the measurement distance d (distance image before correction) obtained in step S31 (Figure 6), and also corrects the measurement position corresponding to the measurement distance d. This correction process determines the corrected measurement position (the corrected position of the measurement point Pb). 【0104】 In detail, the controller 31 uses correction parameters k, Δθ, and ΔH (described later) to correct the position (xb, yb, zb) of each corresponding point Pb on the specific plane 50 to a position (xc, yc, zc) (see equations (17) to (19) described later). The position (xc, yc, zc) is the position obtained by multiplying the distance to each original corresponding point Pb by (1 / k) and then applying a virtual viewpoint transformation (coordinate transformation) of the TOF camera 20 using the correction parameters Δθ and ΔH. The correction process using the correction parameter k can also be described as the process of correcting the measured distance d (and the process of generating the corrected distance image). 【0105】 <1-5. Correction Process Details> Figures 11 and 12 illustrate the details of the correction process (and correction parameters). The graphs in Figures 11 and 12 show the relationship between the theoretical distance D (original distance) and the measured distance d for each point on a specific plane 50. For example, the line L1 in the upper graph of Figure 11 represents the ideal state of the relationship between D and d, that is, the state in which the measured distance d is obtained to be the same value as the theoretical distance D. 【0106】 However, as mentioned above, in reality, due to the effects of multipath phenomena, the measured distance d for each point on a specific plane 50 is measured as a larger value than the theoretical distance D for that point. In other words, for each point, the measured distance d is measured as a larger value than the theoretical distance D. 【0107】 The curve L0 in the upper graph of Figure 11 conceptually represents (represented by a single curve) the collection of measured distances d for each of these points (the collection of points plotted on the graph). In reality, however, there are numerous points on a given plane 50 that have the same theoretical distance D, and different measured values ​​are obtained for these numerous points. Therefore, the graph depicts a collection of multiple points scattered over a certain width (the width in the vertical direction of the graph) (see also the top of Figure 13, etc.). In the upper graph of Figure 11, this variation in the width direction is abstracted away, and a single curve L0 is drawn. 【0108】 Figure 13 shows the measurement positions (point cloud before and after correction) for multiple points on a specific plane 50. The top row of Figure 13 shows a graph plotting multiple corresponding points Pb (see Figure 8) (multiple points Pb before correction) corresponding to each measurement distance d of multiple points on the specific plane 50, at positions viewed from the side in real space. The horizontal axis represents the Y-direction position (horizontal position, further from the TOF camera 20 as you move to the left side of the paper). The vertical axis represents the vertical direction position (vertical position, further from the TOF camera 20 as you move to the bottom side of the paper). The vertical position of the axis of the horizontal axis (thick line extending horizontally in the top row of Figure 13) corresponds to the original height of the specific plane 50. Note that the corresponding points Pb are points (corresponding points in real space) corresponding to the measurement distance d measured in preliminary measurements as the distance from the TOF camera 20 to each point on the specific plane 50 (theoretical position Pa) (see Figure 8). In other words, a corresponding point Pb is a point reached by moving a measured distance d from the TOF camera 20 toward each point (theoretical position Pa) on the specific plane 50. The position of each corresponding point Pb that corresponds to each point on the specific plane 50 can also be expressed as the measured position of that point on the specific plane 50. 【0109】 In an ideal state, each point on the specific plane 50 coincides with each point on the horizontal axis in Figure 13. In other words, the point representing the theoretical position Pa lies on the horizontal axis. However, as mentioned above, in reality, measurement errors exist due to the effects of multipath phenomena, etc., and the measured distance d is often greater than the theoretical distance D. Therefore, as shown in the top row of Figure 13, the point Pb corresponding to the measured value d of each point on the specific plane 50 (corresponding point) is often located below each point on the horizontal axis. 【0110】 Figure 13 shows an example (actual measurement example) in which a portion of the floor surface 91 is used as a specific plane 50. Also, one side of the small section (1 square) in Figure 13 corresponds to 25 cm (centimeters) in real space. In the top row of Figure 13, it can be seen that an error of slightly less than 1 meter occurs at most (as can be seen from the magnitude of the difference between each point and the horizontal axis). 【0111】 To correct such errors, the following correction information is obtained in step S13. Specifically, correction information (correction parameters k, Δθ, ΔH) is calculated to bring the position (measurement position) of each corresponding point Pb on the specific plane 50 closer to the theoretical position Pa of each point on the specific plane 50. Specifically, the correction information (correction parameters) is obtained in two stages (steps S21 and S22 (Figure 5)). In detail, the correction parameter k is obtained in the first stage (step S21), and the correction parameters Δθ and ΔH are obtained in the second stage (step S22). 【0112】 In the first stage of processing (calculation of correction parameters), a correction parameter k that minimizes the error function relating to the difference between the theoretical distance D and the measured distance d is calculated (determined). More specifically, the correction parameter k that minimizes the error function (loss function) f1(k) in equation (13) (or equation (14)) is obtained by the least squares method (step S21 (see Figure 5)). In the least squares method, the solution may be obtained analytically, or it may be obtained by a numerical calculation method using a computer. In detail, the process of substituting different values ​​of k into equation (13) (or equation (14)) to calculate the error function f1 may be repeatedly executed, and the value of k that minimizes the value of the error function f1 may be obtained as the solution (finally). 【0113】 【number】 【0114】 The error function f1(k) in equation (13) is expressed as the sum of the squares of the difference between the measured distance d to each point on a specific plane 50 and k times the theoretical distance D to each point, for multiple points. Determining this correction parameter k is equivalent to determining the approximate straight line L2 of the curve L0 (a straight line with a slope k and passing through the origin) (see upper part of Figure 11) (determining the slope of the approximate straight line). In other words, each measured distance d is approximated to the value (k·D) using the value k that minimizes the error function f1(k) in equation (13). Note that here, an example is given in which the model function in the error function is a linear function (in particular, a linear function with only a slope k (a linear function with zero intercept)). 【0115】 The measured distance d is also a function of the values ​​i and j, and can be written as d(i,j). Similarly, the theoretical distance D is also a function of the values ​​i and j, and can be written as D(i,j). Furthermore, the measured distance d is also a function of the values ​​α and β, and can be written as d(α,β). Similarly, the theoretical distance D is also a function of the values ​​α and β, and can be written as D(α,β). 【0116】 【number】 【0117】 Furthermore, the value of k that minimizes the error function f1(k) in equation (13) is the same as the value of k that minimizes the error function f1(k) in equation (14). In other words, equations (13) and (14) are equivalent. 【0118】 The correction parameter k is a parameter (also called a ratio parameter) that indicates the ratio (approximate ratio) between the theoretical distance D and the measured distance d (in the preliminary measurement). Since this correction parameter k is the (main) parameter that corrects the depth in the distance image, it is also called the depth parameter. 【0119】 In the subsequent step S32, each measured distance d is corrected using a correction parameter k. Specifically, based on the approximation of each measured distance d to the value (k·D) (in other words, the value (d / k) is approximated to the value D), the measured distance d (approximate value (k·D)) is transformed (corrected) so that it becomes the theoretical distance D. More specifically, the value obtained by multiplying the measured distance d of each point by (1 / k) (corresponding to the theoretical value D) is calculated as the corrected value de (provisional value). That is, de = d / k. In other words, a new distance image (corrected distance image) is generated in which the values ​​at each position (i,j) in the distance image, which is a collection of measured values ​​d of each point, are each transformed to the value de (=d / k). 【0120】 In step S32, correcting each measurement distance d using the correction parameter k (multiplying the measurement distance d by (1 / k)) is equivalent to transforming curve L0 into curve L10 (see lower part of Figure 11), which is closer to the straight line L1. 【0121】 Furthermore, the correction using the correction parameter k causes a transition from the top state to the middle state in Figure 13 (and Figure 14). The set of corresponding points Pb moves in a direction that converges toward the position of the TOF camera 20 (the position of the point in the upper right) (direction of the very thick black arrow) (see the middle of Figure 14). 【0122】 The top row of Figure 13 (and Figure 14) shows the set (point cloud) of each corresponding point Pb before correction, and the middle row (second row) of Figure 13 shows the set of each corresponding point Pb (also referred to as Pb2) after correction using the correction parameter k. 【0123】 Thus, by correcting each measurement distance d using the correction parameter k, it is possible to roughly bring the position of each corresponding point Pb closer to the horizontal axis, as shown in the middle section of Figure 13. More specifically, even by correction using only the correction parameter k (also referred to as the first stage of correction processing), it is possible to transform the curve L0 in the upper section of Figure 11 into the curve L10 in the lower section of Figure 11, and roughly bring the curve L0 closer to the straight line L1. In other words, it is possible to move the point cloud in the uppermost section of Figure 13 to the point cloud in the middle section of Figure 13, bringing it closer to the original position of the specific plane 50. 【0124】 More specifically, in equations (6) to (8) which show the coordinate values ​​xb, yb, zb of each point, the values ​​obtained by changing the value d to the value de (=d / k) are calculated as the corrected coordinate values ​​xe, ye, ze of each point. That is, xe = xb / k, ye = yb / k, and ze = zb / k. Note that by changing the value d to the value de (=d / k), each corresponding point Pb moves to each point Pb2 (see Figure 8). 【0125】 However, there is still room for correction. For example, in the middle section of Figure 13, the overall trend of the collection of points is that the right side is lower than the left side (it slopes downward to the right). 【0126】 Therefore, in this embodiment, in the second stage (step S22) (Figure 5), the controller 31 determines two further correction parameters Δθ and ΔH (see Figure 10) to bring the approximate plane (its inclination and vertical position) of the set of corresponding points Pb (more precisely, point Pb2) closer to the specific plane 50. The parameter Δθ can also be expressed as a virtual adjustment value (or virtual angle adjustment value) of the depression angle (camera depression angle) θ of the TOF camera 20, and the value (θ+Δθ) can also be expressed as a virtual camera angle. The parameter ΔH can also be expressed as a virtual adjustment value (or virtual displacement adjustment value (camera virtual height adjustment value)) of the height (camera height) H of the TOF camera 20, and the value (H+ΔH) can also be expressed as a virtual camera height. 【0127】 Figure 10 shows a state (also called the virtual adjustment state) in which the depression angle θ (actual value) of the TOF camera 20 is virtually adjusted to the value (θ + Δθ) and the height H (actual height) of the TOF camera 20 is virtually adjusted to the value (H + ΔH). Figure 10 shows the theoretical position Pc in this virtual adjustment state. In detail, the corresponding point Pb and theoretical position Pc corresponding to a certain angle α(,β) are shown. 【0128】 Specifically, in the virtual adjustment state, each corresponding point Pb2 is virtually moved so that it approaches the theoretical position Pc of each point on the specific plane 50. 【0129】 As shown in Figure 10, the position of the point obtained by moving the corresponding point Pb2 to point F3, which is rotated Δθ around the original origin A1, and then moving it vertically upward by ΔH, corresponds to the theoretical position Pc. In other words, each corresponding point Pb2 moves to the theoretical position Pc in a situation where the TOF camera 20, which is installed at a new origin A2 moved vertically upward by ΔH from the original origin A1, is imaging (measuring distance) with the TOF camera 20 having its depression angle θ changed to the value (θ+Δθ). In short, each corresponding point Pb2 moves to the theoretical position Pc after the line of sight (and viewpoint) of the TOF camera 20 has changed. 【0130】 Then, the parameters Δθ and ΔH are determined so as to minimize the error function relating to the difference between the measured distance d (specifically, the value d / k) after correction by the parameter k and the hypothetical theoretical distance Dc (the distance between the theoretical position Pc and the new origin A2) which varies with the parameters Δθ and ΔH. Specifically, the correction parameters Δθ and ΔH that minimize the error function (loss function) g1(Δθ,ΔH) in equation (15) (or equation (16)) are determined by the least squares method. For example, the process of substituting many combinations (Δθ,ΔH) of the correction parameters (Δθ,ΔH) into equation (16) and calculating the error function g1 is repeatedly performed, and the combination (Δθ,ΔH) that minimizes the value of the error function g1 should be found as the solution. Note that the value k in equation (15) is the value calculated as the value that minimizes the error function f1(k) in equation (13) or equation (14). The same applies to the value k in equation (16). 【0131】 【number】 【0132】 【number】 【0133】 In equations (15) and (16), the subscript "θ→θ+Δθ" in the lower right corner means that the value θ is changed to the value (θ+Δθ). Similarly, the subscript "H→H+ΔH" in the lower right corner means that the value H is changed to the value (H+ΔH). Note that the value Dc is calculated in equation (5), which represents the theoretical distance D, by changing the value θ to the value (θ+Δθ) and the value H to the value (H+ΔH). 【0134】 In this error function g1(Δθ,ΔH), the theoretical distance D(Dc) corresponding to the theoretical position Pc of each point in the virtual adjustment state is determined. Distance Dc is the distance from the origin A2 to point Pc after virtual adjustment. Then, the square of the difference between the measured distance d of each point divided by the correction parameter k (d / k) and the theoretical distance Dc of that point is calculated as the sum of the values ​​for multiple points (see equation (16)). In other words, this error function g1(Δθ,ΔH) relates to the difference between the theoretical distance D to each point on the specific plane 50 in the virtual adjustment state and the measured distance d to each point (more specifically, the measured distance d multiplied by the value (1 / k)). 【0135】 The correction parameters Δθ, ΔH that minimize this error function (loss function) g1(Δθ, ΔH) are the parameters (parameter set) that bring the theoretical distance Dc (theoretical distance Dc corresponding to the correction parameters Δθ, ΔH) to each point (theoretical position Pc) on a specific plane 50 as close as possible to the measured distance to each corresponding point Pb2 (more specifically, the measured distance d multiplied by a value (1 / k)). 【0136】 Therefore, according to the calculated correction parameters Δθ and ΔH, the position of the corresponding point Pb2 of any point on the specific plane 50 (more specifically, the position of the corresponding point Pb moved to a distance equal to (1 / k) times the measured distance d) can be brought close to the theoretical position Pc of each point after virtual adjustment of the vertical position H and line of sight angle (depression angle θ) of the TOF camera 20. 【0137】 As a result, the collection of corresponding points Pb is arranged so that it is most aligned with the direction of the specific plane 50 and closest to the vertical position of the specific plane 50. In other words, the collection of measurement points can be approximated to the specific plane 50 (theoretical plane) in the virtual adjustment state. 【0138】 Specifically, in the later step S32, the position of each point is corrected using the second-stage correction parameters Δθ and ΔH in addition to the first-stage correction parameter k. In the first-stage correction process, as described above, the corresponding point Pb is moved to point Pb2 (see Figures 8 and 10), which is obtained by multiplying the measured distance d to the corresponding point Pb by (1 / k) on a straight line passing through the theoretical position Pa (on a virtual straight line in real space). For example, it transitions from the top to the middle of Figure 13. 【0139】 Then, in the second stage of correction processing, each corresponding point Pb in the original camera coordinate system (specifically each corresponding point Pb2 (see Figure 10)) moves to a theoretical position Pc(xc,yc,zc) in a virtual camera coordinate system corresponding to the correction parameters Δθ and ΔH. For example, it transitions from the middle to the bottom of Figure 13. 【0140】 The coordinate values ​​(xc, yc, zc) of the adjusted theoretical position Pc (i.e., the corrected measurement position) are calculated using equations (17) to (19). In this way, the measurement position based on the measurement distance d of the TOF camera 20 is corrected by the correction parameters Δθ, ΔH, k. 【0141】 【number】 【0142】 【number】 【0143】 【number】 【0144】 The bottom row of Figure 13 (and Figure 14) shows the results of the correction process using the correction parameters Δθ and ΔH. Specifically, it shows the set of corresponding points Pb (also referred to as Pb3) after the correction process. In the bottom row of Figure 13, the overall tilt that remained in the middle row of Figure 13 has been corrected, and the vertical position has also been corrected overall (by moving upward). It shows how the multiple corresponding points Pb after the correction process are positioned close to the horizontal axis (thick line). Furthermore, in the bottom row of Figure 13, it is shown that the error is generally within about 10-15 cm (centimeters), as can be seen from the magnitude of the difference between each point and the horizontal axis. Figure 14 is similar to Figure 13, however, various auxiliary lines are also shown in Figure 14. 【0145】 According to the correction parameters Δθ and ΔH that minimize equation (16), the theoretical distance Dc in the virtual adjustment state becomes close to the actual measured distance (more precisely, the value obtained by dividing the measured distance d by k (d / k)) for multiple points on a specific plane 50 in the virtual adjustment state. The theoretical position Pc is the position of a point on a virtual plane 55 (Figure 10) obtained by rotating the approximation plane 53 (the approximation plane in the middle of Figure 14) that approximates multiple corresponding points Pb2 by an angle Δθ (increasing the depression angle θ by Δθ) and moving it vertically by a height ΔH, and the theoretical distance Dc is the distance from the virtual origin A2 of the TOF camera 20 to the theoretical position Pc. 【0146】 The second stage of correction processing (correction processing using correction parameters Δθ and ΔH) corresponds to considering the measurement situation as one in which an object in the target space is being viewed (measured) from a virtual camera height and at a virtual camera angle (depression angle). For example, if both Δθ and ΔH are positive values, it can be seen that the situation should be one in which an object in the target space is being viewed (measured) from a virtual camera height higher than the actual position and at a virtual camera angle (depression angle) larger than the actual depression angle. In other words, if both Δθ and ΔH are positive values, it can be seen that a good correction result can be obtained by considering the measurement situation as one in which the TOF camera 20 is viewing (measuring) an object in the target space from a position ΔH higher than the actual position and at a depression angle Δθ larger than the actual depression angle. 【0147】 Here, a positive value Δθ means that, before correction (see the middle section of Figure 13), the "deviation" is large on the front side (right side in Figure 10) (the side closer to the TOF camera 20) of the measurement target space in the depth direction (the left-right direction (Y direction) in Figure 10 (and Figure 13)). Conversely, a negative value Δθ means that the "deviation" is large on the back side (left side in Figure 10) (the side further from the TOF camera 20) of the measurement target space in the depth direction (Y direction in Figure 10). Note that a large "deviation" means that a relatively large correction amount (relatively large degree of correction) is required. Also, a positive value Δθ is equivalent to the value (θ+Δθ) being larger than the original value θ, and a negative value Δθ is equivalent to the value (θ+Δθ) being smaller than the original value θ. 【0148】 Thus, the correction parameter Δθ is a parameter (virtual adjustment value for camera depression angle) that indicates which side of the measurement target space—the near side or the far side (the left-right direction (Y direction) in Figure 10)—should have a greater degree of correction. In other words, the correction parameter Δθ is a parameter that indicates which side of the measurement target space—the near side (the area relatively close to the camera) or the far side (the area relatively far from the camera)—should have a greater degree of correction. 【0149】 Furthermore, Figure 12 conceptually illustrates the correction process that follows Figure 11 (correction process using parameters Δθ and ΔH). The upper part of Figure 12 shows the same curve L10 as in the lower part of Figure 11. The middle part of Figure 12 shows curve L20, which is obtained by rotating curve L10 (see the lower part of Figure 11 and the upper part of Figure 12). The bottom part of Figure 12 shows curve L30, which is obtained by translating curve L20. The correction using parameters Δθ and ΔH roughly corresponds to these rotations and translations. As a result, the corrected curve L30 approaches the ideal straight line L1. 【0150】 After this correction process, as shown in Figure 13, each corresponding point Pb is moved to a position Pc close to the theoretical position Pc of the specific plane 50. In other words, the position of each corresponding point Pb is corrected to be close to a plane (horizontal plane) that is at a height equivalent to the specific plane 50 and has an inclination angle (zero degrees) of the specific plane 50. Therefore, it is possible to accurately determine the vertical position of an object (especially a person, etc.) based on each corresponding point Pb (more specifically, the corrected theoretical position Pc of each corresponding point Pb). 【0151】 Furthermore, in this embodiment, the same correction parameters (specifically k, Δθ, ΔH) are used for multiple pixels in the image sensor of the TOF camera 20 (in other words, multiple points on a specific plane 50 in real space) to perform correction processing. Also, even if a combination of correction parameters (k, Δθ, ΔH) is obtained using a portion of the bed surface 92a within the camera's field of view, the corresponding points Pb for all pixels within the camera's field of view are corrected based on the same combination of correction parameters k, Δθ, ΔH. That is, the measured distance to each point on objects other than the specific plane 50 (people, the floor, etc.), and the measured position based on said measured distance, are also corrected using the same combination of correction parameters (k, Δθ, ΔH). 【0152】 <1-6. Effects of the Embodiments> In the manner described above, correction information (correction information for measurement by the TOF camera 20) is determined in advance of the measurement based on the measured distance d and theoretical distance D to each point on the specific plane 50, and the measured distance (and measurement position) in the measurement is corrected using the correction information. In particular, by correcting the measurement position in the vertical direction in the measurement (see equation (19)), the height of each point of a person can be accurately measured. 【0153】 In particular, the theoretical distance D is calculated based on the spatial position information of a known specific plane 50 (such as the bed surface 92a or the floor surface 91) (such as the height h from the floor (reference horizontal plane)), the installation height H of the TOF camera 20, and the depression angle θ of the TOF camera 20. Therefore, it is possible to correct the measured distance of the TOF camera more easily. 【0154】 Furthermore, since the correction is performed using only a small number of parameters (three correction parameters k, Δθ, and ΔH) as correction information, an even simpler correction process is implemented. In particular, the correction process is easier compared to the case where different correction parameters are prepared for each pixel in the image sensor. 【0155】 During this measurement, a person may be present on the bed surface 92a (or the floor surface 91, etc.). In such a situation, the degree of the multipath phenomenon's effect (presence or absence, or magnitude) differs greatly depending on whether a person is present or absent at a real-space position corresponding to a certain pixel in the image sensor. In other words, the amount to be corrected differs greatly depending on whether a person is present or absent. Therefore, even if different correction parameters are set for each pixel, it is difficult to perform appropriate correction in both situations where a person is present and where they are not. In other words, even if different correction parameters are prepared for each pixel and complex processing is performed, appropriate correction is often not achieved. 【0156】 In contrast, in this embodiment, instead of using different parameters for each pixel in the image sensor, the same correction parameters (specifically, a relatively small number of correction parameters, for example, only three) are used for multiple pixels in the image sensor (in other words, multiple points on a specific plane 50 in real space). This makes it possible to perform simple corrections while tolerating a certain degree of error. 【0157】 Furthermore, in the above embodiment, a correction parameter k is used as correction information. The correction parameter k provides an index indicating the magnitude of the multipath effect. When the correction parameter k is large, it can be seen that the multipath effect is large overall, and when the correction parameter k is small, it can be seen that the multipath effect is small overall. 【0158】 Furthermore, in the above embodiment, a correction parameter Δθ is used as correction information. The correction parameter Δθ is a parameter that indicates whether the degree of correction should be increased on the near side or the far side in the depth direction within the measurement target space. Depending on whether the correction parameter Δθ is positive or negative, it is possible to determine which side, the near side or the far side, is particularly affected by multipath. In other words, depending on whether the value obtained by adding the correction parameter Δθ to the original depression angle (theoretical value) θ (θ+Δθ) is large or small compared to the theoretical value θ, it is possible to determine which side, the near side or the far side, is particularly affected by multipath. 【0159】 Furthermore, in the above embodiment, correction information corresponding to a predetermined number of angles (specifically, three predetermined depression angles θp, θq, θr) is individually determined in advance. Therefore, even if the depression angle θ of the TOF camera 20 is changed by the drive unit 27 to any other angle among the three different angles θp, θq, θr, correction processing based on the correction information can be easily performed. 【0160】 <2. Second Embodiment> The second embodiment is a modification of the first embodiment, etc. The following description will focus on the differences from the first embodiment. 【0161】 In the first embodiment described above, the correction information for the measurement distance (measurement position) by the TOF camera 20 is calculated based on the theoretical distance D to each point on a specific plane 50 and the measured distance d to each point. Specifically, the correction parameters k, Δθ, and ΔH are calculated as values ​​that minimize the error function relating to the difference between the theoretical distance D and the measured distance d. 【0162】 In this second embodiment, we will describe a method by which the correction information is calculated based on the theoretical vertical position Z1 (coordinate value z) of each point on the specific plane 50 and the corresponding vertical position Z2 (coordinate value zb), which is the vertical position of each corresponding point Pb corresponding to each point. The theoretical vertical position Z1 is the vertical position (theoretical position in the vertical direction of each point) of the theoretical position Pa of each point on the specific plane 50. The corresponding vertical position Z2 is the vertical position (height difference from the TOF camera 20) of each corresponding point Pb corresponding to the measured distance d from the TOF camera 20 to each point on the specific plane 50, and is also referred to as the corresponding vertical position or measured vertical position. Furthermore, since the position of each corresponding point Pb corresponding to each point is also the measured position of each point, the corresponding vertical position Z2 of each corresponding point Pb corresponding to each point is also simply referred to as the measured vertical position Z2 of each point. The theoretical vertical position Z1 and the measured vertical position Z2 are values ​​that indicate the height difference relative to the TOF camera 20, respectively. 【0163】 In detail, the correction parameter k is calculated as the value that minimizes the error function relating to the difference between the theoretical vertical position Z1 (the height of the theoretical position Pa at each point) and the measured vertical position Z2 (the height of the measured position at each point) at each point on a specific plane 50. In short, it is calculated as the value that minimizes the error function relating to the difference between the theoretical height and the measured height at each point. 【0164】 More specifically, correction parameters such as k are calculated as values ​​that minimize the error function relating to the difference between the theoretical vertical position Z1 of each point on a specific plane 50 and the vertical position (measured vertical position) Z2 of each corresponding point Pb, which corresponds to the measured distance d measured in preliminary measurements as the distance from the TOF camera 20 to each point on the specific plane 50. 【0165】 The theoretical vertical position z is calculated based on the spatial position information of a specific plane 50 (such as the height h from the floor surface 91 of the specific plane 50) and the installation height of the TOF camera 20 (such as the height H from the floor surface 91) (see equation (3)). Specifically, z = Hh. 【0166】 Furthermore, the coordinates (xb, yb, zb) of the corresponding point Pb are expressed by equations (6) to (8), based on the measurement distance d and the depression angle θ of the TOF camera 20. However, the value C is expressed by equation (9). 【0167】 Therefore, the coordinate value zb of the corresponding vertical position Z2 is calculated based on the measured distance d from the TOF camera 20 to each point on the specific plane 50 and the depression angle θ of the TOF camera 20 (see equation (8)). In this embodiment, the coordinate value zb of the measured vertical position Z2 (the vertical position of the corresponding point Pb) can be determined without using the theoretical distance D. 【0168】 In the second embodiment, the error function f2 of equation (20) is used instead of the error function f1 of the first embodiment. Also, the error function g2 of equation (21) is used instead of the error function g1 of the first embodiment. 【0169】 【number】 【0170】 【number】 【0171】 The correction parameter k is determined based on equation (20), and the correction parameters Δθ and ΔH are determined based on equation (21). Note that the value k in equation (21) is the value calculated to minimize the error function f2(k) in equation (20). 【0172】 Figures 17 and 18 are flowcharts showing the processing (calculation of correction information, etc.) in the second embodiment. The processing in the second embodiment will be described below with reference to these figures. 【0173】 First, in step S11b (Figure 17), the same operation as in step S11 (Figure 4) is performed. 【0174】 Next, in step S12b, the controller 31 determines the theoretical vertical position Z1 of each point on the specific plane 50. The theoretical vertical position Z1 of each point is expressed by the value z (see equation (3)). 【0175】 Furthermore, in step S13b, the controller 31 determines correction information in advance of the main measurement based on the theoretical vertical position Z1 of each point on the specific plane 50 and the measured vertical position Z2 of each point in the preliminary measurement (the vertical position of each corresponding point Pb). 【0176】 In detail, in step S21b (Figure 18), the correction parameter k is calculated based on equation (20). The correction parameter k is the value that minimizes the error function relating to the difference between the measured vertical position Z2 and the theoretical vertical position Z1 of each point on the specific plane 50 (minimization by least squares method). The correction parameter k is a parameter (ratio parameter) that represents the ratio between the theoretical value and the measured value regarding the height of each point. 【0177】 Next, in step S22b (Figure 18), the correction parameters Δθ and ΔH are calculated based on equation (21). 【0178】 Equation (21) shows the error function g2(Δθ,ΔH) relating to the difference between the measured vertical position Z3 and the theoretical vertical position Z1 of the corresponding point Pb3, after the depression angle θ and height H of the TOF camera 20 have been virtually changed to depression angle (θ+Δθ) and height (H+ΔH), respectively. 【0179】 After a virtual modification of the TOF camera 20's depression angle, the measurement position of each point on the specific plane 50 is the position of point Pb3, which is obtained by rotating the modified corresponding point Pb2 (which is obtained by multiplying the length of the corresponding point Pb of each point by (1 / k)) around the origin A1 by Δθ and moving it by ΔH (see Figure 10). Expressed in the camera coordinate system before the modification, the height of the measurement position of point Pb3 after the movement (measurement vertical position Z3) is expressed by the value zc (see equation (19)). Also, as described above, the theoretical vertical position Z1 of each point on the specific plane 50 is expressed by the value z (see equation (3)) (expressed in the camera coordinate system before the modification). Therefore, the error function g2(Δθ,ΔH) is expressed as shown in equation (21). 【0180】 Then, the values ​​of Δθ and ΔH that minimize this error function g2(Δθ,ΔH) are calculated using methods such as the least squares method. 【0181】 The Δθ and ΔH that minimize the error function g2 are the parameters (parameter set) that bring the virtual adjusted measured vertical position Z3 (measured vertical position Z3 according to the correction parameters Δθ and ΔH) closest to the theoretical vertical position Z1 of each point. According to the calculated correction parameters Δθ and ΔH, the position of the corresponding point Pb3 of each point on the specific plane 50 can be brought close to the theoretical position Pc of each point after virtual adjustment of the vertical position H and line of sight angle (depression angle θ) of the TOF camera 20. 【0182】 Thus, in step S22b, correction parameters Δθ and ΔH are determined that minimize the error function g2 between the measured vertical position Z3 and the theoretical vertical position Z1 of each point Pb3 on the specific plane 50 after virtual adjustment of the depression angle θ of the TOF camera 20. 【0183】 Subsequently, in this measurement, the same processing as in steps S31 and S32 (Figure 6) is performed. Specifically, the measurement distance d in this measurement, and the measurement position based on said measurement distance d, etc., are corrected using correction information (correction parameters k, Δθ, ΔH, etc.). In detail, the measurement distance d in this measurement is multiplied by (1 / k) and corrected. In addition, the measurement position (xc, yc, zc) based on the measurement distance d (or the corrected measurement distance (d / k)) is corrected (calculated) by equations (17) to (19), etc. 【0184】 This embodiment also makes it possible to obtain the same effects as in the first embodiment. 【0185】 <3. Third Embodiment> The third embodiment is a modification of the first and second embodiments, etc. The differences from the first embodiment will be explained below. 【0186】 In the first embodiment, a method was described in which correction information is generated based on a specific plane 50 within the living room 90. 【0187】 In the third embodiment, a method by which correction information is generated based on a plurality of specific planes 50 within the living room 90 will be described. 【0188】 Figure 15 is a photograph taken from an oblique angle above the interior of the living room 90. In Figure 15, multiple specific planes 50 etc. that exist within the living room 90 are shown. In the third embodiment, the two planes of the bed surface 92a and the floor surface 91 are used as specific planes 50. These two planes (specific planes 50) have different heights from each other. 【0189】 Specifically, prior to the measurement, the controller 31 calculates correction information for each of several known planes, designating each as a specific plane 50. More specifically, the controller 31 performs the processing in steps S11 to S13 with the bed surface 92a as the specific plane 50 (first specific plane) to generate first correction information (first correction parameters k1, Δθ1, ΔH1). Furthermore, the controller 31 performs the processing in steps S11 to S13 with the floor surface 91 as the specific plane 50 (second specific plane) to generate second correction information (second correction parameters k2, Δθ2, ΔH2). The first correction information is correction information for the first specific plane (correction information when the first specific plane is a specific plane), and the second correction information is correction information for the second specific plane (correction information when the second specific plane is a specific plane). 【0190】 Subsequently, in the correction process of step S32, correction parameters are selected according to which plane each point lies on. Specifically, for points on the first specific plane, the measurement distance of the TOF camera 20 (and the measurement position based on that measurement distance) is corrected using the first correction information (first correction parameters k1, Δθ1, ΔH1). On the other hand, for points on the second specific plane, the measurement distance of the TOF camera 20 (and the measurement position based on that measurement distance) is corrected using the second correction information (second correction parameters k2, Δθ2, ΔH2). 【0191】 The plane on which each point corresponding to each pixel in the image sensor lies can be predetermined by the user's operation. 【0192】 For example, within the image captured by the TOF camera 20, a specific area (the area of ​​the bed surface 92a) can be enclosed by a specific shape (a rectangle or a circle, etc.) to specify an area including a point on the bed surface 92a. The point within the specific shape in the captured image should be considered as a point existing on the bed surface 92a (in real space), even if it is a point on the surface of a person. Then, the measurement distance of the TOF camera 20 (and the measurement position based on that measurement distance) is corrected using the first correction parameters k1, Δθ1, and ΔH1. 【0193】 The same specification operation should be performed for the floor surface 91. Then, for points that are considered to be on the floor surface 91, the measurement distance of the TOF camera 20 (and the measurement position based on that measurement distance) should be corrected using the second correction parameters k2, Δθ2, and ΔH2. 【0194】 According to this embodiment, correction information is obtained based on multiple specific planes 50, and the measurement distance (and the measurement position based on the measurement distance) can be properly corrected based on the correction parameters for each specific plane 50. 【0195】 <Modification 1 of the third embodiment> In the third embodiment, the correction parameters are changed (selected) depending on which plane each point lies on, but this is not limited to this. For example, the correction parameters may be changed (selected) depending on the position of a person in the space being measured. 【0196】 In detail, the controller 31 determines the location of a person in the measurement target space based on the captured image, etc. Specifically, the controller 31 determines that the location of the person's lowest point is the location of the person. In other words, it determines that the person is present on the plane covered by the lowest point of the person. 【0197】 If the person is on a first specific plane (for example, the bed surface 92a), the controller 31 uses the first correction information to correct the measurement distance of the TOF camera 20 (and the measurement position based on that measurement distance) and calculates the position of each point on the person's surface. On the other hand, if the person is on a second specific plane (for example, the floor surface 91), the controller 31 uses the second correction information to correct the measurement distance of the TOF camera 20 (and the measurement position based on that measurement distance) and calculates the position of each point on the person's surface. 【0198】 According to this modification example, it is possible to obtain the position of each point on a person's surface in a state where it has been well corrected by correction parameters corresponding to the person's location. 【0199】 <Modification 2 of the third embodiment> In the third embodiment and its modifications, the corrected information is obtained based on two specific planes 50, but this is not limited to that. For example, the corrected information may be obtained based on three or more specific planes 50. Also, here, the bed surface 92a and the floor surface 91 are given as examples of specific planes 50, but this is not limited to that. For example, two or more planes from the bed surface 92a, the floor surface 91, and the table surface may be used as specific planes 50. The same applies to other embodiments (such as the fourth and fifth embodiments). 【0200】 <4. Fourth Embodiment> The fourth embodiment is a modification of the third embodiment, etc. The following will focus on explaining the differences from the third embodiment. 【0201】 In the third embodiment, individual correction parameters are generated based on a plurality of specific planes 50, and the measurement distance d (and the measurement position based on the measurement distance d) is corrected based on these individual correction parameters. 【0202】 On the other hand, in the fourth embodiment, a common correction parameter is generated based on a plurality of specific planes 50, and a measurement distance d (and measurement position based on the measurement distance d) is corrected based on the common correction parameter. 【0203】 In a situation similar to that shown in Figure 15, prior to the measurement, the controller 31 calculates correction information for each of the known planes, designating each of them as a specific plane 50. Specifically, the controller 31 performs the processing in steps S11 to S13 with the bed surface 92a as the specific plane 50 (first specific plane) to generate first correction information (first correction parameters k1, Δθ1, ΔH1). Furthermore, the controller 31 performs the processing in steps S11 to S13 with the floor surface 91 as the specific plane 50 (second specific plane) to generate second correction information (second correction parameters k2, Δθ2, ΔH2). 【0204】 Next, the controller 31 pre-generates corrected correction information (prior to the actual measurement) by averaging multiple correction pieces obtained for multiple planes. Specifically, it generates corrected information (also called averaged correction information) by weighting and averaging multiple correction pieces obtained for multiple planes according to the area ratio of those planes. For example, assuming that the area ratio between the first specific plane and the second specific plane is 1:2, the correction parameter k (also called kave) in the averaged correction information is calculated as kave = (k1 + 2 × k2) / 3. Also, the correction parameter Δθ (also called Δθave) in the averaged correction information is calculated as Δθave = (Δθ1 + 2 × Δθ2) / 3, and the correction parameter ΔH (also called ΔHave) in the averaged correction information is calculated as ΔHave = (ΔH1 + 2 × ΔH2) / 3. 【0205】 Then, in the correction process of step S32, the correction process is performed based on these correction parameters kave, Δθave, and ΔHave (corrected correction information). Specifically, the measurement distance (and the measurement position based on said measurement distance) in this measurement is corrected using the corrected correction information. 【0206】 In this embodiment, the same correction parameter is applied to all pixels (all points within the field of view). 【0207】 In this embodiment, correction information is obtained based on multiple specific planes 50, making it possible to effectively correct the measurement distance (and the measurement position based on the measurement distance) based on these multiple specific planes 50. In particular, by using averaged correction information obtained by averaging multiple correction pieces of information relating to multiple planes, it is possible to correct the measurement distance (and the measurement position based on the measurement distance) in a region spanning these multiple planes very easily. 【0208】 By the way, in the case where correction processing is performed using different correction parameters for each specific plane 50, as in the third embodiment, correction is performed using individual correction parameters for each of the two specific planes. As a result, a phenomenon may occur where the corrected measured values ​​(which should be continuous) "jump" at the boundary between the two specific planes (a phenomenon where measured values ​​that should be continuous become discontinuous). For example, the position of a person straddling the planes (for example, a person sitting on the edge of a bed) may become discontinuous at the boundary. 【0209】 In contrast, according to the fourth embodiment, it is possible to avoid discontinuities in the measurement distance (and therefore in the measurement position) (discontinuities in position) when an object (such as a person) spans between planes. 【0210】 <5. Fifth Embodiment> The fifth embodiment is a modification of the third and fourth embodiments, etc. The differences from the fourth embodiment will be explained below. 【0211】 In the fifth embodiment, similar to the fourth embodiment, first correction information (first correction parameters k1, Δθ1, ΔH1) relating to the first specific plane, second correction information (second correction parameters k2, Δθ2, ΔH2) relating to the second specific plane, and averaging correction information (correction parameters kave, Δθave, ΔHave) are determined in advance. 【0212】 In this measurement, the controller 31 corrects the measurement distance (and the measurement position based on said measurement distance) by the TOF camera 20 for a region including at least the first and second planes (for example, the entire region) using averaging correction information until the person being measured has finished moving from the first specific plane (bed surface 92a) to the second specific plane (floor surface 91). In this case, the position of each point on the person's surface is corrected based on the averaging correction information. 【0213】 On the other hand, after the person has finished moving from the first specific plane to the second specific plane, the controller 31 corrects the measured distance d (and the measured position based on said measured distance) by the TOF camera 20 with respect to at least the area including the second specific plane (for example, the area of ​​the floor surface 91 that includes the floor surface 91 to the left of the bed in Figure 15) using the second correction information. In this case, the position of each point on the surface of the person on the second specific plane (the person who is determined to be on the second specific plane) is corrected based on the second correction information. 【0214】 Furthermore, the correction of the first specific plane may be performed using any of the first correction information, the second correction information, or the averaging correction information. 【0215】 With this configuration, it is possible to avoid discontinuities in the measurement distance (and measurement position) until the person has finished moving across the plane from the bed surface 92a to the floor surface 91. Furthermore, after the person has finished moving across the plane, it is possible to measure the distance from the floor surface 91 (height from the floor surface 91, etc.) more accurately. 【0216】 <6. Others> The embodiments of this invention have been described above, but this invention is not limited to those described above. 【0217】 For example, in the first embodiment described above, the processes in steps S11 and S12 are executed in this order, but the process is not limited to this, and may be executed in reverse order (steps S12 and S11). The same applies to steps S11b and S12b. 【0218】 Furthermore, while the third to fifth embodiments mainly illustrate modifications of the first embodiment, the invention is not limited to these, and the second embodiment may also be modified. 【0219】 Furthermore, in each of the above embodiments, three correction parameters k, Δθ, and ΔH are obtained as correction information, but the invention is not limited to this. For example, only the correction parameter k may be obtained as correction information, and the correction process may be performed using only that correction parameter k. 【0220】 Furthermore, in the above embodiments, examples are given in equation (13), etc., where the model function within the error function is a linear function (particularly a linear function having only a slope k (a linear function with zero intercept)), but the invention is not limited to this. For example, the model function within the error function may be a linear function having both a slope k and an intercept. Alternatively, the model function within the error function may be a quadratic function, etc. The parameters of the model function can then be used as correction parameters. However, the parameters Δθ (virtual camera angle adjustment value) and ΔH (virtual camera height adjustment value) in the above embodiments make it easier to intuitively understand the effect of the multipath phenomenon. 【0221】 Furthermore, in each of the above embodiments, the calculation of correction information for the measurement distance measured by the TOF camera 20, and the correction process using said correction information, are performed by a processing unit 30 (specifically, a controller 31) located outside the TOF camera 20, but are not limited to this. For example, all or part of these processes may be performed by a controller 21 or the like located inside the TOF camera 20 (camera unit 20). In other words, the "control means" (a controller, etc., that performs the calculation of correction information and / or the correction process using said correction information) can be located inside and / or outside the TOF camera 20. [Explanation of Symbols] 【0222】 1 System 10. Detection device (distance measuring device) 20 Camera Unit (TOF Camera) 21 Controllers 23 Imaging Unit 24 Lens Optics 25 Lighting Section 27 Drive unit 30 processing units 31 Controllers 50 Specific plane 90 Room 91 Floor surface 92 beds 92a Top of the bed

Claims

[Claim 1] A TOF camera that measures the distance to an object within the camera's field of view, Control means provided inside and / or outside the TOF camera for correcting the measurement distance measured by the TOF camera, Equipped with, The TOF camera is installed with a downward angle, and measures the distance to an object in the measurement target space below the TOF camera. The control means determines, in advance of the main measurement, correction information for the TOF camera based on the theoretical distance from the TOF camera to each point on the specific plane, which is determined according to the theoretical position of each point on the known specific plane, and the measured distance from the TOF camera to each point on the specific plane in a preliminary measurement conducted before the main measurement by the TOF camera, and corrects the measured distance in the main measurement using the correction information. The distance measuring device is characterized in that the theoretical distance is calculated based on the spatial position information of the specific plane, the installation height of the TOF camera, and the depression angle of the TOF camera. [Claim 2] The distance measuring device according to claim 1, characterized in that the specified plane is one of the floor surface, the bed surface, or the table surface within a living room. [Claim 3] The depression angle of the TOF camera can be changed between a predetermined number of angles. The correction information is determined in advance for each of the predetermined number of angles. The distance measuring device according to claim 1, characterized in that the control means corrects the distance measured by the TOF camera in the measurement using correction information corresponding to the angle of the TOF camera at the time of the measurement from among the predetermined number of angles. [Claim 4] The correction information is calculated as a correction parameter to bring the position of each corresponding point, which corresponds to the measured distance measured in the preliminary measurement as the distance from the TOF camera to each point on the specific plane, closer to the theoretical position of each point on the specific plane. The distance measuring device according to claim 1, characterized in that the correction parameter includes a parameter indicating the ratio of the theoretical distance to the measured distance in the preliminary measurement. [Claim 5] The distance measuring device according to claim 4, characterized in that the correction parameter also includes a parameter indicating whether to increase the degree of correction on the near side or the far side in the depth direction of the space to be measured. [Claim 6] The distance measuring device according to claim 1, characterized in that the correction information includes a correction parameter calculated to minimize an error function relating to the difference between the theoretical distance and the measured distance. [Claim 7] The control means is Prior to the measurement described above, correction information is calculated for each plane, with each of the known planes being designated as the specific plane, and corrected correction information is generated in advance by averaging the multiple correction information obtained for the multiple planes. The distance measuring device according to claim 1, characterized in that it corrects the measurement position based on the measurement distance in the measurement using the corrected correction information. [Claim 8] The control means is Prior to the measurement described above, the first correction information, which is the correction information when the first plane is the specified plane, and the second correction information, which is the correction information when the second plane is the specified plane, are calculated in advance. In the aforementioned measurement, With respect to a point on the first plane, the measurement position based on the measurement distance of the TOF camera is corrected using the first correction information. The distance measuring device according to claim 1, characterized in that, with respect to a point on the second plane, the measurement position based on the measurement distance of the TOF camera is corrected using the second correction information. [Claim 9] The control means is Prior to the measurement described above, the first correction information, which is the correction information when the first plane is the specified plane, and the second correction information, which is the correction information when the second plane is the specified plane, are calculated in advance. In the aforementioned measurement, The location of the person in the measurement target space is determined, If the person is on the first plane, the measurement position based on the measurement distance of the TOF camera is corrected using the first correction information to calculate the position of each point on the surface of the person. The distance measuring device according to claim 1, characterized in that, when the person is on the second plane, the measurement position based on the measurement distance of the TOF camera is corrected using the second correction information to calculate the position of each point on the surface of the person. [Claim 10] The control means is Prior to the measurement described above, first correction information is generated in advance, which is the correction information when the first plane, which is the bed surface in the living room, is the specified plane, and second correction information is generated in advance, which is the correction information when the second plane, which is the floor surface in the living room, is the specified plane. In addition, averaged correction information is generated in advance by averaging the first correction information and the second correction information. The distance measuring device according to claim 1, characterized in that, in the measurement described above, until the person to be measured has finished moving from the first plane to the second plane, the measurement position based on the measurement distance of the TOF camera with respect to at least the region including the first plane and the second plane is corrected using the averaging correction information, and after the person has finished moving from the first plane to the second plane, the measurement position based on the measurement distance of the TOF camera with respect to at least the region including the second plane is corrected using the second correction information. [Claim 11] a) In a preliminary measurement using a TOF camera that is installed with a downward angle and measures the distance to an object in the space to be measured below, the steps include obtaining the measurement distance from the TOF camera to each point on a known specific plane, b) A step of obtaining the theoretical distance from the TOF camera to each point on the specific plane, c) A step of pre-determining correction information for the TOF camera based on the measured distance and the theoretical distance, d) A step of acquiring the measurement distance in the measurement using the TOF camera and correcting the measurement distance in the measurement using the correction information, Equipped with, The distance measurement method is characterized in that the theoretical distance is calculated based on the spatial position information of the specific plane, the installation height of the TOF camera, and the depression angle of the TOF camera. [Claim 12] a) In a preliminary measurement using a TOF camera that is installed with a downward angle and measures the distance to an object in the space to be measured below, the steps include obtaining the measurement distance from the TOF camera to each point on a known specific plane, b) A step of obtaining the theoretical distance from the TOF camera to each point on the specific plane, c) A step of pre-determining correction information for the TOF camera based on the measured distance and the theoretical distance, d) A step of acquiring the measurement distance in the measurement using the TOF camera and correcting the measurement distance in the measurement using the correction information, A program that causes a computer to execute, The program is characterized in that the theoretical distance is calculated based on the spatial position information of the specific plane, the installation height of the TOF camera, and the depression angle of the TOF camera. [Claim 13] A TOF camera that measures the distance to an object within the camera's field of view, Control means provided inside and / or outside the TOF camera for correcting the measurement distance measured by the TOF camera, Equipped with, The TOF camera is installed with a downward angle, and measures the distance to an object in the measurement target space below the TOF camera. The control means obtains correction information for the TOF camera in advance of the main measurement, based on the theoretical vertical position, which is the vertical position among the theoretical positions of each point on a known specific plane, and the corresponding vertical position, which is the vertical position of each corresponding point corresponding to the measured distance from the TOF camera to each point on the specific plane in a preliminary measurement conducted prior to the main measurement by the TOF camera, and corrects the measurement position based on the measured distance in the main measurement using the correction information. The aforementioned theoretical vertical position is calculated based on the spatial position information of the specific plane and the installation height of the TOF camera. The distance measuring device is characterized in that the corresponding vertical position is calculated based on the measured distance from the TOF camera to each point on the specific plane in the preliminary measurement and the depression angle of the TOF camera. [Claim 14] a) In a preliminary measurement using a TOF camera that is installed with a downward angle and measures the distance to an object in the space to be measured below, the steps include obtaining the measurement distance from the TOF camera to each point on a known specific plane, b) A step of obtaining the theoretical vertical position, which is the vertical position among the theoretical positions of each point on the specific plane, c) A step of obtaining the corresponding vertical position, which is the vertical position of each corresponding point corresponding to the measured distance from the TOF camera to each point on the specific plane in the preliminary measurement, d) A step of pre-determining correction information for the TOF camera based on the corresponding vertical position and the theoretical vertical position, e) A step of acquiring the measurement distance in the measurement using the TOF camera and correcting the measurement position based on the measurement distance in the measurement using the correction information, Equipped with, The aforementioned theoretical vertical position is calculated based on the spatial position information of the specific plane and the installation height of the TOF camera. The distance measurement method is characterized in that the corresponding vertical position is calculated based on the measured distance from the TOF camera to each point on the specific plane in the preliminary measurement and the depression angle of the TOF camera. [Claim 15] a) In a preliminary measurement using a TOF camera that is installed with a downward angle and measures the distance to an object in the space to be measured below, the steps include obtaining the measurement distance from the TOF camera to each point on a known specific plane, b) A step of obtaining the theoretical vertical position, which is the vertical position among the theoretical positions of each point on the specific plane, c) A step of obtaining the corresponding vertical position, which is the vertical position of each corresponding point corresponding to the measured distance from the TOF camera to each point on the specific plane in the preliminary measurement, d) A step of pre-determining correction information for the TOF camera based on the corresponding vertical position and the theoretical vertical position, e) A step of acquiring the measurement distance in the measurement using the TOF camera and correcting the measurement position based on the measurement distance in the measurement using the correction information, A program that causes a computer to execute, The aforementioned theoretical vertical position is calculated based on the spatial position information of the specific plane and the installation height of the TOF camera. The program is characterized in that the corresponding vertical position is calculated based on the measured distance from the TOF camera to each point on the specific plane in the preliminary measurement and the depression angle of the TOF camera.