Image measurement apparatus and program

By realizing trajectory drawing and automatic edge detection on the image measurement equipment, the problem of cumbersome edge detection operations in image measurement is solved and the measurement efficiency is improved.

CN119437049APending Publication Date: 2025-02-14MITUTOYO CORP
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411031074.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2024-06-25
Filing Date
2024-07-30
Publication Date
2025-02-14

AI Technical Summary

Technical Problem

During the image measurement process, the operator needs to confirm the edge position in detail and repeatedly select the edge detection tool, resulting in cumbersome edge detection operations.

Method used

An image measuring device is designed, including a display unit, an input unit, an edge detecting unit and a measurement execution unit. The operator may draw a trajectory on an image of the display section, and the edge detection section detects the edge based on the trajectory, and performs measurements.

Benefits of technology

Through intuitive operation and drawing trajectories, edge detection can be automatically detected, reducing the cumbersome work of edge detection and improving measurement efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119437049A_ABST
    Figure CN119437049A_ABST
Patent Text Reader

Abstract

[Problem] To provide an image measurement device capable of reducing edge detection work. [Solution] An image measuring apparatus according to the present invention captures an image of an object to be measured and measures the size of a measurement site of the object to be measured by analyzing the image, the image measuring apparatus comprising: a display unit that displays the image of the object to be measured; an input unit that receives an input of a trajectory drawn by an operator on the image displayed on the display unit; an edge detection unit that detects an edge on the basis of a trajectory drawn on the image; and a measurement execution unit that executes a measurement on the basis of the detected plurality of edges.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to an image measuring device and a program for realizing efficient edge detection. Background Art

[0002] An image measuring device is a device that captures an image of a measurement target object and measures the dimensions of a measurement portion of the measurement target object by analyzing the image (for example, refer to Patent Document 1).

[0003] [Prior art literature]

[0004] [Patent Document]

[0005] [Patent Document 1] Japanese Patent Application Publication No. 2010-169584 Summary of the invention

[0006] Problems to be solved by the invention

[0007] Conventionally, when measuring an image, an operator selects an edge of the object to be measured from the image of the object to be measured, and uses an edge detection tool that matches the shape of the edge to detect the edge. Furthermore, when measuring the length between two edges, for example, the length between the edges is measured after the two edges are detected. In other words, it is necessary to repeatedly select an edge from the image, use an edge detection tool, and detect two or more edges while confirming the edge position in detail.

[0008] An object of the present invention is to provide a vision measuring device and a program that can reduce the work of detecting edges.

[0009] Means for solving problems

[0010] The image measuring device of the present invention is an image measuring device that captures an image of a measurement object and measures the dimensions of a measurement portion of the measurement object by analyzing the image. The image measuring device comprises: a display unit that displays the image of the measurement object; an input unit that accepts an input of a trajectory drawn on the image displayed on the display unit by an operator; an edge detection unit that detects an edge based on the trajectory drawn on the image; and a measurement execution unit that executes measurement based on one or more edges detected by the edge detection unit.

[0011] The edge detection unit may detect an edge existing in a region along the center line of the track.

[0012] The edge detection unit may detect an edge existing within a range surrounded by the trajectory.

[0013] The edge detection unit may detect an edge having a shape similar to the shape of the trajectory.

[0014] Alternatively, the edge detection unit determines whether a shape similar to the point group data of the trajectory is a straight line by performing least squares fitting on the straight line and the point group data of the trajectory and calculating the RMSE (Root Mean Squared Error). If it is determined that it is not a straight line, the edge detection unit determines whether the shape similar to the point group data of the trajectory is a circle or an arc by performing least squares fitting on the point group data of the trajectory and calculating the RMSE (Root Mean Squared Error). If it is determined that it is a circle or an arc, the edge detection unit determines whether the shape similar to the point group data of the trajectory is a circle or an arc by calculating the center of gravity position of the point group data of the trajectory and the distance from the center of an optimal circle obtained by performing least squares fitting on the point group data of the trajectory.

[0015] The point group data of the trajectory may be obtained by converting thin lines obtained by thinning the image of the trajectory using a thinning algorithm into point group data.

[0016] Alternatively, when a shape similar to the point group data of the trajectory is determined to be a straight line, a straight line is extracted from the image of the measured object, which is within a detection range predetermined based on the trajectory and whose angle with the optimal straight line obtained by least squares fitting with the point group data of the trajectory is less than a predetermined threshold value; a reference straight line serving as a reference is determined from the extracted straight lines, i.e., the extracted straight lines, according to a predetermined rule; and a straight line obtained by connecting a straight line other than the reference straight line, whose distance from a perpendicular line drawn from a midpoint to an extension line of the reference straight line is less than a predetermined threshold value, to the reference straight line is detected as an element of the edge detection object.

[0017] Alternatively, when a shape similar to point group data of a trajectory is determined to be a circle, a circle is extracted from an image of the object to be measured, which is within a detection range predetermined based on the trajectory and in which the distance between the center of the circle and the center of the optimal circle is below a predetermined threshold value, and from among the extracted circles, a circle to be set as an element of an edge detection object is determined according to a predetermined rule.

[0018] Alternatively, when a shape similar to point group data of the trajectory is determined to be an arc, or when a shape similar to point group data of the trajectory is determined to be a circle and there is no circle in the detection range predetermined based on the trajectory whose center is less than a predetermined threshold value from the center of the optimal circle, an arc in the image of the measurement object, which is within the detection range predetermined based on the trajectory and whose center is a circle containing the arc, and whose center is less than a predetermined threshold value from the center of the optimal circle, is extracted; an arc set as a reference, namely a reference arc, is determined from the extracted arcs, namely the extracted arcs; and an arc or circle obtained by connecting an extracted arc other than the reference arc, whose radius difference between the radius of the circle containing the extracted arc and the radius of the reference arc is less than a predetermined threshold value, and the reference arc is detected as an element of the edge detection object.

[0019] The edge detection unit may detect the edge when the input of the trajectory to the input unit is interrupted.

[0020] The edge detection unit may detect an undetected edge every time the trajectory extends to a certain extent while the trajectory is being input to the input unit.

[0021] The display unit may be a touch panel display integrated with the input unit.

[0022] The functions of the vision measuring device of the present invention may be realized by describing the functions of the vision measuring device of the present invention in a program and causing a computer to execute the program.

[0023] Effects of the Invention

[0024] According to the vision measuring device and the program of the present invention, since edges can be detected by an intuitive operation in which the operator traces an image displayed on the display unit, the edge detection work can be reduced. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] Figure 1 FIG. 1 is a diagram showing an example of the appearance of the vision measuring device 1 of the present invention.

[0026] Figure 2 : is a schematic diagram showing the internal structure of the vision measuring device 1.

[0027] Figure 3 is a functional block diagram of the vision measuring device 1 .

[0028] Figure 4 FIG. 1 is a diagram showing an example of an image of a measurement object.

[0029] Figure 5 This is a diagram showing a state where an image of a measurement object is drawn.

[0030] Figure 6 This is a diagram showing an example of display of detected edges.

[0031] Figure 7 This is another diagram showing a state where an image of a measurement object is drawn.

[0032] Figure 8 This is another diagram showing an example of display of detected edges.

[0033] Fig. 9 This is a diagram showing an example of display of measurement results.

[0034] Fig.10 This is a diagram for explaining a case where the entire shape of the object to be measured is not drawn.

[0035] Fig.11 This is a diagram for explaining the correspondence when the entire shape of the object to be measured is not drawn.

[0036] Fig.12 This is a diagram for explaining the correspondence when there is a defect or a protrusion in the shape of the object to be measured.

[0037] Fig.13 It is a diagram for explaining a method of acquiring point group data of a trajectory.

[0038] Fig.14 It is a diagram for explaining a method of determining the shape of a trajectory.

[0039] Fig.15 This is a diagram for explaining the process of detecting an element when the determined shape is a straight line.

[0040] Fig.16 It is a diagram for explaining the process of detecting an element when the determined shape is an arc.

[0041] Fig.17 This is a diagram for explaining the process of detecting an element when the determined shape is a circle and the circle is extracted from the detection range.

[0042] Fig.18 This is a diagram for explaining the process of detecting an element when the determined shape is a circle and an arc is extracted from the detection range.

[0043] Fig.19 It is a diagram for explaining a detection process of a single element when a plurality of elements are drawn integrally.

[0044] Fig. 20 This is a diagram for explaining a detection process of one element when one element is divided into a plurality of elements and drawn.

[0045] Fig.21This is a diagram for explaining a process of detecting individual elements when a plurality of trajectories are collectively input. DETAILED DESCRIPTION

[0046] In the following description and drawings, the same functional parts are denoted by the same reference numerals, and the functional parts that have been described once are omitted or described only within the necessary scope.

[0047] Figure 1 1 is a schematic diagram showing an example of the appearance of the vision measuring device 1 of the present invention. Figure 2 1 is a schematic diagram showing an example of the internal structure of the vision measuring device 1 . Figure 3 : is a functional block diagram of the vision measuring device 1. In the present embodiment, the case where the coaxial epi-illumination method is adopted as the illumination method is described as an example, but the illumination method is not limited as long as the image of the measurement object can be captured.

[0048] The vision measuring device 1 includes a mounting stage 2 , an imaging unit 3 , a control and calculation unit 4 , a storage unit 5 , a display unit 6 , a telecentric optical system 7 , an illumination unit 8 , and an input unit 10 .

[0049] The mounting table 2 is a stand on which a measurement object (not shown) is mounted.

[0050] The imaging unit 3 is disposed opposite to the mounting table 2, and captures an image of the object to be measured placed on the mounting table 2 by receiving light from the direction of the mounting table 2. The imaging unit 3 includes an image sensor, and converts the brightness of the image formed on its light receiving surface into an electrical signal as image data. The image sensor adopts a CCD (Charge-Coupled Device) or a CMOS (Complementary Metal Oxide Semiconductor) which is a solid-state imaging element of a semiconductor.

[0051] The storage unit 5 is any storage means that can store digital data.

[0052] The display unit 6 is an arbitrary display means, and displays an image of the measurement target object imaged by the imaging unit 3 , and the like.

[0053] The telecentric optical system 7 includes an objective lens 71 for focusing light from the stage 2, and an imaging lens 72 for imaging the light reaching through the objective lens 71 on the light receiving surface of the imaging unit 3. The objective lens 71 and the imaging lens 72 may each be provided with a plurality of surfaces.

[0054] The illumination unit 8 is a coaxial epi-illumination unit including a light source 81 for emitting illumination light and a beam splitter 82, wherein the beam splitter 82 allows the illumination light from the light source 81 to be inserted into the telecentric optical system 7, and irradiates the mounting table 2 as coaxial epi-illumination light whose optical axis coincides with the optical axis of the imaging unit 3. In order to make the image clearer, the illumination unit 8 may also include transmissive illumination and side illumination in addition to the coaxial epi-illumination.

[0055] The input unit 10 receives input of a trajectory drawn by the operator on the image of the measurement object displayed on the display unit 6. For example, when a touch panel display configured integrally with the display unit 6 is used, input of a trajectory drawn by the operator's finger is received. In addition, when a mouse is used, input of a trajectory moved by the operator's pointer is received.

[0056] like Fig.10 As shown in FIG. 1 , when the object to be measured is large and part of it is missing from the image, and the overall shape of the object to be measured cannot be depicted, the image may be displayed as shown in FIG. Fig.11 The image is reduced as shown, and the portion not shown in the image of the outline is virtually drawn in the form of appearing in the blank space of the display thus generated, thereby accepting the input of the overall shape. In this case, the accuracy of the shape description (trace) is poor for the virtually drawn portion, so the point group data within the image range can also be weighted to perform the calculation of the RMSE described later.

[0057] In addition, if Fig.12 As in the examples shown in (a) and (b), when part of a line or a circle is missing, it is also possible to Fig.12 As in the examples shown in (c) and (d), the image is drawn continuously including the missing part.

[0058] In addition, if Fig.12 As in the example shown in (e), when there is a protruding portion with respect to a part of a line or a circle, it is also possible to Fig.12 As in the example shown in (f), it is drawn continuously without protruding.

[0059] The control and calculation unit 4 controls each unit in the vision measuring device 1 and performs necessary calculation processing to realize image capturing and image measurement by the vision measuring device 1 .

[0060] In the present invention, the control operation unit 4 includes an edge detection unit 41 and a measurement execution unit 42 .

[0061] The edge detection unit 41 detects edges based on the trajectory drawn on the image of the object to be measured displayed on the display unit 6 and received by the input unit 10. At this time, the detected edge may be displayed superimposed on the image of the object to be measured. Figure 4When the image of the object to be measured is shown, Figure 5 Draw the part where you want to detect the edge on the image as shown. Figure 6 Detect edges as shown.

[0062] The drawn track can also be directly used as the edge detection range. For example, the area along the center line of the track, more specifically, the area of ​​a certain width from the center line of the track can be used as the detection range. In addition, the range surrounded by the track can also be used as the detection range. By setting the range surrounded by the track as the detection range, for example, when the edges exist in concentric circles, the detection can be summarized.

[0063] Applying a detection processing method corresponding to the shape of the edge of the detection object can detect the edge with high accuracy. Therefore, the edge detection unit 41 determines the shape of the drawn trajectory as any shape with the highest similarity among a straight line, an arc, a circle, etc. The shape of the trajectory is determined by fitting the point group data of the trajectory with a straight line or a circle.

[0064] For example, Fig.13 As shown in (a), the point group data of the trajectory can also be obtained as the point group data PC of the trajectory T drawn by the finger or the pointer of the mouse. When drawing with a finger, the trajectory T has a width, so for example, the point group data of the trajectory of the coordinates of the midpoint in the width direction or the point group data of the trajectory of the coordinates of the center of gravity of the contact range of the finger can be obtained. In addition, when an image of the trajectory is separately created by drawing software, etc. and read in for use, the coordinate data cannot be obtained, so as Fig.13 As shown in (b), the trajectory image M can also be thinned by the Zhang-Suen algorithm or the like, and the obtained thin lines TL can be obtained by digitizing a point group.

[0065] The point group data of the trajectory thus acquired is fitted with a straight line or a circle, for example, through the following process, and classified into various shapes based on statistical processing. In addition, in order to improve the accuracy of fitting, outliers can also be removed by RANSAC (random sample consensus) before fitting.

[0066] First, a straight line is fitted to the point group data by least squares fitting, and the RMSE (Root Mean Squared Error: the error value represented by the square root of the square average of the residuals) at this time, i.e., the line RMSE, is calculated. Alternatively, it can be converted into the line RMSE per unit length obtained by dividing it by the length of the straight line (hereinafter referred to as the "optimal straight line") fitted to the point group data. When the line RMSE calculated in this way is below a predetermined value, it is determined that the shape with similar trajectories is a straight line.

[0067] When the line RMSE is larger than a predetermined value, the circle is fitted to the point group data by least squares fitting, and the RMSE at this time, i.e., the circle RMSE, is calculated. In addition, it can also be converted into the circle RMSE per unit radius obtained by dividing it by the radius of the circle fitted to the point group data (hereinafter referred to as the "optimal circle"). If the circle RMSE calculated in this way is below a predetermined value, it is determined that the shape similar to the trajectory is a circle or an arc. On the other hand, when the circle RMSE is larger than a predetermined value, it is determined that the shape of the trajectory is other than a straight line, a circle, and an arc.

[0068] Fig.14 (a) shows a diagram summarizing rules for classifying similar shapes of point group data of trajectories into straight lines, circles, and arcs, and other rules, based on the values ​​of line RMSE and circle RMSE.

[0069] In the case where the trajectory-like shape is determined to be a circle or an arc, it is further determined whether the distance between the centroid position of the point group data and the center of the optimal circle is less than a predetermined distance. It can also be determined by whether the ratio of the distance between the centroid position of the point group data and the center of the optimal circle and the radius of the optimal circle is less than a predetermined value. When it is less than a predetermined distance or less than a predetermined value, the shape of the trajectory is determined to be a circle. Otherwise, the shape of the trajectory is determined to be an arc. For example, Fig.14 As shown in (b), when the distance D1 between the centroid position of the point group data PC and the center of the optimal circle FC is less than a predetermined distance S, the shape similar to the point group data PC is determined to be a circle. Fig.14 As shown in (c), when the distance D1 between the centroid position of the point cloud data PC and the center of the optimal circle FC is greater than a predetermined distance S, the shape similar to the point cloud data PC is determined to be an arc.

[0070] Then, a detection processing method corresponding to the determined shape is applied to detect the edge of the shape from the image in the detection range. At this time, if there are multiple edges that match the determined shape, multiple edges can also be detected. Figure 6 In the example of , an example of detecting two edges is shown. In addition, when there are multiple edges that match the determined shape, edges with higher similarity to the determined shape can also be detected in a limited manner. In addition, when the edge is discontinuous but has a determined shape as a whole, it can also be detected as an integrated edge of the shape.

[0071] For example, a certain area along an optimal straight line or optimal circle or a range of an image of a trajectory is used as a detection range, and the edge of the determined shape is detected according to the following procedure.

[0072] When the determined shape is a straight line, first, from the image of the object to be measured, Fig.15 In the straight line of the predetermined detection range DA shown in (a), as Fig.15 As shown in (b), a straight line whose angle with the optimal straight line FL is less than a predetermined threshold is extracted. Next, from the extracted straight lines (hereinafter referred to as "extracted straight lines EL"), Fig.15 As shown in (c), a straight line used as a reference (hereinafter referred to as "reference straight line BEL") is determined according to a predetermined rule. The reference straight line BEL is determined based on, for example, the length of the straight line and the degree of proximity to the optimal straight line. Next, for each of the extracted straight lines other than the reference straight line, the distance D2 from the midpoint to the perpendicular line obtained by extending the reference straight line is calculated, and the distance D2 is calculated as follows: Fig.15 As shown in (d), the extraction straight line SEL whose distance D2 is less than a predetermined threshold value is determined. Next, the extraction straight line SEL is connected to the reference straight line BEL, as shown in FIG. Fig.15 As shown in (e), the straight line element LE as the edge detection object is detected. When connecting, the extraction straight line SEL of the connection object is moved to the extension line of the reference straight line BEL. If there is a gap between the reference straight line BEL, the gap is filled and connected. Then, the straight line edge detection tool is applied to the detected straight line element LE to detect the edge.

[0073] When the detection range includes multiple straight line elements, multiple reference straight lines can also be determined. For each reference straight line, the distance between the extracted straight line and the reference straight line is calculated, and the straight line obtained by connecting the extracted straight line with a distance below the threshold and the reference straight line is detected as an element.

[0074] When the determined shape is an arc, first, Fig.16 The image of the object to be measured shown in (a) is within the arc of the predetermined detection range DA. Fig.16 As shown in (b), the arc whose center of the circle containing the arc is less than a predetermined threshold value from the center of the optimal circle FC is extracted. Fig.16 As shown in (c), an arc to be used as a reference (hereinafter referred to as a reference arc BEA) is determined from the extracted arcs (hereinafter referred to as "extracted arcs EA") according to a predetermined rule. The reference arc BEA is determined based on, for example, the length of the arc, the proximity to the center of the optimal circle FC, and the smallness of the difference in radius from the optimal circle FC. Fig.16As shown in (d), among the extracted arcs EA other than the reference arc BEA, an extracted arc SEA is determined, in which the difference D3 between the radius of the circle containing the extracted arc EA and the radius of the reference arc is less than a predetermined threshold value. Next, the extracted arc SEA is connected to the reference arc BEA, as shown in FIG. Fig.16 As shown in (e), the arc element AE as the edge detection object is detected. When connecting, the extracted arc SEA of the connection object is moved to the circle containing the reference arc BEA. If there is a gap between the reference arc BEA, the gap other than the largest gap is filled to connect. Then, the arc edge detection tool is applied to the detected arc element AE to detect the edge.

[0075] When the determined shape is a circle, first, Fig.17 (a) Fig.18 From the circles and arcs in the image of the object to be measured as shown in (a), which are within a predetermined detection range DA, circles whose centers are at a distance below a predetermined threshold from the center of an optimal circle FC and arcs whose centers within the arcs are at a distance below a predetermined threshold from the center of the optimal circle FC are extracted.

[0076] In such Fig.17 When a circle is extracted as shown in (b), Fig.17 As shown in (c), a circle to be used as a reference (hereinafter referred to as a "reference circle BEC") is determined from the extracted circles (hereinafter referred to as "extracted circles EC") according to a predetermined rule. The reference circle BEC is determined based on, for example, the degree of proximity to the center of the optimal circle FC and the smallness of the difference in radius from the optimal circle FC. Then, the reference circle BEC is used as the circle element CE of the edge detection object, as shown in FIG. Fig.17 Detection is performed as shown in (d), and a circle edge detection tool is applied to the circle element CE to detect the edge.

[0077] In the unextracted circle Fig.18 When the arc is extracted as shown in (b), Fig.18 As shown in (c), the reference arc BEA is determined from the extracted arc EA according to a predetermined rule. The reference arc BEA is determined based on, for example, the proximity to the center of the optimal circle FC and the smallness of the difference between the optimal circle FC and the radius. The reference arc BEA is determined based on, for example, the length of the arc, the proximity to the center of the optimal circle FC and the smallness of the difference between the optimal circle FC and the radius. Fig.18 As shown in (d), among the extracted arcs EA other than the reference arc BEA, an extracted arc SEA is determined, in which the difference D3 between the radius of the circle containing the extracted arc EA and the radius of the reference arc is less than a predetermined threshold value. Next, the extracted arc SEA is connected to the reference arc BEA, as shown in FIG. Fig.18As shown in (e), the circular element CE as the edge detection object is detected. When connecting, the extracted arc SEA of the connecting object is moved to the circle containing the reference arc BEA. If there is a gap between the reference arc BEA, the gap is filled and connected. Then, the edge detection tool of the circle is applied to the detected circular element CE to detect the edge.

[0078] When the detection range includes a plurality of circular or arc-shaped edges, a plurality of reference circles or reference arcs may be determined. When the reference circle can be determined, each of the determined reference circles may be detected as an element of the edge detection object. In the case of the reference arc, for each reference arc, a circle or arc obtained by connecting an extracted arc whose radius containing the extracted arc has a difference of less than a threshold value with the reference arc and the reference arc may be detected as an element of the edge detection object.

[0079] In addition, even if multiple connected elements are depicted as a whole, the multiple elements can be detected individually. For example, when fitting each point of the drawn point group data into each shape, it is evaluated whether it is within the threshold of RANSAC. When the number of points within the threshold is less than the predetermined number, the point group data is segmented by a binary tree method, etc., and each point group data is fitted into each shape and evaluated by RANSAC. If the number of points within the threshold is greater than the predetermined number, the segmentation is terminated, thereby, for two point group data, element detection processing can be performed based on the determined shapes. On the other hand, if the number of points within the threshold is less than the predetermined number, the segmentation is repeated until it becomes greater than the predetermined number.

[0080] For example, the trajectory T obtained by continuously drawing the straight line elements E1 and E2 with a finger is as follows: Fig.19 As shown in (a), we get Fig.19 (b) shows the point group data PC of the trajectory T. At this time, first, as Fig.19 As shown in (c), the optimal straight line FL and the optimal circle FC are fitted to the point group data PC respectively, and evaluated by RANSAC. As a result of the evaluation, if the number of points within the threshold is less than the predetermined number, then Fig.19 As shown in (d), the point group data PC is divided into point group data PC1 and point group data PC2. Then, the point group data PC1 is fitted to the optimal straight line FL1 and evaluated by RANSAC, and the point group data PC2 is fitted to the optimal straight line FL2 and evaluated by RANSAC. As a result, if the number of points within the threshold is greater than the predetermined number, the segmentation is terminated, and the element detection processing can be performed on the two point group data based on the determined shapes.

[0081] On the contrary, even if an element is divided into multiple parts for depiction, the element can be detected as a whole. For example, when fitting each point of the point group data of the initially drawn trajectory into each shape, it is evaluated whether the position is within the threshold of RANSAC in each shape, and when the number of points within the threshold in any shape is greater than a predetermined number, the shape of the point group data is temporarily determined. However, when fitting each point into each shape by merging the point group data of more than one trajectory that is subsequently drawn continuously with the point group data of the initially drawn trajectory, it is evaluated whether the position is within the threshold of RANSAC in each shape, and when the number of points within the threshold in any shape is greater than when the point group data of fewer trajectories is used for evaluation, the point group data of more than two trajectories are continuously drawn and merged to determine the shape. As a result, even if an element is divided into multiple parts for depiction, it can be detected as a whole.

[0082] For example, suppose that the circular element E is divided into two and the trajectories T1 and T2 drawn by the finger are as follows: Fig. 20 As shown in (a), we get Fig. 20 (b) shows the point group data PC1 and PC2 of the trajectories T1 and T2. Fig. 20 As shown in (c), the optimal circle FC is fitted only to the point group data PC1, and the evaluation is performed by RANSAC. If the number of points within the threshold is greater than a predetermined number, the shape of the point group data is temporarily determined to be a circle or an arc. Fig. 20 As shown in (d), point group data PC2 is further added to fit the optimal circle FC and evaluated by RANSAC. If the number of points within the threshold is greater than when only point group data PC1 is used, the shape of the merger of point group data PC1 and point group data PC2 is determined to be a circle.

[0083] The edge detection and screen display may be executed upon interruption after the input of the trajectory to the input unit 10 starts, or the detection of undetected edges and screen display may be executed in real time every time the trajectory extends to a certain extent while the trajectory input continues.

[0084] The input of the trajectory from the input unit 10 and the detection of the edge in the edge detection unit 41 are repeated until the detection of the edge required for the measurement of the desired measurement part is completed. Figure 6 As shown in FIG. 1 , after the edge detection of a certain measurement part is completed, in the case of further detecting the edge of other measurement parts, the edge detection of other measurement parts is performed as follows. Figure 7 The other measurement location on the image is depicted as shown, such as Figure 8 As shown, the edge present at the other measurement location is detected.

[0085] In addition, for a plurality of elements, instead of processing each input trajectory, processing may be performed based on a plurality of input trajectories as a whole.

[0086] For example, Fig.21 As shown in the figure, when 6 trajectories are input and point group data PC1 to PC6 corresponding to the 1st to 6th trajectories are obtained, first, the 1st trajectory is focused on and only the point group data PC1 is used to find the number of points within the threshold in RANSAC. Next, the number of points within the threshold is similarly found using the point group data PC1 and PC2 of the 1st and 2nd trajectories. Next, the number of points within the threshold is similarly found using the point group data PC1 to PC3 of the 1st to 3rd trajectories. In this regard, the number of points within the threshold is similarly found until the point group data PC1 to PC6 of the 1st to 6th trajectories are used. Then, by performing the above-mentioned processing on the point group data with the largest number of points within the threshold, the first element can be detected. If a straight line or circle is drawn at a time, the number of points within the threshold is usually the largest when only the point group data of the 1st trajectory is used. That is, one element is detected based on one trajectory. On the other hand, if a straight line or circle is divided into m parts and drawn, the number of points within the threshold is usually the largest when the point group data of the 1st to mth trajectories is used, that is, one element is detected based on m trajectories. For example, even if a circle is drawn with two trajectories per semicircle, it can still be detected as a circle.

[0087] After the detection of the first element is completed, the point group data other than the point group data used in the detection of the first element is used to detect the second and subsequent elements in the same way as the detection of the first element. For example, after the first element is detected based on the first and second trajectories, when detecting the second element, the third trajectory is focused on, and only the point group data of the third trajectory is used to calculate the number of points within the threshold in RANSAC. In this regard, the number of points within the threshold is calculated in the same way until the point group data of the third to sixth trajectories is used, and the second element can be detected by performing the above-mentioned processing on the point group data in the case where the number of points within the threshold is the largest.

[0088] In addition, when it is impossible to detect elements using this method, it is further possible to imagine that one trajectory contains more than two elements. As mentioned above, the point group data is segmented, and each point group data is evaluated based on RANSAC to try to extract more than two elements.

[0089] The measurement execution unit 42 executes measurement based on the one or more edges detected by the edge detection unit 41. Measurement items such as length dimension and angle dimension may be specified when the measurement is executed or may be specified before the measurement is executed.

[0090] Fig. 9 When the measurement item is the length between two edges, the measurement result is displayed superimposed on the display. Figure 8 The following figure shows an example of an image of an edge detection result. Regarding the execution of measurement and the display of measurement results, the execution of measurement and the display of measurement results can be performed sequentially from the location where the edge detection required for the measurement of the measurement item has been completed, or after the edge detection of multiple locations has been completed, the execution of measurement and the display of measurement results for the multiple locations can be performed collectively. Figures 5 to 8 For example, when the measurement is performed and the measurement results are displayed in sequence, Figure 6 As shown, at the moment when two edges of a certain measurement part are detected, the measurement of the measurement part is performed and the measurement result is displayed, and then, as shown in FIG. Figure 8 As shown, at the time when two edges of the other measurement location are detected, the measurement of the other measurement location is performed and the measurement result is displayed.

[0091] The present invention may also be implemented by configuring the control operation unit 4 with a CPU, and executing a program describing the functions of the edge detection unit 41 and the measurement execution unit 42, and the functions of controlling the imaging unit 3, the lighting unit 8, etc. The program may be read from the storage unit 5 or from another storage unit. The control operation unit 4 and the storage unit 5 may be provided in the main body of the vision measuring device 1 or in a device such as a personal computer communicably connected to the main body of the vision measuring device 1.

[0092] According to the vision measuring device of the present invention described above, since the edge can be detected by an intuitive operation in which the operator traces the image displayed on the display unit, the edge detection work can be reduced.

[0093] The present invention is not limited to the above-mentioned embodiments and variations. The above-mentioned embodiments and variations are illustrative, and the technical solutions having substantially the same structure as the technical ideas described in the claims of the present invention and having the same effects are all included in the technical scope of the present invention. That is, the technical ideas expressed in the present invention can be appropriately changed within the scope, and the methods to which such changes and improvements are applied are also included in the technical scope of the present invention.

[0094] [Explanation of Symbols]

[0095] 1 Image measuring device; 2 Stage; 3 Camera unit; 4 Control and calculation unit; 5 Storage unit; 6 Display unit; 7 Telecentric optical system; 8 Illumination unit; 10 Input unit; 41 Edge detection unit; 42 Measurement execution unit; AE Arc element; BEA Reference arc; BEC Reference circle; BEL Reference straight line; CE Circle element; D1, D2, S distances; D3 Radius difference; DA Detection range; E, E1, E2 elements; EA Extracted arc; EC Extracted circle; EL Extracted straight line; FC Optimal circle; FL, FL1, FL2 Optimal straight lines; LE Straight line element; M Track image; PC, PC1 to PC6 Point group data; SEA Extracted arc whose radius difference D3 is below the threshold; SEL Extracted straight line whose distance D2 is below the threshold; T, T1, T2 Track; TL Fine line.

Claims

1. An image measuring device that captures an image of an object to be measured and measures the dimensions of a measurement portion of the object to be measured by analyzing the image. The image measuring device comprises: A display unit that displays an image of the object to be measured; an input unit that receives an input of a trajectory drawn on the image displayed on the display unit by an operator; an edge detection unit that detects an edge based on a trajectory drawn on the image; and The measurement execution unit executes measurement based on the detected one or more edges.

2. The image measuring device according to claim 1, wherein: The edge detection section detects an edge present in a region along the center line of the track.

3. The image measuring device according to claim 1, wherein: The edge detection unit detects an edge existing in a range surrounded by the trajectory.

4. The image measuring device according to claim 1, wherein: The edge detection unit detects an edge having a shape similar to the shape of the trajectory.

5. The image measuring device according to claim 4, wherein: The edge detection unit determines whether the shape similar to the point group data of the trajectory is a straight line by performing least squares fitting on the straight line and the point group data of the trajectory and calculating the root mean square error (RMSE). If it is determined that it is not a straight line, the edge detection unit determines whether the shape similar to the point group data of the trajectory is a circle or an arc by performing least squares fitting on the point group data of the trajectory and calculating the root mean square error (RMSE). If it is determined that it is a circle or an arc, the edge detection unit determines whether the shape similar to the point group data of the trajectory is a circle or an arc by calculating the center of gravity position of the point group data of the trajectory and the distance from the center of the optimal circle obtained by performing least squares fitting on the point group data of the trajectory.

6. The image measuring device according to claim 5, wherein: The point group data of the trajectory is obtained by converting thin lines obtained by thinning the image of the trajectory using a thinning algorithm into point group data.

7. The image measuring device according to claim 5, wherein: In the case where a shape similar to the point group data of the trajectory is determined to be a straight line, a straight line is extracted from the straight lines in the image that are within a detection range predetermined based on the trajectory and whose angle with the optimal straight line obtained by least squares fitting with the point group data of the trajectory is less than a predetermined threshold value. From the extracted straight lines, i.e., the extracted straight lines, a reference straight line set as a reference is determined according to a predetermined rule, and a straight line obtained by connecting a straight line other than the reference straight line, whose distance from a perpendicular line drawn from a midpoint to an extension line of the reference straight line is less than a predetermined threshold value, and the reference straight line is detected as an element of an edge detection object.

8. The image measuring device according to claim 5, wherein: When a shape similar to the point group data of the trajectory is determined to be a circle, a circle in the image that is within a detection range predetermined based on the trajectory and whose center is at a distance below a predetermined threshold from the center of the optimal circle is extracted, and from among the extracted circles, a circle that is set as an element of an edge detection object is determined according to a predetermined rule.

9. The image measuring device according to claim 5, wherein: In the case where a shape similar to the point group data of the trajectory is determined to be an arc, or in the case where a shape similar to the point group data of the trajectory is determined to be a circle, and in the detection range predetermined based on the trajectory, there is no circle in which the distance between the center of the circle and the center of the optimal circle is less than a predetermined threshold, an arc in the image that is within the detection range predetermined based on the trajectory and in which the distance between the center of the circle containing the arc and the center of the optimal circle is less than a predetermined threshold is extracted, and from the extracted arcs, namely the extracted arcs, an arc set as a reference, namely the reference arc, is determined, and an arc or circle obtained by connecting the extracted arc other than the reference arc in which the difference between the radius of the circle containing the extracted arc and the radius of the reference arc is less than a predetermined threshold and the reference arc is detected as an element of the edge detection object.

10. The image measuring device according to claim 1, wherein: The edge detection unit detects an edge when the input of the trajectory to the input unit is interrupted.

11. The image measuring device according to claim 1, wherein: The edge detection unit detects an undetected edge every time the trajectory extends to a certain extent while the trajectory is being input to the input unit.

12. The image measuring device according to claim 1, wherein: The display unit is a touch panel display in which the input unit is integrated. 13 . A program for causing a computer to function as the vision measuring device according to claim 1 .

Citation Information

Patent Citations

  • Image measuring device and computer program

    JP2010169584A