CN116399262A - Workpiece precision detection method, system and equipment - Google Patents

Workpiece precision detection method, system and equipment Download PDF

Info

Publication number
CN116399262A
CN116399262A CN202211352121.3A CN202211352121A CN116399262A CN 116399262 A CN116399262 A CN 116399262A CN 202211352121 A CN202211352121 A CN 202211352121A CN 116399262 A CN116399262 A CN 116399262A
Authority
CN
China
Prior art keywords
workpiece
obtaining
boundary line
distance
gray
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.)
Pending
Application number
CN202211352121.3A
Other languages
Chinese (zh)
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 Huiaode Technology Co ltd
Original Assignee
Shenzhen Huiaode Technology 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 Huiaode Technology Co ltd filed Critical Shenzhen Huiaode Technology Co ltd
Priority to CN202211352121.3A priority Critical patent/CN116399262A/en
Publication of CN116399262A publication Critical patent/CN116399262A/en
Pending legal-status Critical Current

Links

Images

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/26Measuring arrangements characterised by the use of optical techniques for measuring angles or tapers; for testing the alignment of axes
    • G01B11/27Measuring arrangements characterised by the use of optical techniques for measuring angles or tapers; for testing the alignment of axes for testing the alignment of axes
    • 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/24Measuring arrangements characterised by the use of optical techniques for measuring contours or curvatures
    • G01B11/2408Measuring arrangements characterised by the use of optical techniques for measuring contours or curvatures for measuring roundness
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/60Rotation of whole images or parts thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/20Image enhancement or restoration using local operators
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/136Segmentation; Edge detection involving thresholding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • G06T7/62Analysis of geometric attributes of area, perimeter, diameter or volume
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10004Still image; Photographic image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30108Industrial image inspection
    • G06T2207/30164Workpiece; Machine component
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Quality & Reliability (AREA)
  • Geometry (AREA)
  • Length Measuring Devices By Optical Means (AREA)

Abstract

The invention relates to the field of industrial detection, and particularly discloses a workpiece precision detection method, a workpiece precision detection system and workpiece precision detection equipment, wherein the method comprises the following steps: obtaining a plurality of gray images shot by the columnar workpiece under axial rotation, calculating the distance between a first boundary line and a second boundary line according to a least square method to obtain straightness deviation, calculating the difference between the coordinate point under the same section and the farthest distance and the nearest distance from the center coordinates to obtain roundness deviation, obtaining a space axis based on least square fitting, and calculating the difference between the coordinate points of all sections and the farthest distance and the nearest point from the space axis to obtain cylindricity deviation. The invention provides a workpiece precision detection technical scheme based on machine vision, which can meet the detection requirement of a precision workpiece, does not contact the workpiece in the detection process, does not scratch the workpiece, and can rapidly acquire the shape outline of the workpiece to calculate the precision.

Description

Workpiece precision detection method, system and equipment
Technical Field
The invention relates to the field of industrial detection, in particular to a workpiece precision detection method, system and equipment.
Background
Currently, for detecting cylindrical workpieces, the industry relies on traditional detection methods, such as detection and measurement of straightness and roundness of the cylindrical workpieces by adopting manual gauge, which has the defects of large error, low efficiency and easy loss caused by contact with the workpieces.
Disclosure of Invention
In view of the above technical problems, the invention provides a method, a system and equipment for detecting workpiece precision, so as to provide a technical scheme of a method for rapidly and efficiently calculating the precision deviation of a columnar workpiece.
Other features and advantages of the present disclosure will be apparent from the following detailed description, or may be learned in part by the practice of the disclosure.
According to an aspect of the present invention, a workpiece precision detection method is disclosed, the method comprising:
acquiring a plurality of gray images shot by a columnar workpiece under axial rotation, wherein the total rotation angle of the columnar workpiece is 360 degrees, and the gray images are shot at the same interval angle;
acquiring a plurality of sampling points of the pixel edge of the gray level image, generating a first base line according to a least square method, setting a second base line parallel to the first base line, wherein the second base line takes the sampling point farthest from the vertical distance of the first base line as a base point, obtaining a first boundary line by changing the slope of the second base line, setting a second boundary line parallel to the first boundary line, intersecting the second boundary line with the sampling point farthest from the vertical distance of the first boundary line, and calculating the distance between the first boundary line and the second boundary line to obtain straightness deviation;
obtaining a three-dimensional contour coordinate set of the surface of the columnar workpiece based on the pixel edges of the obtained gray images, obtaining all coordinate points of the coordinate set under the same section of the columnar workpiece, obtaining the center coordinates of the section of the columnar workpiece based on a particle swarm optimization algorithm, and calculating the difference between the farthest distance and the nearest distance of the coordinate points under the same section from the center coordinates to obtain roundness deviation;
and according to the obtained center coordinates of each section, a space axis is obtained based on least square fitting, and the difference between the farthest point and the nearest point from the space axis in the coordinate points of all sections is calculated to obtain cylindricity deviation.
Further, before the gray level image is acquired, a camera for acquiring the gray level image is calibrated.
Further, after the gray image is obtained, correcting the gray image includes: and obtaining the upper edge and the lower edge coordinates of the columnar workpiece in the gray image, calculating average data by an addition algorithm to obtain a central line, obtaining the slope of the central line by least square fitting, obtaining a rotation angle, and correcting the gray image according to the rotation angle.
Further, after obtaining the corrected gray scale image, preprocessing the gray scale image, including: extracting a region of interest; filtering the same gray level image by using a Gaussian filter; threshold segmentation is carried out on the gray level image after processing based on an Ojin algorithm; extracting rough edges of the columnar workpieces in the gray level images after threshold segmentation based on a multi-level edge detection algorithm; and obtaining a fine edge from the coarse edge by using a polynomial fitting algorithm.
According to a second aspect of the present disclosure, there is provided a workpiece accuracy detection system comprising: the acquisition module is used for acquiring a plurality of gray images shot by the columnar workpiece under the axial rotation, the total rotation angle of the columnar workpiece is 360 degrees, and the gray images are shot at the same interval angle; the calculating module is used for obtaining a plurality of sampling points of the pixel edge of the gray level image, generating a first base line according to a least square method, setting a second base line parallel to the first base line, wherein the second base line takes the sampling point farthest from the vertical distance of the first base line as a base point, a first boundary line is obtained by changing the slope of the second base line, a second boundary line parallel to the first boundary line is set, the second boundary line is intersected with the sampling point farthest from the vertical distance of the first boundary line, and the distance between the first boundary line and the second boundary line is calculated to obtain straightness deviation; the method comprises the steps of obtaining a three-dimensional contour coordinate set of the surface of a columnar workpiece based on the pixel edges of a plurality of obtained gray images, obtaining all coordinate points of the coordinate set under the same section of the columnar workpiece, obtaining the center coordinates of the section of the columnar workpiece based on a particle swarm optimization algorithm, and calculating the difference between the farthest distance and the nearest distance of the coordinate points under the same section from the center coordinates to obtain roundness deviation; and the method is used for obtaining a space axis based on least square fitting according to the obtained center coordinates of each section, calculating the difference between the farthest point and the nearest point from the space axis in the coordinate points of all sections, and obtaining cylindricity deviation.
According to a third aspect of the present disclosure, there is provided a workpiece accuracy detecting apparatus comprising: a camera and a light source; a robot arm; one or more processors; and a storage device for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement the workpiece precision detection method as described above.
The technical scheme of the present disclosure has the following beneficial effects:
the technical scheme for detecting the workpiece precision based on the machine vision is provided, the detection requirement of a precise workpiece can be met, the workpiece is not contacted in the detection process, the workpiece is not scratched, and the shape outline of the workpiece can be rapidly acquired to calculate the precision. The scheme has the advantages of high efficiency, high speed and automatic operation.
Drawings
FIG. 1 is a flow chart of a method for workpiece accuracy detection in an embodiment of the present disclosure;
FIG. 2 is a schematic diagram of calculating straightness deviation in the embodiment of the present specification;
FIG. 3 is a schematic diagram of three-dimensional contour calculation in an embodiment of the present disclosure;
fig. 4 is a block diagram showing the construction of the work precision detecting apparatus in the embodiment of the present specification.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. However, the exemplary embodiments may be embodied in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of the example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the present disclosure. One skilled in the relevant art will recognize, however, that the aspects of the disclosure may be practiced without one or more of the specific details, or with other methods, components, devices, steps, etc. In other instances, well-known technical solutions have not been shown or described in detail to avoid obscuring aspects of the present disclosure.
Furthermore, the drawings are only schematic illustrations of the present disclosure. The same reference numerals in the drawings denote the same or similar parts, and thus a repetitive description thereof will be omitted. Some of the block diagrams shown in the figures are functional entities and do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in software or in one or more hardware modules or integrated circuits or in different networks and/or processor devices and/or microcontroller devices.
As shown in fig. 1, the embodiment of the present disclosure provides a workpiece precision detection method, and an execution subject of the method may be a computer. The method specifically comprises the following steps S101 to S104:
in step S101, a plurality of gray-scale images captured by the columnar workpiece under the axial rotation are acquired, the total rotation angle of the columnar workpiece is 360 °, and the plurality of gray-scale images are captured under the same interval angle.
The columnar workpiece can be rotated under the control of the robot, and after the rotation angle is fixed, an image of the columnar workpiece is shot, for example, the columnar workpiece is shot once every 2 degrees, and 180 gray images are obtained.
In step S102, a plurality of sampling points of the pixel edge of the grayscale image are acquired, a first base line is generated according to a least square method, a second base line parallel to the first base line is set, the second base line is based on the sampling point which is farthest from the first base line in vertical distance, a first boundary line is obtained by changing the slope of the second base line, a second boundary line parallel to the first boundary line is set, the second boundary line intersects with the sampling point which is farthest from the first boundary line in vertical distance, and the distance between the first boundary line and the second boundary line is calculated to obtain straightness deviation.
Wherein the straightness deviation is the difference between the maximum and minimum distances between the edge line of the workpiece and the reference line, and the minimum value of the distance between two parallel lines containing the measured edge is searched for according to the minimum condition principle of the minimum area method. As shown in fig. 2, a least square method is used to obtain a first baseline L1, and a linear equation of the first baseline L1 is y=k 1 x+m, finding a sampling point P1 farthest from the first baseline to obtain a second baseline L2 in an initial state, wherein the second baseline L2 in the initial state is parallel to the first baseline L1, then dividing all the sampling points into two types of points of high points and low points,by taking P1 as a base point and changing the slope of the second baseline L2, the sampling point is positioned below or above the second baseline L2, so that the critical point P2 is determined. Wherein k is i =k 1 +a,k 1 For the slope of the first baseline L1, a is the minimum, according to k 1 Calculate the corresponding intercept, m i =-k i xP 1 +yP 1 The method comprises the steps of carrying out a first treatment on the surface of the To calculate the critical point P2, according to the formula w=k i x+m i Y, the coordinates of all coordinate points are replaced in the formula except for P1, and the sampling points are calculated when ki changes. When W is zero, the critical point P2 can be obtained. However, in practical cases, by setting a smaller a, P2 appears between the two baselines, the following requirements should be met:
min{k i x+m i -y}<0;
first boundary line y=k i x+m is determined by P1 and P2, a point P3 farthest from the first boundary line is found, a second boundary line can also be determined, and the linear distance between the first boundary line and the second boundary line is calculated to obtain the straightness deviation.
In step S103, a three-dimensional contour coordinate set of the surface of the columnar workpiece is obtained based on the obtained pixel edges of the plurality of gray images, all coordinate points of the coordinate set under the same section of the columnar workpiece are obtained, the center coordinates of the section of the columnar workpiece are obtained based on a particle swarm algorithm, and the difference between the farthest distance and the nearest distance of the coordinate points under the same section from the center coordinates is calculated to obtain roundness deviation.
One end of the axis of the columnar workpiece is set as an origin of coordinates, an initial position angle is set to be 0 degrees, coordinates of points on the contour surface of the workpiece collected by the camera are (x 1, y1, z 1), after the columnar workpiece rotates by an angle beta, the coordinates of the columnar workpiece are (x 2, y2, z 2), and the conversion relation of the two coordinates is as follows:
y 1 =AO·cos0°
z 1 =AO·sin0°
y 2 =BO·cosβ
z 2 =BO·sinβ
x 1 =x 2
as shown in fig. 3, A0 is the distance between point a and the workpiece axis. And collecting workpiece edge information through workpiece rotation, and establishing a three-dimensional contour model of the columnar workpiece surface by a camera to obtain a three-dimensional contour coordinate set.
Suppose (x) i ,y i ) For the measured coordinates on the actual contour of the workpiece, (x k ,y k ) For the center coordinates of the minimum area method to be solved, the distance from the measurement point to the center point is
Figure SMS_1
H at which roundness deviation is maximum ik Subtracting the minimum H ik Determines the coordinates (x k ,y k ) The roundness deviation, the coordinates (x k ,y k ) The particle swarm optimization is obtained by a particle swarm algorithm, and the algorithm can refer to the prior art.
In step S104, according to the obtained center coordinates of each section, a spatial axis is obtained based on least square fitting, and the difference between the farthest and nearest points from the spatial axis among the coordinate points of all sections is calculated, thereby obtaining a cylindricity deviation.
In one embodiment, a camera for acquiring the grayscale image is calibrated prior to acquiring the grayscale image.
Among these, there are various degrees of nonlinear deformation, commonly referred to as geometric deformation, in the generation of a two-dimensional image. In addition, there are other factors such as instability of the camera imaging process and quantization bias caused by low image resolution. Thus, there is a complex nonlinear relationship between the target point in the image and the corresponding point in the world coordinate system. Due to these distortions, the calibration coefficients are different for one direction of the different image areas. Therefore, calibration is required to be performed by using a calibration plate, and distortion coefficients of the built-in matrix parameters and the external matrix parameters of the camera are confirmed.
In one embodiment, after the gray scale image is obtained, correcting the gray scale image includes: and obtaining the upper edge and the lower edge coordinates of the columnar workpiece in the gray image, calculating average data by an addition algorithm to obtain a central line, obtaining the slope of the central line by least square fitting, obtaining a rotation angle, and correcting the gray image according to the rotation angle.
Wherein the obtained part image may have a small inclination angle due to the deviation of the camera mounting and the equipment assembly. In calculating the shape deviation, it is necessary to obtain the edge coordinates of a plurality of gradation images, all of which are affected by a small inclination angle. This increases the bias of the detection and the complexity of the detection. In order to improve the detection accuracy and efficiency, it is necessary to correct the measured partial image. As described above, the correction method can be expressed as correcting the measured part image with q by correcting the rotation angle. Assuming that θ for this point P0 (x 0, y 0) rotated counterclockwise is P0 (x, y), the rotated coordinate point matrix expression is as follows:
Figure SMS_2
in one embodiment, after obtaining the corrected gray scale image, preprocessing the gray scale image includes: extracting a region of interest; filtering the same gray level image by using a Gaussian filter; threshold segmentation is carried out on the gray level image after processing based on an Ojin algorithm; extracting rough edges of the columnar workpieces in the gray level images after threshold segmentation based on a multi-level edge detection algorithm; and obtaining a fine edge from the coarse edge by using a polynomial fitting algorithm.
Wherein, the polynomial fitting algorithm can be expressed as:
Figure SMS_3
by calculating the quadratic sum of the least squares and deriving, if equal to 0, the result is obtained:
Figure SMS_4
Figure SMS_5
by solving the above equation, the fitted polynomial coefficients can be determined.
Based on the same considerations, exemplary embodiments of the present disclosure also provide a workpiece precision detection system, comprising: the acquisition module is used for acquiring a plurality of gray images shot by the columnar workpiece under the axial rotation, the total rotation angle of the columnar workpiece is 360 degrees, and the gray images are shot at the same interval angle; the calculating module is used for obtaining a plurality of sampling points of the pixel edge of the gray level image, generating a first base line according to a least square method, setting a second base line parallel to the first base line, wherein the second base line takes the sampling point farthest from the vertical distance of the first base line as a base point, a first boundary line is obtained by changing the slope of the second base line, a second boundary line parallel to the first boundary line is set, the second boundary line is intersected with the sampling point farthest from the vertical distance of the first boundary line, and the distance between the first boundary line and the second boundary line is calculated to obtain straightness deviation; the method comprises the steps of obtaining a three-dimensional contour coordinate set of the surface of a columnar workpiece based on the pixel edges of a plurality of obtained gray images, obtaining all coordinate points of the coordinate set under the same section of the columnar workpiece, obtaining the center coordinates of the section of the columnar workpiece based on a particle swarm optimization algorithm, and calculating the difference between the farthest distance and the nearest distance of the coordinate points under the same section from the center coordinates to obtain roundness deviation; and the method is used for obtaining a space axis based on least square fitting according to the obtained center coordinates of each section, calculating the difference between the farthest point and the nearest point from the space axis in the coordinate points of all sections, and obtaining cylindricity deviation.
The specific details of each module in the above system are already described in the method part of the embodiments, and the details that are not disclosed can be referred to the embodiment of the method part, so that they will not be described in detail.
Based on the same thought, the embodiment of the present disclosure further provides a workpiece precision detection device, as shown in fig. 4.
The workpiece precision detection device may be a terminal device or a server provided in the above embodiment.
The workpiece precision detection device may vary widely due to configuration or performance, may include one or more processors 501 and memory 502, and may have one or more stored applications or data stored in memory 502. The memory 502 may include readable media in the form of volatile memory units, such as Random Access Memory (RAM) units and/or cache memory units, and may further include read-only memory units. The application programs stored in memory 502 may include one or more program modules (not shown), including but not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of which may include an implementation of a network environment. Still further, the processor 501 may be configured to communicate with the memory 502 and execute a series of computer executable instructions in the memory 502 on the workpiece accuracy detection device. The workpiece accuracy detection device may also include one or more power supplies 503, one or more wired or wireless network interfaces 504, one or more I/O interfaces (input/output interfaces) 505, one or more external devices 506 (e.g., keyboard, pointing device, bluetooth device, etc.), one or more devices that enable a user to interact with the device, and/or any devices (e.g., routers, modems, etc.) that enable the device to communicate with one or more other computing devices. Such communication may occur through the I/O interface 505. Also, the device may communicate with one or more networks, such as a Local Area Network (LAN), via a wired or wireless interface 504.
Specifically, in the present embodiment, the workpiece precision detection device includes a camera 507, a light source 508, a robot 509, a memory 502, and one or more programs, where the one or more programs are stored in the memory 502, and the one or more programs may include one or more modules, and each module may include a series of computer executable instructions for the workpiece precision detection device, and the execution of the one or more programs by the one or more processors 501 includes computer executable instructions for:
acquiring a plurality of gray images shot by a columnar workpiece under axial rotation, wherein the total rotation angle of the columnar workpiece is 360 degrees, and the gray images are shot at the same interval angle;
acquiring a plurality of sampling points of the pixel edge of the gray level image, generating a first base line according to a least square method, setting a second base line parallel to the first base line, wherein the second base line takes the sampling point farthest from the vertical distance of the first base line as a base point, obtaining a first boundary line by changing the slope of the second base line, setting a second boundary line parallel to the first boundary line, intersecting the second boundary line with the sampling point farthest from the vertical distance of the first boundary line, and calculating the distance between the first boundary line and the second boundary line to obtain straightness deviation;
obtaining a three-dimensional contour coordinate set of the surface of the columnar workpiece based on the pixel edges of the obtained gray images, obtaining all coordinate points of the coordinate set under the same section of the columnar workpiece, obtaining the center coordinates of the section of the columnar workpiece based on a particle swarm optimization algorithm, and calculating the difference between the farthest distance and the nearest distance of the coordinate points under the same section from the center coordinates to obtain roundness deviation;
and according to the obtained center coordinates of each section, a space axis is obtained based on least square fitting, and the difference between the farthest point and the nearest point from the space axis in the coordinate points of all sections is calculated to obtain cylindricity deviation.
From the above description of embodiments, those skilled in the art will readily appreciate that the example embodiments described herein may be implemented in software, or may be implemented in software in combination with the necessary hardware. Thus, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (may be a CD-ROM, a U-disk, a mobile hard disk, etc.) or on a network, including several instructions to cause a computing device (may be a personal computer, a server, a terminal device, or a network device, etc.) to perform the method according to the exemplary embodiments of the present disclosure.
Furthermore, the above-described figures are only schematic illustrations of processes included in the method according to the exemplary embodiments of the present disclosure, and are not intended to be limiting. It will be readily appreciated that the processes shown in the above figures do not indicate or limit the temporal order of these processes. In addition, it is also readily understood that these processes may be performed synchronously or asynchronously, for example, among a plurality of modules.
It should be noted that although in the above detailed description several modules or units of a device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit in accordance with exemplary embodiments of the present disclosure. Conversely, the features and functions of one module or unit described above may be further divided into a plurality of modules or units to be embodied.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any adaptations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It is to be understood that the present disclosure is not limited to the precise arrangements and instrumentalities shown in the drawings, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (6)

1. A method for detecting precision of a workpiece, the method comprising:
acquiring a plurality of gray images shot by a columnar workpiece under axial rotation, wherein the total rotation angle of the columnar workpiece is 360 degrees, and the gray images are shot at the same interval angle;
acquiring a plurality of sampling points of the pixel edge of the gray level image, generating a first base line according to a least square method, setting a second base line parallel to the first base line, wherein the second base line takes the sampling point farthest from the vertical distance of the first base line as a base point, obtaining a first boundary line by changing the slope of the second base line, setting a second boundary line parallel to the first boundary line, intersecting the second boundary line with the sampling point farthest from the vertical distance of the first boundary line, and calculating the distance between the first boundary line and the second boundary line to obtain straightness deviation;
obtaining a three-dimensional contour coordinate set of the surface of the columnar workpiece based on the pixel edges of the obtained gray images, obtaining all coordinate points of the coordinate set under the same section of the columnar workpiece, obtaining the center coordinates of the section of the columnar workpiece based on a particle swarm optimization algorithm, and calculating the difference between the farthest distance and the nearest distance of the coordinate points under the same section from the center coordinates to obtain roundness deviation;
and according to the obtained center coordinates of each section, a space axis is obtained based on least square fitting, and the difference between the farthest point and the nearest point from the space axis in the coordinate points of all sections is calculated to obtain cylindricity deviation.
2. The method according to claim 1, wherein a camera for acquiring the grayscale image is calibrated before acquiring the grayscale image.
3. The workpiece accuracy detecting method according to claim 1, wherein correcting the grayscale image after obtaining the grayscale image includes:
and obtaining the upper edge and the lower edge coordinates of the columnar workpiece in the gray image, calculating average data by an addition algorithm to obtain a central line, obtaining the slope of the central line by least square fitting, obtaining a rotation angle, and correcting the gray image according to the rotation angle.
4. A workpiece accuracy detecting method according to claim 3, wherein preprocessing the grayscale image after obtaining the corrected grayscale image includes:
extracting a region of interest;
filtering the same gray level image by using a Gaussian filter;
threshold segmentation is carried out on the gray level image after processing based on an Ojin algorithm;
extracting rough edges of the columnar workpieces in the gray level images after threshold segmentation based on a multi-level edge detection algorithm;
and obtaining a fine edge from the coarse edge by using a polynomial fitting algorithm.
5. A workpiece accuracy detection system, comprising:
the acquisition module is used for acquiring a plurality of gray images shot by the columnar workpiece under the axial rotation, the total rotation angle of the columnar workpiece is 360 degrees, and the gray images are shot at the same interval angle;
the calculating module is used for obtaining a plurality of sampling points of the pixel edge of the gray level image, generating a first base line according to a least square method, setting a second base line parallel to the first base line, wherein the second base line takes the sampling point farthest from the vertical distance of the first base line as a base point, a first boundary line is obtained by changing the slope of the second base line, a second boundary line parallel to the first boundary line is set, the second boundary line is intersected with the sampling point farthest from the vertical distance of the first boundary line, and the distance between the first boundary line and the second boundary line is calculated to obtain straightness deviation; the method comprises the steps of obtaining a three-dimensional contour coordinate set of the surface of a columnar workpiece based on the pixel edges of a plurality of obtained gray images, obtaining all coordinate points of the coordinate set under the same section of the columnar workpiece, obtaining the center coordinates of the section of the columnar workpiece based on a particle swarm optimization algorithm, and calculating the difference between the farthest distance and the nearest distance of the coordinate points under the same section from the center coordinates to obtain roundness deviation; and the method is used for obtaining a space axis based on least square fitting according to the obtained center coordinates of each section, calculating the difference between the farthest point and the nearest point from the space axis in the coordinate points of all sections, and obtaining cylindricity deviation.
6. A workpiece accuracy detecting apparatus, comprising:
a camera and a light source;
a robot arm;
one or more processors;
storage means for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement the workpiece accuracy detection method as claimed in any of claims 1 to 4.
CN202211352121.3A 2022-10-31 2022-10-31 Workpiece precision detection method, system and equipment Pending CN116399262A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211352121.3A CN116399262A (en) 2022-10-31 2022-10-31 Workpiece precision detection method, system and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211352121.3A CN116399262A (en) 2022-10-31 2022-10-31 Workpiece precision detection method, system and equipment

Publications (1)

Publication Number Publication Date
CN116399262A true CN116399262A (en) 2023-07-07

Family

ID=87018481

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211352121.3A Pending CN116399262A (en) 2022-10-31 2022-10-31 Workpiece precision detection method, system and equipment

Country Status (1)

Country Link
CN (1) CN116399262A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117405054A (en) * 2023-10-26 2024-01-16 浙江巨丰模架有限公司 On-line detection method and system for precision of die carrier precision based on three-coordinate measurement

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117405054A (en) * 2023-10-26 2024-01-16 浙江巨丰模架有限公司 On-line detection method and system for precision of die carrier precision based on three-coordinate measurement
CN117405054B (en) * 2023-10-26 2024-04-30 浙江巨丰模架有限公司 On-line detection method and system for precision of die carrier precision based on three-coordinate measurement

Similar Documents

Publication Publication Date Title
CN112771573B (en) Depth estimation method and device based on speckle images and face recognition system
JP2021184307A (en) System and method for detecting lines with vision system
CN108830868B (en) Arc fitting method based on combination of Snake model and iterative polarity transformation regression
CN113324478A (en) Center extraction method of line structured light and three-dimensional measurement method of forge piece
CN109544643B (en) Video camera image correction method and device
CN112017232B (en) Positioning method, device and equipment for circular patterns in image
JP2021168143A (en) System and method for efficiently scoring probe in image by vision system
Zhou et al. Fast star centroid extraction algorithm with sub-pixel accuracy based on FPGA
CN112880562A (en) Method and system for measuring pose error of tail end of mechanical arm
CN113052905A (en) Round target pose measurement method and device based on binocular inverse projection transformation
CN116399262A (en) Workpiece precision detection method, system and equipment
CN114463442A (en) Calibration method of non-coaxial camera
CN111539934B (en) Extraction method of line laser center
CN110956630A (en) Method, device and system for detecting plane printing defects
CN113538399A (en) Method for obtaining accurate contour of workpiece, machine tool and storage medium
CN112631200A (en) Machine tool axis measuring method and device
CN115546016B (en) Method for acquiring and processing 2D (two-dimensional) and 3D (three-dimensional) images of PCB (printed Circuit Board) and related device
CN110458951B (en) Modeling data acquisition method and related device for power grid pole tower
CN115082543A (en) Laser correction method
CN114998571A (en) Image processing and color detection method based on fixed-size marker
CN113627548A (en) Planar workpiece template matching method, device, medium and computer equipment
Ricolfe-Viala et al. Improved camera calibration method based on a two-dimensional template
Sun et al. Calibration Method for a Multi-line Structured Laser Light Vision System.
CN205120108U (en) Precision compensating system based on camera device
CN116778066B (en) Data processing method, device, equipment and medium

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