CN113566721B - Screw aperture measuring method and device - Google Patents

Screw aperture measuring method and device Download PDF

Info

Publication number
CN113566721B
CN113566721B CN202110848013.4A CN202110848013A CN113566721B CN 113566721 B CN113566721 B CN 113566721B CN 202110848013 A CN202110848013 A CN 202110848013A CN 113566721 B CN113566721 B CN 113566721B
Authority
CN
China
Prior art keywords
polarity
edge
point
edge point
matching
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110848013.4A
Other languages
Chinese (zh)
Other versions
CN113566721A (en
Inventor
赵敏
姚毅
杨艺
全煜鸣
金刚
彭斌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Lingyun Shixun Technology Co ltd
Luster LightTech Co Ltd
Original Assignee
Shenzhen Lingyun Shixun Technology Co ltd
Luster LightTech Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Lingyun Shixun Technology Co ltd, Luster LightTech Co Ltd filed Critical Shenzhen Lingyun Shixun Technology Co ltd
Priority to CN202110848013.4A priority Critical patent/CN113566721B/en
Publication of CN113566721A publication Critical patent/CN113566721A/en
Application granted granted Critical
Publication of CN113566721B publication Critical patent/CN113566721B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01BMEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
    • G01B11/00Measuring arrangements characterised by the use of optical techniques
    • G01B11/08Measuring arrangements characterised by the use of optical techniques for measuring diameters
    • G01B11/12Measuring arrangements characterised by the use of optical techniques for measuring diameters internal diameters
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/13Edge detection

Abstract

The application provides a screw aperture measuring method and device, comprising the steps of obtaining an aperture image to be measured of a screw hole; determining a plurality of groups of edge areas on an aperture image to be measured through a caliper tool; determining a polar edge point in each edge region, wherein the polar edge point comprises a first polar edge point and a second polar edge point; performing point pair matching on each edge region, and determining a matched polarity edge point pair, wherein the matched polarity edge point pair is two polarity edge points with opposite polarities and in the same thread region; determining a matching polarity edge point pair meeting ideal matching conditions as an ideal matching polarity edge point pair; determining a searching starting point in an ideal matching polarity edge point pair; performing least square fitting on a first polarity edge point along a preset direction from a searching starting point to determine the aperture size of a screw hole; according to the screw hole imaging measurement method, the measurement accuracy of the screw hole is improved, and the hole diameter measurement efficiency is improved.

Description

Screw aperture measuring method and device
Technical Field
The application relates to the technical field of image detection, in particular to a screw aperture measuring method and device.
Background
The screw hole is a screw through hole, is used for installing the screw on the work piece, and the screw inner wall has the screw thread, carries out screw-thread fit with the screw that the rotation got into, and the screw is the metal round bar that one end has a head, the other end is threaded, in the screw hole on the direct screw in work piece, connect or fixed effect, and the screw hole leads to the aperture size of screw hole to have the deviation in the production process.
The traditional measuring mode is to use a tool for measuring the internal thread size of the screw hole by using a threaded plug gauge, after a measuring person aligns the threaded plug gauge with the corresponding specification with the measured screw hole, the threaded plug gauge is rotated to enable the threaded plug gauge to rotate into the screw hole in a free state until no movable space exists, and whether the aperture of the screw hole is qualified is judged by the threaded plug gauge.
However, the conventional method results in low measurement accuracy and is affected by the operation force of the measurer.
Disclosure of Invention
The application provides a screw aperture measurement method and device, which are used for solving the technical problem of low aperture measurement precision of screw holes.
In order to achieve the above purpose, the embodiment of the present application adopts the following technical scheme:
in a first aspect, there is provided a screw aperture measurement method, the method comprising:
acquiring an aperture image to be detected of a screw hole;
determining a plurality of groups of edge areas on the aperture image to be measured through a caliper tool, wherein the caliper tool is arranged on the circumference of a screw hole along a preset direction by taking the center of the screw hole as the center of the circle;
determining a polarity edge point in each edge region, wherein the polarity edge point comprises a first polarity edge point and a second polarity edge point, the gray scale of the first polarity edge point is from dark to light, and the gray scale of the second polarity edge point is from light to dark;
performing point pair matching on each edge region, and determining a matched polarity edge point pair, wherein the matched polarity edge point pair is two polarity edge points with opposite polarities and in the same thread region;
determining a matching polarity edge point pair meeting ideal matching conditions as an ideal matching polarity edge point pair;
determining a searching starting point in the ideal matching polarity edge point pair, wherein the searching starting point is a first polarity edge point;
and performing least square fitting on the first polar edge point along the preset direction from the searching starting point to determine the aperture size of the screw hole.
In one possible implementation manner, the obtaining of the aperture image to be measured includes:
determining a positioning core in the image through a geometric positioning template, wherein the positioning core is the edge of a screw hole;
and removing the area outside the positioning nucleus in the image through a mask to obtain an aperture image to be detected.
In one possible implementation, before performing the point-to-point matching on each edge region, the method further includes:
and performing Blob analysis on all the thread areas in the aperture image to be detected, and removing the corresponding thread areas if the thread areas are smaller than the preset area.
In one possible implementation, the step of performing point pair matching on each edge region and determining a matching polarity edge point pair includes:
for each edge area, acquiring a first polar edge point nearest to the center of the screw hole, and filtering a second polar edge point on a connecting line of the first polar edge point and the center of the screw hole;
and on the same thread region along the radius of the screw hole, if the second polarity edge points exist, determining a matching polarity edge point pair, otherwise, filtering the corresponding first polarity edge points.
In one possible implementation, the satisfaction of the ideal matching condition includes:
the distance between the polar edge points in each pair of matching polar edge points is greater than or equal to a preset distance threshold, and,
if only one pair of matching polarity edge point pairs exists in the edge region, the corresponding matching polarity edge point pairs meet ideal matching conditions;
if a plurality of pairs of matching polarity edge point pairs exist in the edge region and are on the same threaded region, the matching polarity edge point pairs far away from the center of the screw hole meet ideal matching conditions;
if a plurality of pairs of matching polarity edge points exist in the edge region and are not on the same thread region, the pairs of matching polarity edge points with large distances between the polarity edge points meet ideal matching conditions.
In one possible implementation, each pair of matching polarity edge points includes a first polarity edge point and a second polarity edge point.
In one possible implementation manner, the determining of the search starting point includes:
the distance between the searching starting point and the positioning core is larger than a first preset threshold value, the distance between the searching starting point and the previous point is larger than a second preset threshold value, and the distance between the searching starting point and the next point is smaller than a third preset threshold value;
the previous point is a point before the searching starting point along the preset direction, and the next point is a point after the searching starting point along the preset direction.
By the above technology, the application provides a screw aperture measuring method, which comprises the steps of obtaining an aperture image to be measured of a screw hole; determining a plurality of groups of edge areas on the aperture image to be measured through a caliper tool, wherein the caliper tool is arranged on the circumference of a screw hole along a preset direction by taking the center of the screw hole as the center of the circle; determining a polarity edge point in each edge region, wherein the polarity edge point comprises a first polarity edge point and a second polarity edge point, the gray scale of the first polarity edge point is from dark to light, and the gray scale of the second polarity edge point is from light to dark; performing point pair matching on each edge region, and determining a matched polarity edge point pair, wherein the matched polarity edge point pair is two polarity edge points with opposite polarities and in the same thread region; determining a matching polarity edge point pair meeting ideal matching conditions as an ideal matching polarity edge point pair; determining a searching starting point in the ideal matching polarity edge point pair, wherein the searching starting point is a first polarity edge point; and performing least square fitting on the first polar edge point along the preset direction from the searching starting point to determine the aperture size of the screw hole. According to the screw hole imaging measurement method, the measurement accuracy of the screw hole is improved, and the hole diameter measurement efficiency is improved.
In a second aspect, there is provided a screw aperture measuring device, the device comprising:
an image acquisition unit configured to acquire an aperture image to be measured of the screw hole;
an image processing unit configured to:
determining a plurality of groups of edge areas on the aperture image to be measured through a caliper tool, wherein the caliper tool is arranged on the circumference of a screw hole along a preset direction by taking the center of the screw hole as the center of the circle;
determining a polarity edge point in each edge region, wherein the polarity edge point comprises a first polarity edge point and a second polarity edge point, the gray scale of the first polarity edge point is from dark to light, and the gray scale of the second polarity edge point is from light to dark;
performing point pair matching on each edge region, and determining a matched polarity edge point pair, wherein the matched polarity edge point pair is two polarity edge points with opposite polarities and in the same thread region;
determining a matching polarity edge point pair meeting ideal matching conditions as an ideal matching polarity edge point pair;
determining a searching starting point in the ideal matching polarity edge point pair, wherein the searching starting point is a first polarity edge point;
and performing least square fitting on the first polar edge point along the preset direction from the searching starting point to determine the aperture size of the screw hole.
In one possible implementation, the image processing unit further includes a matching polarity edge point pair unit configured to:
for each edge area, acquiring a first polar edge point nearest to the center of the screw hole, and filtering a second polar edge point on a connecting line of the first polar edge point and the center of the screw hole;
and on the same thread region along the radius of the screw hole, if the second polarity edge points exist, determining a matching polarity edge point pair, otherwise, filtering the corresponding first polarity edge points.
In one possible implementation, the image processing unit further includes an ideal matching polarity edge point pair unit configured to:
the distance between the polar edge points in each pair of matching polar edge points is greater than or equal to a preset distance threshold, and,
if only one pair of matching polarity edge point pairs exists in the edge region, the corresponding matching polarity edge point pairs meet ideal matching conditions;
if a plurality of pairs of matching polarity edge point pairs exist in the edge region and are on the same threaded region, the matching polarity edge point pairs far away from the center of the screw hole meet ideal matching conditions;
if a plurality of pairs of matching polarity edge points exist in the edge region and are not on the same thread region, the pairs of matching polarity edge points with large distances between the polarity edge points meet ideal matching conditions.
In view of the above, the present application provides a screw aperture measurement device including an image acquisition unit configured to acquire an aperture image to be measured of a screw hole; an image processing unit configured to determine a plurality of groups of edge areas on the aperture image to be measured by a caliper tool, the caliper tool being arranged along a preset direction on the circumference of the screw hole by taking the center of the screw hole as a center; determining a polarity edge point in each edge region, wherein the polarity edge point comprises a first polarity edge point and a second polarity edge point, the gray scale of the first polarity edge point is from dark to light, and the gray scale of the second polarity edge point is from light to dark; performing point pair matching on each edge region, and determining a matched polarity edge point pair, wherein the matched polarity edge point pair is two polarity edge points with opposite polarities and in the same thread region; determining a matching polarity edge point pair meeting ideal matching conditions as an ideal matching polarity edge point pair; determining a searching starting point in the ideal matching polarity edge point pair, wherein the searching starting point is a first polarity edge point; performing least square fitting on a first polar edge point along the preset direction from the searching starting point to determine the aperture size of the screw hole; according to the screw hole imaging measurement method, the measurement accuracy of the screw hole is improved, and the hole diameter measurement efficiency is improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a method for measuring screw hole diameter according to an embodiment of the present application;
FIG. 2 is a schematic diagram of determining an aperture image to be measured by a positioning kernel in an embodiment of the present application;
FIG. 3 is a schematic illustration of a calliper tool placement in an embodiment of the present application;
FIG. 4 is a schematic diagram of determining polar edge points in an embodiment of the present application;
FIGS. 5a-5b are schematic illustrations of determining a pair of edge points of ideal matching polarity in an embodiment of the present application;
fig. 6 is a schematic diagram of a search start point in an embodiment of the present application.
Detailed Description
In order to make the present application solution better understood by those skilled in the art, the following description will be made in detail and with reference to the accompanying drawings in the embodiments of the present application, it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without making any inventive effort, shall fall within the scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of the present application and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that embodiments of the present application described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
The present application is described in further detail below with reference to the accompanying drawings:
an embodiment of the present application provides a method for measuring a screw hole diameter, referring to fig. 1, the method includes the following steps:
s101, acquiring an aperture image to be detected of the screw hole.
As shown in fig. 2, the positioning core in the image is determined by the geometric positioning template, wherein the positioning core is the edge of the screw hole, namely, the outline shown by an arrow; and removing the area outside the positioning nucleus in the image through a mask to obtain an aperture image to be detected.
S102, determining a plurality of groups of edge areas on the aperture image to be measured through a caliper tool.
As shown in fig. 3, the caliper tool is placed and arranged along a preset direction on the circumference of the screw hole by taking the center of the screw hole as the center of the circle; wherein the preset direction starts from the arrow position in fig. 3 and is clockwise along the circumference; one for each edge area.
In one embodiment, the preset direction may be a clockwise direction from any point on the circumference or a counterclockwise direction from any point on the circumference.
S103, determining a polarity edge point in each edge area.
In each edge region, a polar edge point is determined along a direction from the center of the circle to the circumference, and comprises a first polar edge point and a second polar edge point, wherein the gray scale of the first polar edge point is from dark to light, and the gray scale of the second polar edge point is from light to dark. As shown in fig. 4, wherein the first polarity edge points are dark gray crosses and the second polarity edge points are light gray crosses.
And S104, carrying out point pair matching on each edge area, and determining a matching polarity edge point pair.
Before performing the point-to-point matching on each edge region in step S104, the method further includes: and (3) performing Blob analysis (connected domain analysis) on all the threaded regions in the aperture image to be detected, performing Blob analysis on the white region in the screw hole shown in fig. 4 to obtain a plurality of independent and connected threaded regions, and removing the corresponding threaded regions if the threaded regions are smaller than a preset area to obtain a target threaded region needing further analysis.
In the target thread region in each edge region, a pair of matching polarity edge points is determined, the pair of matching polarity edge points being two polarity edge points of opposite polarity and in the same thread region.
In one embodiment, if there are multiple target thread regions in the edge region, the number of pairs of matching polarity edge points obtained may be multiple or one.
S105, determining the matching polarity edge point pair meeting the ideal matching condition as an ideal matching polarity edge point pair.
For each edge area, acquiring a first polar edge point nearest to the center of the screw hole, and filtering a second polar edge point on a connecting line of the first polar edge point and the center of the screw hole; and on the same thread region along the radius of the screw hole, if the second polarity edge points exist, determining a matching polarity edge point pair, otherwise, filtering the corresponding first polarity edge points. And the matched polarity edge point pair is determined to be an ideal matched polarity edge point pair through ideal matching conditions.
In one embodiment, as shown in fig. 5a and 5b, fig. 5a shows a matching polarity edge point pair, and fig. 5b shows an ideal matching polarity edge point pair corresponding to fig. 5 a.
Wherein the ideal matching condition may be that a distance between the polar edge points in each pair of matching polar edge points is equal to or greater than a preset distance threshold, and,
if only one pair of matching polarity edge point pairs exists in the edge region, the corresponding matching polarity edge point pairs meet ideal matching conditions; if a plurality of pairs of matching polarity edge point pairs exist in the edge region and are on the same threaded region, the matching polarity edge point pairs far away from the center of the screw hole meet ideal matching conditions; if a plurality of pairs of matching polarity edge points exist in the edge region and are not on the same thread region, the pairs of matching polarity edge points with large distances between the polarity edge points meet ideal matching conditions.
The ideal matching condition may be that the distance between the matching polar edge point pairs is not lower than a preset distance threshold, for example, when the preset distance threshold is 3 pixels, the point pairs with poor quality can be filtered out; when only one pair of matching polarity edge point pairs exists in the edge region, the edge point pairs are directly stored as ideal matching polarity edge point pairs; when a plurality of pairs of matching polarity edge point pairs exist in the edge region and are in the same thread region, selecting the matching polarity edge point pair far away from the center of the screw hole as an ideal matching polarity edge point pair; when there are multiple pairs of matching polarity edge points in the edge region and not in the same thread region, the distance between the matching polarity edge point pairs is large, and the ideal matching polarity edge point pair is selected.
S106, determining a searching starting point of the ideal matching polarity edge point pair, wherein the searching starting point is a first polarity edge point.
The distance between the searching starting point and the positioning core is larger than a first preset threshold value, the distance between the searching starting point and the previous point is larger than a second preset threshold value, and the distance between the searching starting point and the next point is smaller than a third preset threshold value; the previous point is a point before the searching starting point along the preset direction, and the next point is a point after the searching starting point along the preset direction.
In one embodiment, the first preset threshold is 15 pixels, the second preset threshold is 10 pixels, and the third preset threshold is 5 pixels, as shown in fig. 6, the first polarity edge point shown by the circle is the searching start point.
And S107, performing least square fitting on the first polarity edge points along the preset direction from the searching starting point to determine the aperture size of the screw hole.
By the above technology, the application provides a screw aperture measuring method, which comprises the steps of obtaining an aperture image to be measured of a screw hole; determining a plurality of groups of edge areas on the aperture image to be measured through a caliper tool, wherein the caliper tool is arranged on the circumference of a screw hole along a preset direction by taking the center of the screw hole as the center of the circle; determining a polarity edge point in each edge region, wherein the polarity edge point comprises a first polarity edge point and a second polarity edge point, the gray scale of the first polarity edge point is from dark to light, and the gray scale of the second polarity edge point is from light to dark; performing point pair matching on each edge region, and determining a matched polarity edge point pair, wherein the matched polarity edge point pair is two polarity edge points with opposite polarities and in the same thread region; determining a matching polarity edge point pair meeting ideal matching conditions as an ideal matching polarity edge point pair; determining a searching starting point in the ideal matching polarity edge point pair, wherein the searching starting point is a first polarity edge point; and performing least square fitting on the first polar edge point along the preset direction from the searching starting point to determine the aperture size of the screw hole. According to the screw hole imaging measurement method, the measurement accuracy of the screw hole is improved, and the hole diameter measurement efficiency is improved.
The application also provides a screw aperture measuring device, which comprises an image acquisition unit and an image processing unit.
The image acquisition unit is configured to acquire an aperture image to be measured of the screw hole.
An image processing unit configured to determine a plurality of groups of edge areas on the aperture image to be measured by a caliper tool, the caliper tool being arranged along a preset direction on the circumference of the screw hole by taking the center of the screw hole as a center; determining a polarity edge point in each edge region, wherein the polarity edge point comprises a first polarity edge point and a second polarity edge point, the gray scale of the first polarity edge point is from dark to light, and the gray scale of the second polarity edge point is from light to dark; performing point pair matching on each edge region, and determining a matched polarity edge point pair, wherein the matched polarity edge point pair is two polarity edge points with opposite polarities and in the same thread region; determining a matching polarity edge point pair meeting ideal matching conditions as an ideal matching polarity edge point pair; determining a searching starting point in the ideal matching polarity edge point pair, wherein the searching starting point is a first polarity edge point; and performing least square fitting on the first polar edge point along the preset direction from the searching starting point to determine the aperture size of the screw hole.
The image processing unit further includes a matching polarity edge point pair unit configured to: for each edge area, acquiring a first polar edge point nearest to the center of the screw hole, and filtering a second polar edge point on a connecting line of the first polar edge point and the center of the screw hole; and on the same thread region along the radius of the screw hole, if the second polarity edge points exist, determining a matching polarity edge point pair, otherwise, filtering the corresponding first polarity edge points.
The image processing unit further includes an ideal matching polarity edge point pair unit configured to: the distance between the polar edge points in each pair of the matched polar edge points is larger than or equal to a preset distance threshold, and if only one pair of the matched polar edge points in the edge area is provided, the corresponding matched polar edge point pair meets ideal matching conditions; if a plurality of pairs of matching polarity edge point pairs exist in the edge region and are on the same threaded region, the matching polarity edge point pairs far away from the center of the screw hole meet ideal matching conditions; if a plurality of pairs of matching polarity edge points exist in the edge region and are not on the same thread region, the pairs of matching polarity edge points with large distances between the polarity edge points meet ideal matching conditions.
In view of the above, the present application provides a screw aperture measurement device including an image acquisition unit configured to acquire an aperture image to be measured of a screw hole; an image processing unit configured to determine a plurality of groups of edge areas on the aperture image to be measured by a caliper tool, the caliper tool being arranged along a preset direction on the circumference of the screw hole by taking the center of the screw hole as a center; determining a polarity edge point in each edge region, wherein the polarity edge point comprises a first polarity edge point and a second polarity edge point, the gray scale of the first polarity edge point is from dark to light, and the gray scale of the second polarity edge point is from light to dark; performing point pair matching on each edge region, and determining a matched polarity edge point pair, wherein the matched polarity edge point pair is two polarity edge points with opposite polarities and in the same thread region; determining a matching polarity edge point pair meeting ideal matching conditions as an ideal matching polarity edge point pair; determining a searching starting point in the ideal matching polarity edge point pair, wherein the searching starting point is a first polarity edge point; performing least square fitting on a first polar edge point along the preset direction from the searching starting point to determine the aperture size of the screw hole; according to the screw hole imaging measurement method, the measurement accuracy of the screw hole is improved, and the hole diameter measurement efficiency is improved.
The foregoing is merely illustrative of the technical ideas of the present application, and the scope of protection of the present application is not limited thereto, and any modification made on the basis of the technical scheme according to the technical ideas presented in the present application falls within the scope of protection of the claims of the present application.
Furthermore, the order in which the elements and sequences are presented, the use of numerical letters, or other designations are used in the application and are not intended to limit the order in which the processes and methods of the application are performed unless explicitly recited in the claims. While certain presently useful embodiments have been discussed in the foregoing disclosure by way of various examples, it is to be understood that such details are for the purpose of illustration only and that the appended claims are not limited to the disclosed embodiments, but rather are intended to cover all modifications and equivalent combinations that fall within the spirit and scope of the embodiments of the present application. For example, while the system components described above may be implemented by hardware devices, they may also be implemented solely by software solutions, such as installing the described system on an existing server or mobile device.
Likewise, it should be noted that in order to simplify the presentation disclosed herein and thereby aid in understanding one or more embodiments, various features are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure. This method of disclosure, however, is not intended to imply that more features than are presented in the claims are required for the subject application. Indeed, less than all of the features of a single embodiment disclosed above.
Each patent, patent application publication, and other material, such as articles, books, specifications, publications, documents, etc., cited in this application is hereby incorporated by reference in its entirety. Except for application history documents that are inconsistent or conflicting with the present application, documents that are currently or later attached to this application for which the broadest scope of the claims to the present application is limited. It is noted that the descriptions, definitions, and/or terms used in the subject matter of this application are subject to such descriptions, definitions, and/or terms if they are inconsistent or conflicting with such descriptions, definitions, and/or terms.

Claims (6)

1. A method of measuring a screw aperture, the method comprising:
acquiring an aperture image to be detected of a screw hole;
determining a plurality of groups of edge areas on the aperture image to be measured through a caliper tool, wherein the caliper tool is arranged on the circumference of a screw hole along a preset direction by taking the center of the screw hole as the center of the circle;
determining a polarity edge point in each edge region, wherein the polarity edge point comprises a first polarity edge point and a second polarity edge point, the gray scale of the first polarity edge point is from dark to light, and the gray scale of the second polarity edge point is from light to dark;
for each edge area, acquiring a first polar edge point nearest to the center of the screw hole, and filtering a second polar edge point on a connecting line of the first polar edge point and the center of the screw hole; on the same thread region along the radius of the screw hole, if a second polarity edge point exists, determining a matching polarity edge point pair, otherwise, filtering a corresponding first polarity edge point, wherein the matching polarity edge point pair is two polarity edge points with opposite polarities and in the same thread region;
determining the matching polarity edge point pair meeting the ideal matching condition as the ideal matching polarity edge point pair, wherein the meeting the ideal matching condition comprises the following steps: the distance between the polar edge points in each pair of the matched polar edge points is larger than or equal to a preset distance threshold, and if only one pair of the matched polar edge points in the edge area is provided, the corresponding matched polar edge point pair meets ideal matching conditions; if a plurality of pairs of matching polarity edge point pairs exist in the edge region and are on the same threaded region, the matching polarity edge point pairs far away from the center of the screw hole meet ideal matching conditions; if a plurality of pairs of matching polarity edge point pairs exist in the edge region and are not on the same thread region, the matching polarity edge point pairs with large distances between the polarity edge points meet ideal matching conditions;
determining a searching starting point in the ideal matching polarity edge point pair, wherein the searching starting point is a first polarity edge point;
and performing least square fitting on the first polar edge point along the preset direction from the searching starting point to determine the aperture size of the screw hole.
2. The method of claim 1, wherein the obtaining of the image of the aperture to be measured comprises:
determining a positioning core in the image through a geometric positioning template, wherein the positioning core is the edge of a screw hole;
and removing the area outside the positioning nucleus in the image through a mask to obtain an aperture image to be detected.
3. A method of measuring screw aperture according to claim 1, wherein prior to the point-to-point matching of each edge region, the method further comprises:
and performing Blob analysis on all the thread areas in the aperture image to be detected, and removing the corresponding thread areas if the thread areas are smaller than the preset area.
4. A method of measuring a screw aperture according to claim 1, wherein each pair of matching polarity edge points comprises a first polarity edge point and a second polarity edge point.
5. A method of measuring a screw aperture according to claim 2, wherein the determining of the search start point comprises:
the distance between the searching starting point and the positioning core is larger than a first preset threshold value, the distance between the searching starting point and the previous point is larger than a second preset threshold value, and the distance between the searching starting point and the next point is smaller than a third preset threshold value;
the previous point is a point before the searching starting point along the preset direction, and the next point is a point after the searching starting point along the preset direction.
6. A screw aperture measuring device, the device comprising:
an image acquisition unit configured to acquire an aperture image to be measured of the screw hole;
an image processing unit configured to:
determining a plurality of groups of edge areas on the aperture image to be measured through a caliper tool, wherein the caliper tool is arranged on the circumference of a screw hole along a preset direction by taking the center of the screw hole as the center of the circle;
determining a polarity edge point in each edge region, wherein the polarity edge point comprises a first polarity edge point and a second polarity edge point, the gray scale of the first polarity edge point is from dark to light, and the gray scale of the second polarity edge point is from light to dark;
the image processing unit further includes a matching polarity edge point pair unit configured to: for each edge area, acquiring a first polar edge point nearest to the center of the screw hole, and filtering a second polar edge point on a connecting line of the first polar edge point and the center of the screw hole; on the same thread region along the radius of the screw hole, if a second polarity edge point exists, determining a matching polarity edge point pair, otherwise, filtering a corresponding first polarity edge point, wherein the matching polarity edge point pair is two polarity edge points with opposite polarities and in the same thread region;
determining a matching polarity edge point pair meeting ideal matching conditions as an ideal matching polarity edge point pair;
determining a searching starting point in the ideal matching polarity edge point pair, wherein the searching starting point is a first polarity edge point;
performing least square fitting on a first polar edge point along the preset direction from the searching starting point to determine the aperture size of the screw hole;
the image processing unit further includes an ideal matching polarity edge point pair unit configured to: the distance between the polar edge points in each pair of the matched polar edge points is larger than or equal to a preset distance threshold, and if only one pair of the matched polar edge points in the edge area is provided, the corresponding matched polar edge point pair meets ideal matching conditions; if a plurality of pairs of matching polarity edge point pairs exist in the edge region and are on the same threaded region, the matching polarity edge point pairs far away from the center of the screw hole meet ideal matching conditions; if a plurality of pairs of matching polarity edge points exist in the edge region and are not on the same thread region, the pairs of matching polarity edge points with large distances between the polarity edge points meet ideal matching conditions.
CN202110848013.4A 2021-07-27 2021-07-27 Screw aperture measuring method and device Active CN113566721B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110848013.4A CN113566721B (en) 2021-07-27 2021-07-27 Screw aperture measuring method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110848013.4A CN113566721B (en) 2021-07-27 2021-07-27 Screw aperture measuring method and device

Publications (2)

Publication Number Publication Date
CN113566721A CN113566721A (en) 2021-10-29
CN113566721B true CN113566721B (en) 2024-01-23

Family

ID=78167686

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110848013.4A Active CN113566721B (en) 2021-07-27 2021-07-27 Screw aperture measuring method and device

Country Status (1)

Country Link
CN (1) CN113566721B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101387501A (en) * 2008-10-06 2009-03-18 天津大学 Ultra-large workpiece circular section shape and azimuthal measurement apparatus and method
CN101839693A (en) * 2010-04-12 2010-09-22 东莞市嘉腾仪器仪表有限公司 Automatic image measuring system
CN110231004A (en) * 2019-06-21 2019-09-13 湖南大学 Particles of nuclear fuel coating thickness detection method and device
CN110349199A (en) * 2019-06-25 2019-10-18 杭州汇萃智能科技有限公司 A kind of object roundness measurement method
WO2020155792A1 (en) * 2019-01-31 2020-08-06 Boe Technology Group Co., Ltd. Pupil positioning method and apparatus, vr/ar apparatus and computer readable medium
CN113160259A (en) * 2021-04-30 2021-07-23 重庆紫光华山智安科技有限公司 Edge detection method, edge detection device, computer equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101387501A (en) * 2008-10-06 2009-03-18 天津大学 Ultra-large workpiece circular section shape and azimuthal measurement apparatus and method
CN101839693A (en) * 2010-04-12 2010-09-22 东莞市嘉腾仪器仪表有限公司 Automatic image measuring system
WO2020155792A1 (en) * 2019-01-31 2020-08-06 Boe Technology Group Co., Ltd. Pupil positioning method and apparatus, vr/ar apparatus and computer readable medium
CN110231004A (en) * 2019-06-21 2019-09-13 湖南大学 Particles of nuclear fuel coating thickness detection method and device
CN110349199A (en) * 2019-06-25 2019-10-18 杭州汇萃智能科技有限公司 A kind of object roundness measurement method
CN113160259A (en) * 2021-04-30 2021-07-23 重庆紫光华山智安科技有限公司 Edge detection method, edge detection device, computer equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于边缘映射的轴承内外径尺寸检测;崔灿等;《轴承》(第02期);第43-45页 *

Also Published As

Publication number Publication date
CN113566721A (en) 2021-10-29

Similar Documents

Publication Publication Date Title
US20160358322A1 (en) Method and system for data detecting of an instrument
CN100454291C (en) Method for detecting 3d measurement data using allowable error zone
CN103528523A (en) Thread detection method and system based on three-dimensional modeling
CN104406519A (en) Method and device for digitally measuring magnification multiplying power
CN109034170A (en) A kind of round readings of pointer type meters method of switch cubicle detection device
CN106168464A (en) A kind of main shaft dynamic rotation method for testing precision based on machine vision
CN103063106A (en) Measuring tool and measuring method of cam shaft
CN113566721B (en) Screw aperture measuring method and device
CN109489560B (en) Linear dimension measuring method and device and intelligent terminal
CN105300280B (en) Connector size vision measuring method
CN110458800B (en) Screw missing detection method and device and storage medium
CN106092008A (en) The coordinate unification calibration device of high-accuracy composite type measuring machine and scaling method
CN104344780B (en) Roller type gap measuring device
JP5273563B2 (en) Tool position measuring method and apparatus
CN112435210B (en) Quality detection method and device for annular device
CN109186940B (en) Monitoring method and monitoring device for testing precision
CN112529869A (en) Valve sleeve throttling square hole detection method
CN203024691U (en) Measuring tool for cam shaft
CN201476746U (en) Vertical hole pitch measurement device
CN110567345A (en) Non-contact type pipe wall thickness measuring method and system based on machine vision
CN105043323B (en) A kind of detection device and its detection method of escape
WO2018157676A1 (en) Image measuring device free from axis alignment and measuring method thereof
CN210718905U (en) Positioning device for automobile mechanism part
CN209387051U (en) A kind of crank pulley timing marks detecting tool
CN111008636A (en) Reading method and system of pointer type instrument

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant