Measuring method and measuring device
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- ASTEMO LTD
- Filing Date
- 2026-01-14
- Publication Date
- 2026-08-06
Smart Images

Figure JP2026000812_06082026_PF_FP_ABST
Abstract
Description
Measuring method and measuring device ,
[0004] ,
[0007] ,
[0006] , ,
[0005] ,
[0001] The present invention relates to a measuring method and a measuring device.
[0002] Patent Document 1 discloses a technique for measuring the three-dimensional shape of a measurement object by scanning the measurement object by a light cutting method. In the light cutting method, while linearly moving a light cutting sensor within a measurement range passing through the measurement object, a laser line is irradiated onto the measurement object, and the projected laser line is photographed by an area camera.
[0003] Japanese Unexamined Patent Application Publication No. 2023-026639
[0004] In the above prior art, in consideration of the positional deviation of the measurement object, a measurement range sufficiently longer than the length of the measurement object is set, and high-precision measurement with a low measurement speed is performed over the entire measurement range, so there is a problem that the cycle time is long. One object of the present invention is to provide a measuring method and a measuring device capable of shortening the cycle time.
[0005] In the measuring method according to an embodiment of the present invention, a sensor moving within a predetermined measurement range scans a measurement object to measure its three-dimensional shape, and a distribution curve showing the correlation between the amount of positional deviation of the measurement object and the probability density of the occurrence of the amount of positional deviation is obtained. Based on the measurement speed of the sensor and the distribution curve at the time of measurement, the timings of the start and end of the scan are determined. When at least a part of the measurement object is not detected during the measurement, scanning by the sensor is performed over the entire area of the measurement range.
[0006] According to an embodiment of the present invention, the cycle time can be shortened.
[0007] This is a schematic diagram showing the measurement device of Embodiment 1. This is a schematic diagram showing the movement trajectory of the light section sensor 1 of Embodiment 1. This is a flowchart showing the flow of the measurement process executed by the controller 2 of Embodiment 1. This is a flowchart showing the flow of the operation recipe generation process executed by the controller 2 of Embodiment 1. This is an example of the probability density function of Embodiment 1. This is a schematic diagram showing the details of the measurement method of Embodiment 1. This is an example of the remeasurement probability Z [%] according to the offset a [mm]. This is an example of the cycle time CT [sec] according to the offset a [mm]. This is a schematic diagram showing an overview of the measurement method of Embodiment 1. This is a flowchart showing the flow of the measurement process executed by the controller 2 of Embodiment 2. This is a flowchart showing the flow of the operation recipe generation process executed by the controller 2 of Embodiment 2. This is a flowchart showing the flow of the operation recipe generation process executed by the controller 2 of Embodiment 3. This is a scatter plot with elapsed time T and the mean value μ of the sample center position as two variables. This is a scatter plot with elapsed time T and the standard deviation σ as two variables. This is a flowchart showing the flow of the operation recipe generation process executed by the controller 2 of Embodiment 5. This is a flowchart showing the flow of the operation recipe generation process executed by the controller 2 of Embodiment 6. This is a scatter plot with elapsed time T and the average value μ of the sample center position as two variables, showing a large deviation between the predicted average value μ' and the latest actual value μx. This is a flowchart showing the flow of the measurement process executed by controller 2 in embodiment 7. This is a flowchart showing the flow of the operation recipe generation process executed by controller 2 in embodiment 7.
[0008] [Embodiment 1] The measurement method and measuring apparatus of the present invention will be described below based on embodiments. Figure 1 is a schematic diagram showing the measuring apparatus of Embodiment 1. The measuring apparatus of Embodiment 1 comprises a light section sensor (sensor) 1 and a controller 2. The light section sensor 1 has a laser light source 3, a cylindrical lens 4, a light receiving lens 5 and a CMOS sensor 6. The laser light source 3 outputs laser light toward the cylindrical lens 4. The cylindrical lens 4 converts the laser light source into a slit shape (measurement line) and irradiates the sample 7, which is the object to be measured.
[0009] The light-receiving lens 5 focuses the reflected light from the sample 7 onto the CMOS sensor 6. The CMOS sensor 6 forms an image of the received reflected light and acquires profile data of the changes in height, shape, and position of the cross-section of the sample 7. The light section sensor 1 moves in a direction perpendicular to the measurement line relative to the sample 7 and continuously acquires profile data in synchronization with its movement. The controller 2 controls the operation of the light section sensor 1. The controller 2 performs 3D image processing on the profile data continuously acquired by the light section sensor 1 to measure and inspect the 3D dimensions, appearance, and shape of the sample 7.
[0010] Figure 2 is a schematic diagram showing the movement trajectory of the light section sensor 1 in Embodiment 1. The sample 7 in Embodiment 1 is, for example, a plurality of welded joints provided on the inverter 8. The light section sensor 1 continuously measures the profile data of the plurality of samples 7. The movement trajectory of the light section sensor 1 consists of three trajectories: a trajectory 9 when not measuring, a trajectory 10 when preliminary measuring, and a trajectory 11 when measuring. The trajectory 9 when not measuring is the trajectory for moving from the measurement end point 13 of a certain sample 7 to the measurement start point 12 of the next sample 7 to be measured. The movement speed V3 of the light section sensor 1 when being measured is set higher than the measurement speed (movement speed during main measurement) V1 of the light section sensor 1 when measuring and the measurement speed (movement speed during preliminary measurement) V2 of the light section sensor 1 when preliminary measuring.
[0011] The two preliminary measurement trajectories 10 are aligned in a straight line with the main measurement trajectory 11 in between. That is, the preliminary measurement trajectories 10 are positioned before and after the main measurement trajectory 11 within the measurement range of the light section sensor 1, from the measurement start point 12 to the measurement end point 13. The measurement speed V2 of the light section sensor 1 during preliminary measurement is set to be several times higher, for example, than the measurement speed V1 of the light section sensor 1 during main measurement. Since the measurement cycle (profile data acquisition cycle) of the light section sensor 1 is constant, the 3D shape measurement accuracy of the light section sensor 1 is lower during preliminary measurement compared to main measurement, but the presence and approximate position of sample 7 can be detected with high accuracy.
[0012] Figure 3 is a flowchart showing the flow of the measurement process executed by the controller 2 of Embodiment 1. This process is repeatedly executed until the measurement of all samples is completed. In step S1, an operation recipe is read. The operation recipe determines the operations of the optical cutting sensor 1, such as the measurement start point, the measurement end point, the speed switching position (the present measurement correction values B and C described later), etc. The method for generating the operation recipe will be described later.
[0013] In step S2, the optical cutting sensor 1 is moved at the moving speed V3 to the measurement start point of the next sample (sample 7 to be measured next). If it has already moved to the measurement start point, no processing is performed in this step. In step S3, while moving the optical cutting sensor 1 at the measurement speed V2 (<V3), preliminary measurement is performed until reaching the speed switching position from the preliminary measurement to the present measurement. In step S4, while moving the optical cutting sensor 1 at the measurement speed V1 (<V2), the present measurement is performed until reaching the speed switching position from the present measurement to the preliminary measurement. In step S5, while moving the optical cutting sensor 1 at the measurement speed V2, preliminary measurement is performed until reaching the measurement end point. Steps S3 to S5 correspond to the measurement steps of performing scanning by switching between the first measurement speed V1 and the second measurement speed V2 within the measurement range.
[0014] In step S6, it is determined whether at least a part of the object (sample 7) is detected in the preliminary measurement of step S3 or step S5. If YES, proceed to step S8; if NO, proceed to step S7. In step S7, it is determined whether all of the object (sample 7) is detected in the present measurement of step S4. If YES, proceed to step S10; if NO, proceed to step S8. In step S8, the optical cutting sensor 1 is moved at the moving speed V3 to the measurement start point of the current sample (sample 7 measured in steps S3 to S5). In step S9, while moving the optical cutting sensor 1 at the measurement speed V1, re-measurement of the current sample is performed until reaching the measurement end point. Step S9 corresponds to the re-measurement step. In step S10, the optical cutting sensor 1 is moved at the moving speed V3 to the measurement start point of the next sample.
[0015] Figure 4 is a flowchart showing the flow of the operation recipe generation process executed by the controller 2 in Embodiment 1. In step S11, the probability density function as a distribution curve is read. In Embodiment 1, a probability density function that has been generated in advance based on the sample center position measured during past measurements is used. Figure 5 is an example of a probability density function, which is a distribution curve showing the correlation between the sample center position [mm] and the probability density Y [%]. The probability density Y is expressed by the following formula. Note that σ: standard deviation X: x-coordinate when a two-dimensional sample coordinate system is set with the direction of travel of the light section sensor 1 as the x-axis and the direction in which the measurement line extends as the y-axis, as shown in Figure 6, and the coordinates of the center position of the design sample are set as the origin (0,0) μ: average value of the sample center position on the sample coordinate system. Step S11 corresponds to the distribution curve acquisition step.
[0016] In step S12, the mean value μ of the sample center position is calculated from the probability density function read in step S11. In step S13, the remeasurement probability Z is calculated. The remeasurement probability Z is expressed by the following formula. As shown in Figure 6, L2 represents the entire measurement range (length from the measurement start point to the measurement end point), and a represents the offset (distance from the measurement start position to the sample and the distance from sample 7 to the measurement end position).
[0017] Figure 7 shows an example of the remeasurement probability Z[%] depending on the offset a[mm], and the remeasurement probability Z has the characteristic that it decreases as the offset a increases. The remeasurement probability Z depends on the standard deviation σ, and the larger the standard deviation σ, the higher the remeasurement probability Z is for the same offset a. In step S14, initial conditions such as the sample design length L1, the main measurement speed V1, and the preliminary measurement speed V2 are input.
[0018] In step S15, the speed change position that minimizes the cycle time CT is calculated. The cycle time CT is expressed by the following formula: CT = t1 + t2 + t3 where t1 = (L1 + 2a) / V1, t2 = (L2 - L1 - 2a) / V2, and t3 = Z x L2 / V1.
[0019] Figure 8 shows an example of the cycle time CT [sec] corresponding to offset a [mm]. By selecting the offset a that minimizes the cycle time CT according to the standard deviation σ, the speed switching position that minimizes the cycle time CT can be obtained. Step S15 corresponds to the switching timing calculation step. In step S16, the measurement correction values B and C, which correct the measurement range from the speed switching position, are determined, and an operation recipe including initial conditions is generated. As shown in Figure 6, the measurement correction value B is used to correct the measurement start position according to offset a. On the other hand, the measurement correction value C is used to correct the measurement end position according to offset a. The measurement correction values B and C can be obtained from the following formulas: B = μ - L1 / 2 - a C = μ + L1 / 2 + a
[0020] Next, the effects of Embodiment 1 will be explained. In conventional optical section measurements, the main measurement is performed over the entire measurement range (the entire area of the measurement range). In contrast, Embodiment 1 sets up preliminary measurements with a higher measurement speed than the main measurement before and after the main measurement, and narrows the measurement range of the main measurement, which has a lower measurement speed, compared to the entire measurement range, thereby shortening the cycle time CT. However, if the measurement range of the main measurement is narrowed, and the actual position of sample 7 differs from the design position (positional misalignment), sample 7 will not fit within the range of the main measurement, resulting in an unmeasured portion.
[0021] Therefore, in Embodiment 1, if sample 7 is within the measurement range as shown in Figure 9(a), the measurement is considered OK and the measurement of the next sample 7 is started. On the other hand, if sample 7 is outside the measurement range as shown in Figure 9(b), or if it is not within the measurement range, a re-measurement is performed on the sample 7 over the entire measurement range, and after the re-measurement is completed, the measurement of the next sample 7 is started.
[0022] In the measurement method of Embodiment 1, if the measurement range of the main measurement, which has a low measurement speed, is set narrowly, remeasurement becomes necessary due to the displacement of sample 7, and the cycle time CT increases by the amount of remeasurement. On the other hand, if the measurement range of the main measurement is set wide in order to reduce the probability of remeasurement, the cycle time CT also increases. In other words, there is a trade-off relationship between the measurement range of the main measurement and the probability of remeasurement, so in order to shorten the cycle time CT, it is necessary to determine the measurement range of the main measurement that minimizes the total cycle time CT, taking into account the probability of remeasurement, etc.
[0023] Therefore, in Embodiment 1, a main measurement prioritizing accuracy and a preliminary measurement prioritizing time reduction are used separately, and the measurement range of the main measurement that minimizes the cycle time CT is set using past statistical data of the positional displacement distribution of sample 7. Specifically, the expected value of the cycle time CT is calculated by adding the main measurement time and the preliminary measurement time to the value obtained by multiplying the re-measurement probability and re-measurement time, and the measurement range of the main measurement that minimizes the cycle time CT is determined. As a result, the measurement method in Embodiment 1 has the effect of shortening the cycle time CT compared to the conventional measurement method in which the main measurement is performed over the entire measurement range.
[0024] [Embodiment 2] The basic configuration of Embodiment 2 is the same as that of Embodiment 1, so only the differences from Embodiment 1 will be described. Figure 10 is a flowchart showing the flow of the measurement process performed by the controller 2 of Embodiment 2. In step S21, the center position μx of sample 7 is obtained from the profile data of sample 7 obtained in the main measurement in step S4 or the remeasurement in step S9.
[0025] Figure 11 is a flowchart showing the flow of the operation recipe generation process executed by the controller 2 of Embodiment 2. This process is executed repeatedly in parallel with the measurement process shown in Figure 10 until the measurement of all samples is completed. In step S22, the sample center position μx obtained in step S21 of the measurement process is read. In step S23, the probability density function is derived. In Embodiment 2, the sample center position is obtained each time a measurement is taken, and the probability density function is calculated from the sample center positions over the most recent fixed period.
[0026] In Embodiment 1, the speed switching position that minimizes the cycle time CT was determined by assuming an invariant probability density function. However, if the probability density function changes over time, the speed switching position that minimizes the cycle time CT also changes. Therefore, in Embodiment 2, by deriving the latest probability density function based on the actual values (measured values) of the sample center position over a certain period of time, an operation recipe that is adapted to the change in the probability density function over time can be generated. As a result, the cycle time CT can be minimized regardless of whether or not the probability density function changes over time.
[0027] [Embodiment 3] The basic configuration of Embodiment 3 is the same as that of Embodiment 2, so only the parts that differ from Embodiment 2 will be described. Figure 12 is a flowchart showing the flow of the operation recipe generation process executed by the controller 2 of Embodiment 3. In step S31, the probability density function is derived. In Embodiment 3, first, the probability density function is obtained from the sample center position for the most recent fixed period. Next, as shown in Figure 13, an approximate linear equation (regression linear equation) representing the correlation between the two variables is created from a scatter plot with the elapsed time T and the mean value μ of the sample center position in the obtained probability density function as the two variables, and the predicted mean value μ' is calculated from this approximate linear equation. Next, as shown in Figure 14, an approximate linear equation (regression linear equation) representing the correlation between the two variables is created from a scatter plot with the elapsed time T and the standard deviation σ in the obtained probability density function as the two variables, and the predicted standard deviation σ' is calculated from this approximate linear equation. Finally, the predicted probability density function is derived from the predicted mean value μ' and the predicted standard deviation σ'.
[0028] As described above, in Embodiment 3, the probability density function is derived at regular intervals, and the predicted mean μ' and predicted standard deviation σ' are derived from the approximate linear equations representing the time-dependent changes in the mean μ and standard deviation σ of the sample center position for each derived function. This makes it possible to generate an operation recipe that is adapted to the time-dependent changes in the probability density function, thereby minimizing the cycle time CT regardless of whether or not the probability density variable changes over time.
[0029] [Embodiment 4] The basic configuration of Embodiment 4 is the same as that of Embodiment 3, so only the differences from Embodiment 3 will be explained. In Embodiment 4, in S31 of the operation recipe generation process in Figure 12, an approximation curve equation (regression curve equation) representing the correlation between the two variables is created from a scatter plot with the elapsed time T and the average value μ of the sample center position in the obtained probability density function as the two variables, and the predicted average value μ' is calculated from the approximation curve equation. Therefore, in Embodiment 4, as in Embodiment 3, an operation recipe that is adapted to the change in the probability density function over time can be generated, and thus the cycle time CT can be minimized regardless of whether or not the probability density function changes over time.
[0030] [Embodiment 5] The basic configuration of Embodiment 5 is the same as that of Embodiment 3, so only the parts that differ from Embodiment 3 will be described. Figure 15 is a flowchart showing the flow of the operation recipe generation process executed by the controller 2 of Embodiment 5. In step S51, it is determined whether a specific part has been replaced. If YES, proceed to step S52; if NO, proceed to step S16. The specific part is, for example, each part of the measuring device (light section sensor 1, etc.). In step S52, the operation recipe is initialized using an initial operation recipe in which predetermined speed switching positions (main measurement correction values B, C) are set in advance.
[0031] Even if a certain trend is observed in the mean μ and standard deviation σ of the probability density function, the sample position distribution may change abruptly due to factors such as changes in physical properties caused by component replacement. In Embodiment 5, by initializing the operation recipe in response to component replacement, it is possible to generate an operation recipe that is adapted to the abrupt change in the sample position distribution caused by component replacement.
[0032] [Embodiment 6] The basic configuration of Embodiment 6 is the same as that of Embodiment 3, so only the parts that differ from Embodiment 3 will be described. Figure 16 is a flowchart showing the flow of the operation recipe generation process executed by the controller 2 of Embodiment 6. In step S61, it is determined whether the center position μx of the most recent sample 7 read in step S22 is greater than or equal to the lower limit μ'-a and less than or equal to the upper limit μ'+a. If YES, proceed to step S16; if NO, proceed to step S52. Here, the lower limit μ'-a is the value obtained by subtracting a predetermined threshold a (>0) from the predicted average value μ', and the upper limit μ'+a is the value obtained by adding a predetermined threshold a to the predicted average value μ'.
[0033] When the distribution of the probability density function changes abruptly and the cause is unknown, applying the initial values of the operation recipe may result in a smaller expected cycle time (CT). In Embodiment 6, as shown in Figure 17, when the latest actual value μx deviates significantly from the predicted average value μ', initializing the operation recipe makes it possible to generate an operation recipe that is adapted to the abrupt change in the sample distribution position for an unknown reason.
[0034] [Embodiment 7] The basic configuration of Embodiment 7 is the same as that of Embodiment 1, so only the parts that differ from Embodiment 1 will be described. Figure 18 is a flowchart showing the flow of the measurement process executed by the controller 2 of Embodiment 7. As shown in Figure 18, in Embodiment 7, preliminary measurements are omitted and only the main measurement is performed. Therefore, the movement trajectory of the light section sensor 1 in Embodiment 7 is the same as the movement trajectory shown in Figure 2, but with the two preliminary measurement trajectories 10 that sandwich the trajectory 10 during the main measurement replaced by the non-measurement trajectory 9. In step S2, the light section sensor 1 is moved at a movement speed V3 to the main measurement start position of the next sample. In step S4, the light section sensor 1 is moved at a measurement speed V1 and the main measurement is performed until it reaches the main measurement end position.
[0035] Figure 19 is a flowchart showing the flow of the operation recipe generation process executed by the controller 2 of Embodiment 7. In step S72, the measurement position (start position and end position) that minimizes the cycle time CT is calculated. The method for calculating the measurement position is the same as the method for calculating the speed switching position in Embodiment 1.
[0036] In Embodiment 7, the measurement range is set to be narrower than the entire measurement range, and the measurement range that minimizes the cycle time CT is set using past statistical data of the positional displacement distribution of sample 7. This has the effect of shortening the cycle time CT compared to the conventional measurement method in which the measurement range is always set to be sufficiently longer than the length of sample 7.
[0037] [Other Embodiments] Although embodiments for carrying out the present invention have been described above, the specific configuration of the present invention is not limited to the configurations of the embodiments, and design changes and the like that do not depart from the gist of the invention are also included in the present invention. Embodiments 1 to 6 show preliminary measurements to be performed before and after the main measurement, and Embodiment 7 shows an example in which only the main measurement is performed without preliminary measurements, but a configuration in which preliminary measurements are performed only before or after the main measurement is also possible. The configuration of the light section sensor is not limited to the configuration shown in the embodiments and can be set arbitrarily.
[0038] It should be noted that the present invention is not limited to the embodiments described above, and various modifications are included. For example, the embodiments described above are described in detail to make the present invention easier to understand, and are not necessarily limited to those having all the configurations described. Furthermore, it is possible to replace parts of the configuration of one embodiment with the configuration of another embodiment, and it is also possible to add configurations from other embodiments to the configuration of one embodiment. In addition, it is possible to add, delete, or replace parts of the configuration of each embodiment with other configurations.
[0039] This application claims priority under Japanese Patent Application No. 2025-013935, filed on 30 January 2025. The entire disclosure of Japanese Patent Application No. 2025-013935, filed on 30 January 2025, including the specification, claims, drawings, and abstract, is incorporated into this application by reference.
[0040] 1…Light section sensor (sensor), 2…Controller, 7…Sample (object to be measured)
Claims
1. A measurement method comprising: a measurement step of scanning an object to be measured with a sensor moving within a predetermined measurement range to measure its three-dimensional shape; a distribution curve acquisition step of acquiring a distribution curve showing the correlation between the amount of positional displacement of the object to be measured and the probability density in which the positional displacement occurs; a switching timing calculation step of determining the start and end timing of the scan based on the measurement speed of the sensor in the measurement step and the distribution curve; and a remeasurement step of performing a scan with the sensor over the entire measurement range if at least a part of the object to be measured is not detected in the measurement step.
2. A measurement method comprising: a measurement step of scanning an object to be measured with a sensor moving within a predetermined measurement range to measure its three-dimensional shape, wherein within the measurement range, the measurement speed of the sensor is switched between a first measurement speed and a second measurement speed higher than the first measurement speed to perform the scan; a distribution curve acquisition step of acquiring a distribution curve showing the correlation between the amount of positional displacement of the object to be measured and the probability density at which the positional displacement occurs; a switching timing calculation step of determining the timing of switching between the first measurement speed and the second measurement speed based on the first measurement speed, the second measurement speed, and the distribution curve; and a remeasurement step of performing a scan at the first measurement speed over the entire measurement range if at least a part of the object to be measured is not detected during the scan at the first measurement speed, or if at least a part of the object to be measured is detected during the scan at the second measurement speed.
3. A measurement method according to claim 1 or 2, wherein the distribution curve acquisition step involves acquiring the center position of the object to be measured and calculating a probability density function at regular intervals, and the switching timing calculation step involves determining the timing based on the latest probability density function.
4. A measurement method according to claim 1 or 2, wherein the distribution curve acquisition step involves acquiring the center position of the object to be measured and calculating a probability density function at regular intervals, deriving the change over time of the mean μ and standard deviation σ of the center position in the probability density function using a regression line equation, calculating a predicted probability density function from the predicted mean μ' and predicted standard deviation σ' based on the regression line equation, and the switching timing calculation step involves determining the timing based on the predicted probability density function.
5. A measurement method according to claim 1 or 2, wherein the distribution curve acquisition step involves acquiring the center position of the object to be measured and calculating a probability density function at regular intervals, deriving the change over time of the mean μ and standard deviation σ of the center position in the probability density function using a regression curve equation, calculating a final probability density function from the predicted mean μ' and predicted standard deviation σ' based on the regression curve equation, and the switching timing calculation step involves determining the timing based on the final probability density function.
6. A measurement method according to any one of claims 3 to 5, wherein, when a specific component of the sensor is replaced, the distribution curve acquisition step sets the probability density function to a predetermined initial probability density function, and the switching timing calculation step initializes the timing to a predetermined initial timing.
7. A measurement method according to claim 4 or 5, wherein when the center position of the latest object to be measured is μx and a predetermined threshold is a (>0), if the following equation, μ'-a≦μx≦μ'+a is not true, the distribution curve acquisition step sets the probability density function to a predetermined initial probability density function, and the switching timing calculation step initializes the timing to a predetermined initial timing.
8. A measuring device comprising: a sensor that moves within a predetermined measuring range and scans an object to be measured to measure its three-dimensional shape; and a controller that controls the operation of the sensor, wherein the controller acquires a distribution curve showing the correlation between the amount of positional displacement of the object to be measured and the probability density at which such positional displacement occurs; determines the start and end timing of the scan based on the measurement speed of the sensor during scanning of the object to be measured and the distribution curve; and, if at least a portion of the object to be measured is not detected by scanning according to the timing, performs a scan by the sensor over the entire area of the measuring range.
9. A measuring device comprising: a sensor that moves within a predetermined measuring range and scans an object to be measured to measure its three-dimensional shape; and a controller that controls the operation of the sensor, wherein the controller performs the scan by switching the measuring speed of the sensor between a first measuring speed and a second measuring speed higher than the first measuring speed within the measuring range; obtains a distribution curve showing the correlation between the amount of positional displacement of the object to be measured and the probability density in which such positional displacement occurs; determines the timing for switching between the first measuring speed and the second measuring speed based on the first measuring speed, the second measuring speed, and the distribution curve; and if at least a part of the object to be measured is not detected during the scan at the first measuring speed, or if at least a part of the object to be measured is detected during the scan at the second measuring speed, the device performs the scan at the first measuring speed over the entire area of the measuring range.