Measurement system, processing apparatus, and computer program
The measurement system guides the placement of a reference object relative to the measurement object, allowing for accurate size calculation from a photographed image, addressing the limitations of existing methods that require distance sensors or LiDAR.
Patent Information
- Application Number
- JP2024081501
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-05-20
- Publication Date
- 2025-12-03
AI Technical Summary
Existing methods for measuring the size of an object or space require distance sensors or LiDAR, which are not always available, and even with internet-based methods, the desired size of the target object may not be obtained.
A measurement system and processing device that uses a camera and a processing unit to guide the placement of a reference object relative to the measurement object, allowing the calculation of size from a photographed image using the reference object's dimensions, converting image coordinates into three-dimensional real space coordinates.
Enables easy and accurate measurement of the size of an object or space by guiding the placement of a reference object, facilitating the conversion of image coordinates into three-dimensional real space coordinates, thereby simplifying the measurement process.
Smart Images

Figure 2025175406000001_ABST
Abstract
Description
[Technical Field]
[0001] The present disclosure relates to a measurement system, a processing device, and a computer program. [Background technology]
[0002] When you want to know the size of a space or object in a room, you may not have the tools to measure it, or they may be difficult to use. For example, Japanese Patent Application Laid-Open No. 2023-43090 (hereinafter referred to as Patent Document 1) and Japanese Patent Application Laid-Open No. 2023-23348 (hereinafter referred to as Patent Document 2) disclose methods for measuring size using a mobile terminal. Furthermore, Japanese Patent Application Laid-Open No. 2002-133192 (hereinafter referred to as Patent Document 3) discloses a method that includes receiving digital images of a target object of unknown dimensions and a reference object of known dimensions from a sender via the Internet, and deriving the dimensions of the target object based on the dimensions of the reference object. [Prior art documents] [Patent documents]
[0003] [Patent Document 1] Japanese Patent Application Publication No. 2023-43090 [Patent Document 2] Japanese Patent Application Publication No. 2023-23348 [Patent Document 3] Japanese Patent Application Laid-Open No. 2002-133192 Summary of the Invention
[0004] However, measuring size using the methods disclosed in Patent Documents 1 and 2 requires a distance sensor or LiDAR (Light Detection and Ranging) function. Therefore, if these are not provided, the size cannot be obtained. Furthermore, even with the method disclosed in Patent Document 3, the desired size of the target object may not be obtained. Therefore, one of the objects of the present disclosure is to provide a measurement system, a computing device, and a computer program that can easily measure the size of a measurement target.
[0005] According to one embodiment, a measurement system for obtaining a size of a measurement object from a photographed image of the measurement object includes a camera for obtaining the photographed image, and a processing unit for performing a calculation to obtain the size of the measurement object from the photographed image using the size of a reference object that is placed on the measurement object and photographed together with the measurement object. The processing unit is configured to guide the reference object to be placed at a position required for the calculation relative to the measurement object when the camera photographs the measurement object.
[0006] According to one embodiment, a measurement system for obtaining a size of a measurement object from a photographed image of the measurement object includes a camera for obtaining the photographed image, and a processing unit for performing a calculation to obtain the size of the measurement object from the photographed image using the size of a reference object that is attached to the measurement object and photographed together with the measurement object. The reference object is a planar body. The calculation includes converting coordinates in the photographed image of the measurement object into three-dimensional coordinates in real space using the position and angle of view of the camera, the size of the photographed image, and the size of the reference object.
[0007] According to one embodiment, the processing device is a processing device that performs calculations to obtain the size of the measurement object from a captured image of the measurement object, and is configured to guide the camera to place a reference object at a position required for calculation relative to the measurement object when photographing the measurement object, and to obtain the size of the measurement object from the captured image using the size of the reference object that is placed on the measurement object and photographed together with the measurement object.
[0008] According to one embodiment, the processing device is a processing device that performs a calculation to obtain a size of the measurement object from a captured image of the measurement object, and is configured to obtain the size of the measurement object from the captured image using the size of a reference object that is attached to the measurement object and captured by a camera together with the measurement object. The reference object is a planar body. The calculation includes converting coordinates in the captured image of the measurement object into three-dimensional coordinates in real space using the position and angle of view of the camera, the size of the captured image, and the size of the reference object.
[0009] According to one embodiment, a computer program causes a computer to function as a processing device that performs a calculation to obtain the size of a measurement object from a captured image of the measurement object. The computer program guides the computer to place a reference object at a position required for the calculation relative to the measurement object when the measurement object is photographed by a camera, and causes the computer to obtain the size of the measurement object from the photographed image using the size of the reference object that is placed on the measurement object and photographed together with the measurement object.
[0010] According to one embodiment, the computer program causes a computer to function as a processing device that performs a calculation to obtain the size of the measurement object from a captured image of the measurement object. The computer program causes the computer to obtain the size of the measurement object from the captured image using the size of a reference object that is attached to the measurement object and captured by a camera together with the measurement object. The reference object is a planar body. The calculation includes converting coordinates in the captured image of the measurement object into three-dimensional coordinates in real space using the position and angle of view of the camera, the size of the captured image, and the size of the reference object.
[0011] Further details will be described in the following embodiments. [Brief explanation of the drawings]
[0012] [Figure 1] FIG. 1 is a schematic diagram of a measurement system according to an embodiment. [Figure 2] FIG. 2 is a block diagram showing a schematic configuration of a processing device included in the measurement system. [Figure 3] FIG. 3 is a flowchart showing an example of the processing flow in the processing device. [Figure 4] FIG. 4 is a flowchart showing an example of the flow of the photographing process executed by the processor of the processing device in step S1 of FIG. [Figure 5] FIG. 5 shows a specific example of a display screen and its transition during the photographing process. [Figure 6] FIG. 6 is a flowchart showing an example of the flow of the measurement process executed by the processor of the processing device in step S3 of FIG. [Figure 7] FIG. 7 is a diagram for explaining step S201 of the measurement process. [Figure 8] FIG. 8 is a diagram for explaining step S203 of the measurement process. [Figure 9] FIG. 9 is a diagram for explaining step S205 of the measurement process. [Figure 10] FIG. 10 is a diagram for explaining step S207 of the measurement process. [Figure 11] FIG. 11 is a diagram for explaining step S209 of the measurement process. [Figure 12] FIG. 12 is a diagram for explaining step S211 of the measurement process. [Figure 13] FIG. 13 is a diagram for explaining step S213 of the measurement process. [Figure 14] FIG. 14 is a diagram showing another example of the arrangement of the reference objects. [Figure 15] FIG. 15 is a diagram for explaining step S201 of the measurement process in the second modified example. [Figure 16] FIG. 16 is a diagram for explaining step S203 of the measurement process in the second modified example. [Figure 17] FIG. 17 is a diagram for explaining step S213 of the measurement process in the second modified example. DETAILED DESCRIPTION OF THE INVENTION
[0013] <1. Overview of the measurement system, processing device, and computer program> (1) A measurement system according to an embodiment is a measurement system that obtains the size of a measurement object from a photographed image of the measurement object, and includes a camera for obtaining the photographed image, and a processing unit that performs calculations to obtain the size of the measurement object from the photographed image using the size of a reference object that is attached to the measurement object and photographed together with the measurement object. The processing unit is configured to guide the reference object so that it is placed at a position relative to the measurement object required for calculations when the camera photographs the measurement object.
[0014] Because the processing unit is configured to provide guidance, the user can easily place the reference object at a position relative to the measurement object that is required for calculation by following the guide. By placing the reference object at a position relative to the measurement object that is required for calculation, the processing unit can perform calculations to obtain the size of the measurement object from the captured image. This allows the user to easily measure the size of the measurement object simply by obtaining a captured image in which the reference object is captured together with the measurement object.
[0015] (2) In the measurement system of (1), the guiding by the processing unit preferably includes displaying the position of the reference object relative to the measurement object on a screen displayed when the camera photographs the measurement object. This allows the user to easily place the reference object at a position required for calculation relative to the measurement object by looking at the display on the screen.
[0016] (3) In the measurement system of (1) and (2), the guiding by the processing unit preferably includes allowing the camera to photograph the measurement target when a user operation indicating that the reference object has been placed in a position required for calculation is accepted, thereby urging the user to place the reference object in a position required for calculation relative to the measurement target when photographing.
[0017] (4) In the measurement system of (1) to (3), the guiding by the processing unit preferably includes determining the positional relationship between the reference object obtained from the captured image and the measurement target, and performing a calculation according to the determination result. This allows the processing unit to perform the calculation using a captured image in which the reference object is placed at a position required for the calculation relative to the measurement target.
[0018] (5) In the measurement system of (1) to (4), the guiding by the processing unit preferably includes displaying a photographing frame that contains the reference object and the measurement object on a screen displayed when the camera photographs the measurement object, thereby encouraging the user to place the reference object at a position required for calculation relative to the measurement object when photographing.
[0019] (6) In the measurement system of (1) to (5), preferably, the reference object is a planar body, and the calculation includes converting coordinates in the captured image of the measurement object into three-dimensional coordinates in real space using the position and angle of view of the camera, the size of the captured image, and the size of the reference object, thereby allowing the user to easily measure the three-dimensional size of the measurement object.
[0020] (7) In the measurement system of (6), preferably, the calculation includes calculating a unit vector directed from an origin based on the camera position toward the target point, the unit vector being obtained from the coordinates of the target point in the captured image of the measurement object, the size of the captured image, and the angle of view of the camera. This allows the measurement system to calculate the three-dimensional size of the measurement object using a captured image of the measurement object and a reference object.
[0021] (8) In the measurement system of (7), preferably, the calculation includes calculating a first unit vector pointing from the origin to the first point, a second unit vector pointing from the origin to the second point, and a third unit vector pointing from the origin to the third point, with first to third points of a reference object placed on the measurement target as target points, respectively, and calculating the first vector from the origin to the first point, the second vector from the origin to the second point, and the third vector from the origin to the third point using the first unit vector, the second unit vector, the third unit vector, and the lengths between each of the three points of the reference object. This allows the measurement system to calculate the three-dimensional size of the measurement target using captured images of the measurement target and the reference object.
[0022] (9) In the measurement system of (8), preferably, the calculation includes calculating a vector from the origin to a fourth point on a plane on which the reference object to be measured is placed, using the coordinates of the fourth point in the captured image and the first to third vectors. This allows the measurement system to calculate the three-dimensional size of the measurement object using a captured image in which the reference object is photographed together with the measurement object.
[0023] (10) In the measurement system of (9), preferably, the calculation includes calculating a vector from the origin to a fifth point on a plane opposite to the plane on which the reference object of the measurement target is placed, using the coordinates of the fifth point in the captured image, the first vector, and the second vector. This allows the measurement system to calculate the three-dimensional size of the measurement target using the captured image in which the reference object is captured together with the measurement target.
[0024] (11) A measurement system according to an embodiment obtains the size of a measurement object from a captured image of the measurement object, and includes a camera for obtaining the captured image and a processing unit that performs calculations to obtain the size of the measurement object from the captured image using the size of a reference object photographed together with the measurement object by being installed on the measurement object. The reference object is a planar body. The calculations include converting coordinates in the captured image of the measurement object into three-dimensional coordinates in real space using the position and angle of view of the camera, the size of the captured image, and the size of the reference object. This allows a user to easily measure the three-dimensional size of the measurement object simply by obtaining a captured image of the reference object together with the measurement object.
[0025] (12) A processing device according to an embodiment is a processing device that performs a calculation to obtain the size of a measurement object from a captured image of the measurement object, and is configured to guide a reference object to be placed at a position relative to the measurement object required for the calculation when the measurement object is photographed with a camera, and to obtain the size of the measurement object from the captured image using the size of the reference object photographed together with the measurement object by placing it on the measurement object. This allows a user to easily measure the size of the measurement object by using a measurement system including the processing device, simply by obtaining a photographed image of the reference object together with the measurement object.
[0026] (13) A processing device according to an embodiment performs a calculation to obtain the size of a measurement object from a captured image of the measurement object. The processing device is configured to be installed on the measurement object and to obtain the size of the measurement object from the captured image using the size of a reference object captured by a camera together with the measurement object. The reference object is a planar body. The calculation includes converting coordinates in the captured image of the measurement object to three-dimensional coordinates in real space using the position and angle of view of the camera, the size of the captured image, and the size of the reference object. This allows a user to easily measure the three-dimensional size of the measurement object by using a measurement system including the processing device, simply by obtaining a captured image of the reference object together with the measurement object.
[0027] (14) A computer program according to an embodiment is a computer program that causes a computer to function as a processing device that performs a calculation to obtain the size of a measurement object from a captured image of the measurement object. The computer program guides the computer to place a reference object at a position relative to the measurement object required for the calculation when the measurement object is photographed by a camera, and causes the computer to obtain the size of the measurement object from the captured image using the size of the reference object photographed together with the measurement object by placing it on the measurement object. This allows a user to easily measure the size of the measurement object by using a measurement system including the processing device, simply by obtaining a photographed image of the reference object together with the measurement object.
[0028] (15) A computer program according to an embodiment causes a computer to function as a processing device that performs a calculation to obtain the size of a measurement object from a captured image of the measurement object. The computer program causes the computer to obtain the size of the measurement object from the captured image using the size of a reference object that is attached to the measurement object and captured by a camera together with the measurement object. The reference object is a planar body. The calculation includes converting coordinates in the captured image of the measurement object into three-dimensional coordinates in real space using the position and angle of view of the camera, the size of the captured image, and the size of the reference object. This allows a user to easily measure the three-dimensional size of the measurement object by using a measurement system including the processing device, simply by obtaining a captured image of the reference object together with the measurement object.
[0029] 2. Examples of measurement systems, processing devices, and computer programs [System Overview] FIG. 1 is a schematic diagram of a measurement system 100 according to an embodiment. The measurement system 100 obtains the size of the measurement object 200 from a captured image IM of the measurement object 200. The measurement object 200 is two-dimensional or more, for example, three-dimensional. The measurement object 200 may be a three-dimensional space or a three-dimensional object. The size of the measurement object 200 obtained by the measurement system 100 may be one-dimensional, i.e., length, or may be two-dimensional or more. For example, the size of the measurement object 200 obtained by the measurement system 100 is a three-dimensional size of width [mm], depth [mm], and height [mm]. The measurement system 100 is expected to be used to measure the size of the measurement object 200, such as the length, width and depth, or width, depth, and height, of a space that is a candidate for storing furniture or home appliances.
[0030] The measurement system 100 includes a processing device 10 and a camera 13. The processing device 10 and the camera 13 may be an integrated device. In this case, the measurement system 100 may be, for example, a smartphone equipped with a camera. The processing device 10 and the camera 13 may be separate devices connected by wire or wirelessly. In this case, the processing device 10 may be a computer or terminal device connected to the camera 13 by wire or wirelessly, or may be a server capable of communicating with the camera 13 via a communication network such as the Internet. The processing device 10 may be partly included in a device equipped with the camera 13 and partly in a device different from the camera 13. In this case, the processing by the processing device 10 described below may be performed in cooperation with multiple devices, including a device equipped with the camera 13 and a device different from the camera 13.
[0031] The measurement system 100 uses the camera 13 to capture a captured image IM of the measurement target 200 located within the capture range S. A reference object 300 is placed on the measurement target 200, so that the reference object 300 is captured along with the measurement target 200. Therefore, the captured image IM captured by the camera 13 includes both the measurement target 200 and the reference object 300. The processing device 10 performs a calculation to obtain the size of the measurement target 200 from the captured image IM acquired by the camera 13 using the size of the reference object 300. The reference object 300 is a planar object. The calculation by the processing device 10 includes converting the coordinates of the measurement target 200 in the captured image IM into three-dimensional coordinates in real space using the position and angle of view of the camera 13, the size of the captured image IM, and the size of the reference object 300. Furthermore, when capturing an image with the camera 13, the processing device 10 guides the reference object 300 so that it is placed at a position required for the calculation relative to the measurement target 200.
[0032] [Coordinate system in real space] For calculation purposes, the processing device 10 sets the position of the camera 13 as the origin O (0,0,0) in real space. The processing device 10 sets a coordinate system for the real space to calculate the size. In the coordinate system, the shooting direction of the camera 13 is the Z-axis direction. In the Z-axis direction, the direction away from the camera 13 is defined as the positive direction (+Z direction) and the direction toward the camera 13 is defined as the negative direction (-Z direction). Furthermore, in the coordinate system, the Z-axis direction in real space is defined as the normal, and two orthogonal directions on a virtual plane including the shooting range S are defined as the X-axis direction and the Y-axis direction. In the example of FIG. 1, the Y-axis direction is the up-down direction, with downward being the positive direction (+Y direction) and upward being the negative direction (-Y direction). Also, in the example of FIG. 1, the X-axis direction is the left-right direction, with the right direction facing the +Z direction being the positive direction (+X direction) and the left direction being the negative direction (-X direction).
[0033] [Measurement target] Measurement target 200 has bottom surface 201 and opposite top surface 202. In the example of Fig. 1, bottom surface 201 is rectangular. The direction of one pair of sides of rectangular bottom surface 201 is the depth direction, and the direction of the other pair of sides is the width direction.
[0034] Of the two points at both ends of the side that coincides with the depth direction of the bottom surface 201, the one with the smaller Z coordinate is designated as point P1, and the one with the larger Z coordinate is designated as point Q1. Of the two points at both ends of the side that coincides with the width direction of the bottom surface 201, the one with the larger X coordinate is designated as point Q2 when point P1 is the one with the smaller X coordinate. In addition, point Q3 is set on the top surface 202 of the measurement target 200. When reference object 300, which is a rectangle ABCD, is placed on the bottom surface 201 in a manner described below, side BQ2 is perpendicular to rectangle ABCD.
[0035] [Reference object] The size of the reference object 300 is input to the processing device 10. Preferably, the reference object 300 is a flat polygonal object with four or more vertices, and more preferably a flat rectangular object. In this case, the lengths of the vertical and horizontal sides of the reference object 300 are input to the processing device 10.
[0036] The reference object 300 is, for example, a piece of paper of a size specified by an international standard or a piece of paper of a known size, such as a banknote. In this case, the processing device 10 may store in advance the size of the paper or piece of paper used as the reference object 300, or may store a plurality of sizes and accept a selection of the size of the photographed reference object 300 from among them. In the example of Fig. 1, the reference object 300 is a rectangle ABCD having vertices A, B, C, and D, and the processing device 10 stores a length L of the side AB. AB [mm], length of side BC L BC [mm] and the length of side CA L CA [mm] is entered.
[0037] [Setting the reference object] When measuring the size of the measurement target 200 using the measurement system 100, the user places the reference object 300 relative to the measurement target 200 at a position required for calculation by the processing device 10. The position required for calculation by the processing device 10 is a position where the reference object 300 is on the same plane as the bottom surface 201 of the measurement target 200 and where the positional relationship of the reference object 300 with respect to the measurement target 200 on the above-mentioned plane can be identified in the processing device 10. As an example, as shown in FIG. 1 , the user places the reference object 300 on the bottom surface 201 of the measurement target 200 so that the side AB coincides with one side of the measurement target 200. When photographing with the camera 13, the processing device 10 guides the reference object 300 so that it is placed at a position required for calculation relative to the measurement target 200.
[0038] [Processing equipment] The processing device 10 performs a calculation to obtain the size of the measurement target 200 from the captured image IM using the size of the reference object 300. When the measurement target 200 is a three-dimensional space or object, the processing device 10 performs a calculation to obtain the three-dimensional size of the width, depth, and height of the measurement target 200. In the example of FIG. 1, the length between points P2 and Q2 is width x [mm], the length between points P1 and Q1 is depth z [mm], and the length between points B and Q3 is height y [mm]. Therefore, the calculation to obtain the size of the measurement target 200 includes obtaining the three-dimensional coordinates in real space of at least points B, P1, P2, Q1, Q2, and Q3.
[0039] 2 is a block diagram showing a schematic configuration of the processing device 10. As an example, the processing device 10 is configured by a computer having a processor 11 and a memory 12, or by a single computer and its peripheral devices. The processing device 10 may also be realized by multiple computers working together. The processing device 10 further includes an operation unit 14 for receiving user operations, and a display 15. The operation unit 14 and the display 15 may form a touch panel.
[0040] The processor 11 is, for example, a CPU (Central Processing Unit). The memory 12 includes, for example, a ROM (Read Only Memory) and a RAM (Random Access Memory). The memory 12 stores an imaging program 121 and a measurement program 122 to be executed by the processor 11. The imaging program 121 and the measurement program 122 may be different programs, may be a single program, or may be included as modules in a single program. The imaging program 121 and the measurement program 122 may both be provided by being recorded on a recording medium or via a communication line such as the Internet.
[0041] The processor 11 executes a photography program 121 to perform photography processing 111. The photography processing 111 refers to processing for photographing with the camera 13. The photography processing 111 includes processing for realizing the above-mentioned guide. The photography program 121 may use at least a part of a photography program already installed in the processing device 10. The photography processing 111 will be described later.
[0042] The processor 11 executes the measurement program 122 to perform the measurement process 112. The measurement process 112 refers to a process for obtaining the size of the measurement target 200 from the captured image IM using the size of the reference object 300. The measurement process 112 includes converting the coordinates of the measurement target 200 in the captured image IM into three-dimensional coordinates in real space using the position and angle of view of the camera 13, the size of the captured image IM, and the size of the reference object 300. The measurement process 112 will be described later.
[0043] 3 is a flowchart showing an example of the processing flow in the processing device 10. The processor 11 starts the photographing process 111 (step S1) when the operation unit 14 receives a user operation to start photographing for obtaining the size of the measurement target 200 (YES in step S0).
[0044] Thereafter, the processor 11 starts the measurement process 112 (step S3) when the operation unit 14 accepts a user operation to start a process for obtaining the size of the measurement object 200 (YES in step S2).
[0045] Once the size of the measurement object 200 is obtained, the processor 11 preferably displays the size of the measurement object 200 on the display 15 (step S4). This allows the user to easily know the size of the measurement object 200 using the measurement system 100.
[0046] If the processing device 10 is realized by multiple computers working together, the imaging program 121 and the measurement program 122 may be stored in different computers and the imaging process 111 and the measurement process 112 may be executed by different computers. In this case, step S3 in Fig. 3 does not have to be performed immediately after step S1, and may be performed at a different timing from step S1. In other words, the processing device 10 may perform the measurement process 112 using captured images that have already been captured and stored in memory.
[0047] [Photography processing] Fig. 4 is a flowchart showing an example of the flow of the photographing process 111 executed by the processor 11 of the processing device 10 in step S1 of Fig. 3. Fig. 5 shows a specific example of the display screen of the display 15 in the photographing process 111 and its transition.
[0048] In the photographing process 111, the processor 11 sets the camera 13 (step S101). In step S101, settings are made necessary to obtain the angle of view θ of the camera 13 used in the process for obtaining the size of the measurement target 200 in the measurement process 112. As an example, in step S101, the processor 11 causes the display 15 to display the display screen 501 of FIG. 5. The display screen 501 has a field 51 for inputting the model of the terminal device (e.g., a smartphone) equipped with the camera 13. The field 51 may accept a selection from a plurality of pre-stored models. In step S101, the processor 11 sets the angle of view pre-stored for the model of the terminal device input on the display screen 501. The display screen 501 may also accept an input of the type of lens, whether it is a wide-angle or ultra-wide-angle lens.
[0049] In step S101, as another example, if the measurement system 100 is an apparatus in which the camera 13 and the processing device 10 are integrated, the processor 11 may read pre-stored information of the camera 13 from memory. In step S101, as yet another example, the processing device 10 may communicate with the camera 13 and automatically read the information.
[0050] In the photographing process 111, the processor 11 sets the size of the reference object 300 (step S103). As an example, in step S103, the processor 11 causes the display 15 to display the display screen 502 of FIG. 5. The display screen 502 has a field 52 for inputting information (e.g., the type of the ticket) from which the size of the ticket to be used as the reference object 300 is obtained. The field 51 may accept a selection from multiple types of ticket that are pre-stored. In step S103, the processor 11 sets a pre-stored size for the type of ticket that is input on the display screen 502. As another example, in step S103, the processor 11 may accept input of the size of the reference object 300 from the operation unit 14. Note that the order of steps S101 and S103 may be reversed.
[0051] In the photographing process 111, the processor 11 permits the camera 13 to photograph after receiving a user operation indicating that preparations for photographing are complete and a user operation indicating that preparations for photographing are complete (YES in step S105 and YES in step S107). When the processor 11 receives a user operation instructing the camera 13 to photograph while photographing by the camera 13 is permitted (YES in step S109), the processor 11 causes the camera 13 to photograph (step S111). The photographed image obtained in step S111 is stored in the memory 12 as a photographed image IM to be used in the measurement process 112.
[0052] In step S105, the processor 11, for example, causes the display 15 to display the display screen 503 of FIG. 5 . The display screen 503 includes a guide 53 on how to set the reference object 300 relative to the measurement target 200. The guide 53 may be displayed in the form of text, or may display the position of the reference object 300 relative to the measurement target 200 using an image such as a frame or an arrow. Furthermore, if the processing device 10 has a speaker, the guide 53 may be an audio guide instead of or in addition to the display on the display screen 503. Preferably, the guide 53 includes a check box 53A, and the check box 53A accepts a user operation indicating that the reference object 300 has been set according to the guide 53.
[0053] Preferably, the display screen 503 includes a guide 54 for the orientation of the camera 13 relative to the measurement target 200. The guide 54 may be displayed in the form of text, or may display an image showing the orientation of the camera 13 relative to the measurement target 200. If the processing device 10 has a speaker, the guide 54 may be an audio guide instead of or in addition to the display on the display screen 503. More preferably, the guide 54 includes a check box 54A, and the check box 54A accepts a user operation indicating that the camera 13 has been oriented in accordance with the guide 54. In step S105, the processor 11 accepts a user operation indicating that preparations for shooting are complete by accepting checks in the check boxes 53A and 54A.
[0054] In step S105, as another example, the processor 11 may analyze the image input from the camera 13 to determine the installation state of the reference object 300. For example, the processor 11 may perform image processing to detect edges from the image input from the camera 13, thereby detecting each vertex of the bottom surface 201 of the measurement target 200 and vertices A, B, C, and D of the reference object 300, and determining the positional relationship between them to determine the installation state of the reference object 300. In yet another example, in step S105, the processor 11 may accept an operation by the operation unit 14 to specify a vertex for the image input from the camera 13, and determine the positional relationship between the specified each vertex of the bottom surface 201 of the measurement target 200 and vertices A, B, C, and D of the reference object 300 to determine the installation state of the reference object 300. Similarly, in step S105, the processor 11 may analyze the image input from the camera 13 or accept an operation by the operation unit 14 to specify a vertex for the image input from the camera 13 to determine the orientation of the camera 13.
[0055] In step S107, the processor 11 causes the display 15 to display, as an example, the display screen 504 of FIG. 5 . The display screen 504 includes an area 55 for displaying an image captured by the camera 13, and a capturing frame 55A indicating the capturing range is displayed in the area 55. The processor 11 uses a processing range corresponding to the range within the capturing frame 55A of the image IM captured by the camera 13 for the measurement process 112. The processing range refers to a range that is not affected by or is only slightly affected by distortion aberration of the camera 13, and is, for example, a range of approximately 90% inside the captured image IM. In this case, the capturing frame 55A is displayed at a position approximately 10% from the outside of the area 55 indicating the capturing range. More preferably, the processing range is a range of approximately 75% to 80% inside the captured image IM. In this case, the capturing frame 55A is displayed at a position approximately 15% to 20% from the outside of the area 55 indicating the capturing range. Alternatively, processor 11 may store in advance the position of photographing frame 55A corresponding to the type of camera 13 or the model of the terminal device equipped with camera 13, and in step S107 display photographing frame 55A at the position corresponding to the setting in step S101. This allows processor 11 to use, in measurement process 112, a photographed image that is not affected by distortion of camera 13 or that has a relatively small range, thereby improving the accuracy of the obtained size.
[0056] Preferably, the display screen 504 further includes a guide 56 for the shooting range of the camera 13. The guide 56 prompts the user to place the reference object 300 and the measurement target 200 in the shooting frame 55A, and one example of the guide is text indicating this. More preferably, the guide 56 includes a check box 56A, and the check box 56A accepts a user operation indicating that the reference object 300 and the measurement target 200 have been placed in the frame 55A in accordance with the guide 56. This prompts the user to shoot with the reference object 300 and the measurement target 200 placed in the shooting frame 55A, and enables the measurement process 112 to use a shot image that is not affected by or has a relatively small effect from the distortion aberration of the camera 13.
[0057] As another example, in step S107, the processor 11 may analyze the image input from the camera 13 and determine that the reference object 300 and the measurement object 200 are within the imaging frame 55A. For example, the processor 11 may perform image processing to detect edges from the image input from the camera 13 to detect each vertex of the bottom surface 201 of the measurement object 200 and vertices A, B, C, and D of the reference object 300, and compare these points with the imaging frame 55A to determine that the reference object 300 and the measurement object 200 are within the imaging frame 55A. As yet another example, in step S107, the processor 11 may accept an operation by the operation unit 14 to specify a vertex for the image input from the camera 13, and compare the specified each vertex of the bottom surface 201 of the measurement object 200 and vertices A, B, C, and D of the reference object 300 with the imaging frame 55A to determine that the reference object 300 and the measurement object 200 are within the imaging frame 55A.
[0058] By performing the above-described photographing process 111, when using the measurement system 100, the user can easily set the reference object 300 at a position required for calculation relative to the measurement target 200 by following the guide 53. Furthermore, by setting the reference object 300 at a position required for calculation relative to the measurement target 200, the processing in the measurement process 112, which will be described later, can be facilitated. As a result, the accuracy of the size of the measurement target 200 obtained by the measurement system 100 can be improved. Furthermore, by placing the reference object 300 at an appropriate position relative to the measurement target 200, the three-dimensional size of the measurement target 200 can be obtained in the measurement process 112.
[0059] [Measurement processing] Fig. 6 is a flowchart showing an example of the flow of the measurement process 112 executed by the processor 11 of the processing device 10 in step S3 of Fig. 3. Figs. 7 to 13 are diagrams for explaining each step of the measurement process 112.
[0060] In the measurement process 112, the processor 11 reads out the captured image IM from the memory 12 (step S201). FIG. 7 shows a coordinate system in the captured image IM. As shown in FIG. 7, the processor 11 sets the size of the captured image IM as a vertical H [pixels] and a horizontal W [pixels], and sets one point on the captured image IM (for example, the upper left vertex) as the origin Oc(0,0). The processor 11 sets a coordinate system in which the direction (for example, the horizontal direction) that coincides with a side in one direction (a horizontal side) is the ξ axis, and the direction (for example, the vertical direction) that coincides with a side in the other direction (a vertical side) is the η axis. The captured image IM is set up by a coordinate system in which points A, B, C, D, P1, P2, Q1, Q2, and Q3 in the real space are represented by points A, B, C, D, P1, P2, Q1, Q2, and Q3. c ,B c ,C c ,D c ,P 1c ,P 2c ,Q 1c ,Q 2c ,Q 3c Includes.
[0061] (S203: Determining vertex coordinates on the captured image) The processor 11 determines the coordinates of the vertices on the captured image IM (step S203). c ,B c ,C c ,D c ,P 1c ,P 2c ,Q 1c ,Q 2c ,Q 3c The coordinates in the captured image IM are determined.
[0062] In step S203, the processor 11 analyzes the captured image IM to determine the point A c ,B c ,C c ,D c ,P 1c ,P 2c ,Q 1c ,Q 2c ,Q 3c For example, the processor 11 may detect an edge from the captured image IM by image processing, thereby determining the coordinates of point A c ,B c ,Cc ,D c ,P 1c ,P 2c ,Q 1c ,Q 2c ,Q 3c As another example, the processor 11 may display the captured image IM on the display 15 and allow the user to input a point A c ,B c ,C c ,D c ,P 1c ,P 2c ,Q 1c ,Q 2c ,Q 3c These coordinates may be determined by accepting an operation to specify the coordinates.
[0063] 8 shows an example of the relationship between the coordinates of each point in the real space and the coordinates of the corresponding point in the captured image IM. In step S203, the processor 11 calculates the coordinates of the point A(x A ,y A ,z A ),B(x B ,y B ,z B ),C(x C ,y C ,z C ),D(x D ,y D ,z D ),P1(x P1 ,y P1 ,z P1 ),Q1(x Q1 ,y Q1 ,z Q1 ),P2(x P2 ,y P2 ,z P2 ),Q2(x Aq2 , AQq2 , AQq2 ),Q3(x Qq3 ,y Qq3 ,z Qq3 ) and the coordinates A of the corresponding points in the captured image IM. c (ξ Ac ,η Ac ),B c (ξ Bc ,η Bc ), Cc (ξ Cc ,η Cc ),D c (ξ Dc ,η Dc ),P 1c (ξ P1c ,η P1c ),Q 1c (ξ Q1c ,η Q1c ),P 2c (ξ P2c ,η P2c ),Q 2c (ξ Qq2c ,η Q2c ),Q 3c (ξ Qq3c ,η Q3c ) to determine
[0064] (S205: Calculation of horizontal and vertical angles of view) The processor 11 calculates the horizontal angle of view θ from the angle of view θ of the camera 13. h and vertical angle of view θ v (step S205). As an example, the processor 11 stores the angle of view for each model of camera. The processor 11 reads out the angle of view θ stored for the model of camera 13 set in step S101 of FIG. 4.
[0065] Figure 9 shows the angle of view θ and horizontal angle of view θ h and vertical angle of view θ v and the outline of the calculation in step S205. h Equation (2) is an example of a conversion formula for converting the angle of view θ into the vertical angle of view θ v is an example of a conversion formula for converting
[0066] The measurement program 122 causes the processor 11 to perform calculations in accordance with the conversion formulas (1) and (2) in Fig. 9. In step S205, the processor 11 substitutes the angle of view θ of the camera 13 into formula (1) in Fig. 9 to obtain the horizontal angle of view θ h Then, the angle of view θ is substituted into equation (2) in Figure 9 to obtain the vertical angle of view θ v get.
[0067] 9 are conversion formulas when the aspect ratio of camera 13 is 4:3. Processor 11 may store conversion formulas corresponding to a plurality of types of aspect ratios in advance, and select and use a conversion formula corresponding to the type of camera 13 in step S205.
[0068] (S207: Calculation of unit vector) The processor 11 calculates unit vectors e(A), e(B), e(C), e(D), e(P1), e(P2), e(Q1), e(Q2), and e(Q3) for vectors V(OA), V(OB), V(OC), V(OD), V(OP1), V(OP2), V(OQ1), V(OQ2), and V(OQ3) from the origin O in real space to points A, B, C, D, P1, P2, Q1, Q2, and Q3 (step S207). Note that in this description, V(OX) refers to the vector from point O to point X, and e(X) refers to the unit vector of V(OX).
[0069] In step S207, the processor 11 determines the point A c ,B c ,C c ,D c ,P 1c ,P 2c ,Q 1c ,Q 2c ,Q 3c coordinates, the size of the captured image IM (vertical H [pixels], horizontal W [pixels]), and the horizontal angle of view θ calculated in step S205 h and vertical angle of view θ v The components of each unit vector are calculated using
[0070] Figure 10 shows the point A in the captured image IM. c 10 is an expression of the vector V(OA) using the unit vector e(A), and indicates that the vector V(OA) is obtained by multiplying the unit vector e(A) by a coefficient k. The arrow V1 in FIG. 10 indicates the direction from the origin O to the point A c Vector V(OA c ) component (x eA ,yeA ,z eA ) [pix], and arrow V2 points to point A c is expressed in the coordinate system of the captured image IM.
[0071] Equation (4) is the vector V(OA c ) in the coordinate system of the captured image IM, and c ) is the x-component of point A c The ξ component of (ξ Ac The point Ooc is the center point of the captured image IM. Equation (5) expresses the vector V(OA c ) in the coordinate system of the captured image IM, and the vector V(OA c ) is the y component of point A c η component of (η Ac Equation (6) shows that the vector V(OA c ) in the coordinate system of the captured image IM, and the ξ component (W / 2 [pix]) of point Ooc is expressed as the horizontal angle of view (θ h / 2[pix]) is obtained by dividing the vector V(OA c The z component of the point Ooc is calculated by multiplying the η component (H / 2 [pix]) of the point Ooc by the vertical angle of view θ v It may be obtained by the formula using
[0072] Equation (7) converts the unit vector e(A) into a vector V(OA c ) is an equation expressed in x, y, and z components, and the unit vector e(A) is a vector V(OA c ) is normalized to a magnitude of 1, that is, by converting the unit from pix to mm, it can be obtained as a vector in real space coordinates.
[0073] The measurement program 122 causes the processor 11 to perform calculations according to the equations (4), (5), and (6). In step S207, the processor 11 adds point A cThe ξ component of (ξ Ac [pix]) and the size of the captured image IM (W [pix]) to obtain the vector V(OA c ) x component (x eA [pix]). The processor 11 also calculates the point A c η component of (η Ac Substituting the size of the captured image IM (H [pix]) and the vector V(OA c )'s y component (y eA Furthermore, the processor 11 calculates the horizontal angle of view θ [pix] by adding the size (W [pix]) of the captured image IM and the horizontal angle of view θ calculated in step S205 to the equation (6). h Substituting and, the vector V(OA c ) z component (z eA The processor 11 calculates the unit vector e(A) by substituting the equations (4) to (6) into the equation (7).
[0074] In step S207, processor 11 performs the above calculations for each of points A, B, C, D, P1, P2, Q1, Q2, and Q3 to calculate unit vectors e(A), e(B), e(C), e(D), e(P1), e(P2), e(Q1), e(Q2), and e(Q3).
[0075] (S209: Calculation of vectors to each vertex of the reference object) Processor 11 calculates vectors V(OA) (first vector), V(OB) (second vector), and V(OC) (third vector) from origin O to vertices A, B, and C, which are the first to third points of reference object 300 (step S209). Vectors V(OA), V(OB), and V(OC) are expressed by the following equations (3), (8), and (9) using unit vectors e(A) (first unit vector), e(B) (second unit vector), and e(C) (third unit vector), respectively. In step S209, processor 11 calculates coefficients k, l, and m of equations (3), (8), and (9) to calculate vectors V(OA), V(OB), and V(OC). V(OA)=k×e(A) ...Equation (3) V(OB)=l×e(B) ...Equation (8) V(OC)=m×e(C) ...Equation (9)
[0076] The magnitude of vector V(AB) is d AB , the magnitude of vector V(BC) is d BC , and the magnitude d of the vector V(CA) CA is the length L of the side AB of the reference object 300 set in step S103 of FIG. AB [mm], length of side BC L BC [mm] and the length of side CA L CA In this example, the reference object 300 is rectangular, so the length L of the side CA is CA [mm] is the length L of side AB AB [mm], and the length L of side BC BC The length of side CA is calculated using the formula (12) below. CA The equation (12) used to obtain [mm] is one that corresponds to the shape of the reference object 300. d AB =L AB …Formula (10) d BC =L BC …Formula (11) d CA =√(L AB 2 +L BC 2 ) …Equation (12)
[0077] FIG. 11 shows an outline of the calculation in step S209. Equation (13) in FIG. 11 shows the relationship between vector V(AB) and vectors V(OA) and V(OB). Equation (14) is obtained by expanding equation (13) and shows the relationship between the magnitude of vector V(AB) and vectors V(OA) and V(OB). Equation (15) is obtained by substituting equations (3) and (8) into equation (14) and shows the relationship between the magnitude of vector V(AB) and coefficients k and l and unit vectors e(A) and e(B). Equation (16) is obtained by substituting equation (15) for the angle θ between vectors V(OA) and V(OB). AB The equation is expressed using the magnitude of the vector V(AB), the coefficients k and l, and the angle θ ABThis is an equation showing the relationship between
[0078] Equation (17) is an equation obtained by expanding the vector V(BC) in the same way as equations (13) to (16), and is the magnitude of the vector V(BC), the coefficients l and m, and the angle θ between the vectors V(OB) and V(OC). BC Equation (18) is an equation obtained by expanding the vector V(CA) in the same way as equations (13) to (16), and it shows the relationship between the magnitude of the vector V(CA), the coefficients k and m, and the angle θ between the vectors V(OC) and V(OA). CA This is an equation showing the relationship between
[0079] Equation (19) is obtained by solving equation (16) for k, and is given by the coefficients k and l, the magnitude of the vector V(AB), and the angle θ AB Equation (20) is an equation obtained by solving equation (17) for m, and it is based on the coefficients k and l, the magnitude of the vector V(AB), and the angle θ AB Equation (21) is obtained by adding equation (17) to equation (16) and subtracting equation (18), and is a formula that shows the relationship between the coefficients k, l, m, coefficient l, the magnitude of the vectors V(AB), V(BC), and V(CA), and the angle θ AB , angle θ BC , angle θ CA This is an equation showing the relationship between
[0080] The measurement program 122 causes the processor 11 to perform a calculation according to the equation (19). In step S209, the processor 11 adds the magnitude d of the vector V(AB) to the equation (19). AB , and angle θ AB By substituting the above, the relationship between the coefficients k and l for two patterns, that is, for the + case and the - case in equation (19), is obtained. Furthermore, the measurement program 122 causes the processor 11 to execute a calculation according to equation (20). In step S209, the processor 11 substitutes the magnitude d of the vector V(BC) into equation (20). BC , and angle θ BC By substituting the above, the relationship between the coefficients l and m for the two patterns of + and - in equation (20) can be obtained.
[0081] The measurement program 122 causes the processor 11 to execute a calculation according to equation (21). In step S209, the processor 11 obtains the coefficient l by substituting all combinations of the relationship between the two patterns of coefficients k and l obtained from equation (19) and the relationship between the two patterns of coefficients l and m obtained from equation (20) into equation (21). At this time, based on the setting of equation (8), the processor 11 sets the coefficient l to a value greater than 0 (l>0). Furthermore, because the coefficients k and m are real numbers, the processor 11 sets the coefficient l to a value that satisfies equation (22) in FIG. 11.
[0082] Processor 11 obtains coefficients k and m by substituting coefficient l obtained from equation (21) into equations (19) and (20). Processor 11 obtains vectors V(OA), V(OB), and V(OC) by substituting the obtained coefficients k, l, and m and unit vectors e(A), e(B), and e(C) calculated in step S209 into equations (3), (8), and (9).
[0083] (S211: Calculation of vectors to each point on the bottom surface of the object to be measured) Processor 11 calculates vectors V(OP1), V(OP2), V(OQ1), and V(OQ2) from origin O to points P1, P2, Q1, and Q2, which are fourth points on bottom surface 201 of measurement target 200 on which reference object 300 is placed (step S211). Fig. 12 shows an outline of the calculations in step S211. Equation (23) in Fig. 12 expresses vector V(OP) from origin O to point P on bottom surface 201 using unit vector e(P), and indicates that vector V(OP) is obtained by multiplying unit vector e(P) by coefficient s.
[0084] Since the reference object 300 is a point on the bottom surface 201 of the measurement target 200 on which it is placed, the vector V(OP) is expressed as vectors V(OA), V(AB), and V(AC). Equation (24) expresses the vector V(OP) as vectors V(OA), V(AB), and V(AC), and indicates that the vector V(OP) is obtained by adding the vector V(OA), the vector V(AB) multiplied by the coefficient α, and the vector V(AC) multiplied by the coefficient β.
[0085] Equation (25) is obtained by substituting equation (23) for vector V(OP) in equation (24) and expressing vectors V(AB) and V(AC) as vectors (OA), (OB), and (OC). Equations (26), (27), and (28) are obtained by substituting equation (25) for the components (x ep ,y ep ,z ep ) is an equation expressed for each
[0086] The measurement program 122 causes the processor 11 to perform calculations in accordance with equations (26), (27), and (28). In step S211, the processor 11, for each point on the bottom surface 201, substitutes the components of the unit vector calculated in step S207 and the components of the vectors V(OA), V(OB), and V(OC) calculated in step S209 into equations (26), (27), and (28), respectively, to obtain a system of simultaneous equations with coefficients s, α, and β. The processor 11 solves the system of simultaneous equations with the obtained coefficients s, α, and β to obtain the coefficient s. The processor 11 substitutes the coefficient s obtained for each of points P1, P2, Q1, and Q2 into equation (23) for each point to obtain vectors V(OP1), V(OP2), V(OQ1), and V(OQ2).
[0087] (S213: Calculation of vector to point on the top surface of the measurement object) Processor 11 calculates vector V(OQ3) from origin O to point Q3, which is a fifth point on the surface (top surface 202) opposite bottom surface 201 of measurement target 200 on which reference object 300 is placed (step S213). Figure 13 shows an overview of the calculation in step S213. Equation (29) in Figure 13 expresses vector V(OQ3) using unit vector e(Q3), and indicates that vector V(OQ3) is obtained by multiplying unit vector e(Q3) by coefficient t.
[0088] Since reference object 300 is placed on bottom surface 201 of measurement target 200, vector V(BQ3) is perpendicular to vector V(AB). Equation (30) indicates that the product of vector V(BQ3) and vector V(AB) is 0. Equation (31) is obtained by expressing equation (30) as vectors V(OQ3), V(OA), and V(OB) and substituting equation (29) for vector V(OQ3). Equation (32) is an equation representing coefficient t obtained by expanding equation (31).
[0089] Furthermore, since reference object 300 is placed on bottom surface 201 of measurement target 200, vector V(BQ3) is also orthogonal to vector V(BC). Equation (33) indicates that the product of vector V(BQ3) and vector V(BC) is 0. Equation (34) is an equation obtained by expressing equation (33) as vectors V(OQ3), V(OB), and V(OC) and substituting equation (29) for vector V(OQ3). Equation (35) is an equation representing coefficient t obtained by expanding equation (34).
[0090] The measurement program 122 causes the processor 11 to execute a calculation in accordance with at least one of equations (32) and (35). As an example, in step S213, the processor 11 obtains a coefficient t by substituting the unit vector e(Q3) calculated in step S207 and the vectors V(OA) and V(OB) calculated in step S209 into equation (32). As another example, the processor 11 obtains a coefficient t by substituting the unit vector e(Q3) calculated in step S207 and the vectors V(OB) and V(OC) calculated in step S209 into equation (35). The processor 11 obtains a vector V(OQ3) by substituting the obtained coefficient t into equation (29).
[0091] Preferably, the measurement program 122 causes the processor 11 to perform calculations according to both equations (32) and (35). In this case, the processor 11 may use the average value of the values obtained by each equation as the coefficient t. This reduces the effects of distortion of the captured image IM due to aberrations and errors in resolution and coordinates.
[0092] (S215: Calculating the size of the object to be measured) The processor 11 calculates the size of the measurement object 200 (step S215). In the example of Fig. 1, the width x [mm] is the magnitude of the vector V(P2Q2) (|V(P2Q2)|), the depth z [mm] is the magnitude of the vector V(P1Q1) (|V(P1Q1)|), and the height y [mm] is the magnitude of the vector V(BQ3) (|V(BQ3)|).
[0093] The measurement program 122 causes the processor 11 to perform a calculation according to the following equation (36): In step S215, the processor 11 calculates the width x [mm] by substituting the vectors V(OP2) and V(OQ2) calculated in step S211 into equation (36). x[mm]=|V(P2Q2)|=|V(OQ2)-V(OP2)| …Formula (36)
[0094] The measurement program 122 causes the processor 11 to perform a calculation according to the following equation (37): In step S215, the processor 11 calculates the depth z [mm] by substituting the vectors V(OP1) and V(OQ1) calculated in step S211 into equation (37). z[mm]=|V(P1Q1)|=|V(OQ1)-V(OP1)| …Formula (37)
[0095] The measurement program 122 causes the processor 11 to perform a calculation according to the following equation (38): In step S215, the processor 11 calculates the height y [mm] by substituting the vector V(OB) calculated in step S211 and the vector V(OQ3) calculated in step S213 into equation (38). y[mm]=|V(BQ3)|=|V(OQ3)-V(OB)| …Formula (38)
[0096] By performing the above measurement process 112, the three-dimensional size of the measurement object 200 can be obtained from the captured image IM. Therefore, even if a user does not have a measurement tool or has difficulty using it, the size of the measurement object 200 can be easily obtained by simply capturing an image of the measurement object 200 together with the reference object 300 with the camera 13 of the measurement system 100. Furthermore, by using the measurement system 100, not only the one-dimensional and two-dimensional sizes of the measurement object 200 but also the three-dimensional size can be obtained.
[0097] [Variation 1] In step S209, if a plurality of combinations of coefficients k, l, and m satisfying l>0 and equation (22) in FIG. 10 are obtained, the processor 11 further calculates a unit vector e(D)=(x ed ,y ed ,z ed 12 using |V(CD)|=L obtained from the obtained vector V(OD) and the size of the reference object 300 set in step S103. AB [mm], |V(DA)|=L BC By substituting [mm] into the following equations (39) and (40), vectors V(OA), V(OB), and V(OC) are obtained. |V(CD)|=|V(OD)-V(OC)| …Formula (39) |V(DA)|=|V(OD)-V(OA)| …Formula (40)
[0098] Preferably, the processor 11 adds |V(CD)|=L to the following equation (41): AB [mm] and |V(DA)| = L BC [mm] is substituted to calculate the index I, and the vectors V(OA), V(OB), and V(OC) that minimize the index I are selected. This reduces the effects of distortion of the captured image IM due to aberrations, as well as errors in resolution and coordinates. I=||V(CD)|-L AB |+||V(DA)|-L BC | …Formula (41)
[0099] [Variation 2] 14 is a diagram showing another example of the arrangement of reference object 300, in which reference object 300 is on bottom surface 201 of measurement target 200 and side AB does not coincide with any side of measurement target 200. In real space, an arbitrary point on bottom surface 201 is defined as point P3, and a point on top surface 202 such that side P3Q3 is perpendicular to surface ABCD is defined as point Q3.
[0100] In the second modified example, in step S201, the processor 11 reads out the captured image IM1 from the memory 12. Fig. 15 shows an outline of the captured image IM1. When the reference object 300 is placed as shown in Fig. 14, the captured image IM1 further includes a point P 3c Includes.
[0101] In this case, in step S203, the processor 11 calculates the coordinates of the point P3 (x P3 ,y P3 ,z P3 ) corresponding to the point P 1c (ξ P1c ,η P1c ) is determined. FIG. 17 is a diagram for explaining step S213 in the second modified example.
[0102] Since reference object 300 is placed on bottom surface 201 of measurement target 200, vector V(P3Q3) is orthogonal to vector V(AB). Equation (42) indicates that the product of vector V(P3Q3) and vector V(AB) is 0. Equation (43) is an equation obtained by expressing equation (42) as vectors V(OQ3), V(OP3), V(OA), and V(OB) and substituting equation (29) for vector V(OQ3). Equation (44) is an equation representing coefficient t obtained by expanding equation (43).
[0103] Furthermore, since reference object 300 is disposed on bottom surface 201 of measurement target 200, vector V(P3Q3) is also orthogonal to vector V(BC). Equation (45) indicates that the product of vector V(P3Q3) and vector V(BC) is 0. Equation (46) is an equation obtained by expressing equation (45) with vectors V(OQ3), V(OP3), V(OB), and V(OC) and substituting equation (29) for vector V(OQ3). Equation (47) is an equation representing coefficient t obtained by expanding equation (46).
[0104] In the second modified example, the measurement program 122 causes the processor 11 to execute a calculation in accordance with at least one of equations (44) and (47). As an example, in the second modified example, in step S213, the processor 11 substitutes the unit vector e(Q3) calculated in step S207, the vectors V(OA) and V(OB) calculated in step S209, and the vector V(OP3) calculated in the same manner as in step S209 into equation (44) to obtain a coefficient t. As another example, the processor 11 substitutes the unit vector e(Q3) calculated in step S207, the vectors V(OB) and V(OC) calculated in step S209, and the vector V(OP3) calculated in the same manner as in step S209 into equation (47) to obtain a coefficient t. The processor 11 substitutes the obtained coefficient t into equation (29) to obtain a vector V(OQ3).
[0105] Also in the second modified example, preferably, the measurement program 122 causes the processor 11 to execute calculations according to both equations (44) and (47). In this case, the processor 11 may use the average value of the values obtained by each equation as the coefficient t. This reduces the effects of distortion of the captured image IM due to aberrations and errors in resolution and coordinates.
[0106] In the second modified example, the height y [mm] is the magnitude (|V(P3Q3)|) of the vector V(P3Q3). Therefore, the measurement program 122 causes the processor 11 to execute a calculation in accordance with the following equation (48). In the second modified example, in step S215, the processor 11 calculates the height y [mm] by substituting the vector V(OP3) calculated in the same manner as in step S209 and the vector V(OQ3) calculated in the above step S213 into equation (48). y[mm]=|V(P3Q3)|=|V(OQ3)-V(OP3)| …Formula (48)
[0107] According to the second modification, the arrangement of the reference object 300 is not limited to the arrangement shown in FIG. 1 where the side AB coincides with one side of the measurement target 200, but may be other arrangements as long as the reference object 300 is on the same plane as one surface of the measurement target 200 and the positional relationship with the measurement target 200 on that surface can be identified by the processing device 10. However, as shown in the second modification, when the reference object 300 is arranged so that the side AB does not coincide with any side of the measurement target 200, an operation to calculate the vector V(OP3) is required compared to when the reference object 300 is arranged so that the side AB coincides with one side of the measurement target 200. Therefore, in the measurement system 100, the reference object 300 is preferably installed so that the side AB coincides with one side of the measurement target 200.
[0108] <3. Notes> The present invention is not limited to the above-described embodiment, and various modifications are possible. [Explanation of symbols]
[0109] 10: processing device, 13: camera, 53: guide, 53A: check box, 55A: shooting frame, 100: measurement system, 111: shooting processing, 112: measurement processing, 121: shooting program, 122: measurement program, 200: measurement object, 300: reference object, IM, IM1: shot image
Claims
1. A measurement system for obtaining a size of a measurement object from a photographed image of the measurement object, a camera for obtaining the captured image; a processing unit that performs a calculation to obtain the size of the measurement target from the captured image using the size of a reference object that is attached to the measurement target and photographed together with the measurement target, The processing unit is configured to guide the reference object to be placed at a position required for the calculation relative to the measurement object when the camera captures an image of the measurement object. Measurement system.
2. The guiding by the processing unit includes displaying a position of the reference object relative to the measurement target on a screen that is displayed when the camera captures an image of the measurement target. The measurement system of claim 1 .
3. The guiding by the processing unit includes allowing the camera to capture an image of the measurement target when a user operation indicating that the reference object has been placed at a position required for the calculation is accepted. The measurement system of claim 1 .
4. The guiding by the processing unit includes determining a positional relationship between the reference object obtained from the captured image and the measurement target, and performing the calculation according to a determination result. The measurement system of claim 1 .
5. The guiding by the processing unit includes displaying an imaging frame that contains the reference object and the measurement target on a screen that is displayed when the camera captures the measurement target. The measurement system of claim 1 .
6. the reference object is a planar body, The calculation includes converting coordinates of the measurement target in the captured image into three-dimensional coordinates in real space using the position and angle of view of the camera, the size of the captured image, and the size of the reference object. The measurement system of claim 1 .
7. The calculation includes calculating a unit vector in a direction from an origin based on the position of the camera toward the target point, the unit vector being obtained from the coordinates of the target point in the captured image, the size of the captured image, and the angle of view of the camera. The measurement system of claim 6.
8. The calculation is calculating a first unit vector directed from the origin to the first point, a second unit vector directed from the origin to the second point, and a third unit vector directed from the origin to the third point, with first to third points of the reference object placed on the measurement target as the target points, respectively; calculating a first vector from the origin to the first point, a second vector from the origin to the second point, and a third vector from the origin to the third point, using the first unit vector, the second unit vector, the third unit vector, and lengths between the three points of the reference object, respectively. The measurement system of claim 7.
9. The calculation includes calculating a vector from the origin to a fourth point on a plane on which the reference object to be measured is placed, using coordinates of the fourth point in the captured image and the first to third vectors. The measurement system of claim 8 .
10. the calculation includes calculating a vector from the origin to a fifth point on a plane opposite to a plane on which the reference object to be measured is placed, using coordinates of the fifth point in the captured image, the first vector, and the second vector. The measurement system of claim 9.
11. A measurement system for obtaining a size of a measurement object from a photographed image of the measurement object, a camera for obtaining the captured image; a processing unit that performs a calculation to obtain the size of the measurement target from the captured image using the size of a reference object that is attached to the measurement target and photographed together with the measurement target, the reference object is a planar body, The calculation includes converting coordinates of the measurement target in the captured image into three-dimensional coordinates in real space using the position and angle of view of the camera, the size of the captured image, and the size of the reference object. Measurement system.
12. A processing device that performs a calculation to obtain the size of a measurement object from a photographed image of the measurement object, When photographing the measurement object with a camera, a reference object is guided to be placed at a position required for the calculation relative to the measurement object; and obtaining a size of the measurement target from the captured image using a size of the reference object that is placed on the measurement target and photographed together with the measurement target. Processing equipment.
13. A processing device that performs a calculation to obtain the size of a measurement object from a photographed image of the measurement object, a size of the measurement object is obtained from the captured image using a size of a reference object that is attached to the measurement object and photographed by a camera together with the measurement object; the reference object is a planar body, The calculation includes converting coordinates of the measurement target in the captured image into three-dimensional coordinates in real space using the position and angle of view of the camera, the size of the captured image, and the size of the reference object. Processing equipment.
14. A computer program that causes a computer to function as a processing device that performs calculations to obtain the size of a measurement object from a captured image of the measurement object, When photographing the measurement object with a camera, a reference object is guided to be placed at a position required for the calculation relative to the measurement object; obtaining a size of the measurement target from the captured image using a size of the reference object that is placed on the measurement target and photographed together with the measurement target. Computer program.
15. A computer program that causes a computer to function as a processing device that performs calculations to obtain the size of a measurement object from a captured image of the measurement object, obtaining a size of the measurement target from the captured image using a size of a reference object that is attached to the measurement target and photographed by a camera together with the measurement target; the reference object is a planar body, The calculation includes converting coordinates of the measurement target in the captured image into three-dimensional coordinates in real space using the position and angle of view of the camera, the size of the captured image, and the size of the reference object. Computer program.
Citation Information
Patent Citations
Image transmitting method for deriving dimension and method for preparing estimate therewith
JP2002133192A
Portable terminal, dimension measurement system, and dimension measurement method
JP2023023348A
Mobile terminal and size measurement method using mobile terminal
JP2023043090A