A workpiece precision detection method, system and equipment

Through machine vision technology, the least squares method and particle swarm optimization algorithm are used to calculate the accuracy deviation of the workpiece, which solves the problem of low detection efficiency and easy loss in the prior art, and achieves fast and accurate contactless accuracy detection.

CN116399262BActive Publication Date: 2025-08-08SHENZHEN WISAUTIC TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211352121.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-31
Publication Date
2025-08-08
Estimated Expiration
2042-10-31

AI Technical Summary

Technical Problem

In the prior art, the detection method for cylindrical workpieces is inefficient and easily dissipated, and its accuracy deviation cannot be calculated quickly and accurately.

Method used

By using machine vision technology, we can obtain multiple grayscale images taken by the columnar workpiece under axial rotation, and use the least squares method and particle swarm optimization algorithm to calculate the linearity, roundness and cylindrical deviations, and combine image correction and preprocessing technology to achieve contactless accuracy detection.

Benefits of technology

It realizes the rapid and accurate calculation of the accuracy deviation of the workpiece, meets the requirements of precision inspection, avoids workpiece losses, and improves detection efficiency and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116399262B_ABST
    Figure CN116399262B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of industrial inspection and specifically discloses a workpiece precision inspection method, system, and equipment. The method comprises: obtaining multiple grayscale images of a cylindrical workpiece captured during axial rotation; calculating the distance between a first boundary line and a second boundary line based on the least squares method to obtain a straightness deviation; calculating the difference between the farthest and closest distances between coordinate points on the same cross section and the center coordinate to obtain a roundness deviation; fitting the spatial axis based on the least squares method; calculating the difference between the farthest and closest points of the coordinate points on all cross sections to the spatial axis to obtain a cylindricity deviation. The present invention proposes a workpiece precision inspection technology solution based on machine vision that can meet the inspection requirements of precision workpieces. The inspection process does not contact or scratch the workpiece, and the shape contour of the workpiece can be quickly acquired to calculate its accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of industrial detection, and in particular to a workpiece precision detection method, system and equipment. Background Art

[0002] At present, the industry relies on traditional inspection methods for the inspection of cylindrical workpieces. For example, the straightness and roundness of cylindrical workpieces are usually measured by manual ruler inspection and measurement, which has the disadvantages of large errors, low efficiency, and easy wear and tear caused by contact with the workpiece. Summary of the Invention

[0003] In view of the above technical problems, the present invention provides a workpiece precision detection method, system and equipment to provide a technical solution for quickly and efficiently calculating the precision deviation of a cylindrical workpiece.

[0004] Other features and advantages of the present disclosure will become apparent from the following detailed description, or may be learned in part by practice of the present disclosure.

[0005] According to one aspect of the present invention, a workpiece accuracy detection method is disclosed, the method comprising:

[0006] Acquire multiple grayscale images captured by the cylindrical workpiece under axial rotation, wherein the total angle of rotation of the cylindrical workpiece is 360°, and the multiple grayscale images are captured at the same interval angle;

[0007] Acquire multiple sampling points on the pixel edge of the grayscale image, generate a first baseline based on a least squares method, set a second baseline parallel to the first baseline, the second baseline having the sampling point farthest from the first baseline as a base point, obtain a first boundary line by changing the slope of the second baseline, set a second boundary line parallel to the first boundary line, the second boundary line intersecting at the sampling point farthest from the first boundary line, calculate the distance between the first boundary line and the second boundary line, and obtain a straightness deviation;

[0008] Based on the pixel edges of the plurality of grayscale images obtained, a three-dimensional contour coordinate set of the surface of the cylindrical workpiece is obtained, all coordinate points of the coordinate set in a cross section of the same cylindrical workpiece are obtained, and based on a particle swarm optimization algorithm, the center coordinates of the cross section of the cylindrical workpiece are obtained, and the difference between the farthest distance and the closest distance of the coordinate points in the same cross section from the center coordinates is calculated to obtain the roundness deviation;

[0009] According to the obtained coordinates of the center of each section, the spatial axis is obtained based on the least squares fitting method, and the difference between the farthest and closest points from the spatial axis among the coordinate points of all sections is calculated to obtain the cylindricity deviation.

[0010] Furthermore, before acquiring the grayscale image, a camera used to acquire the grayscale image is calibrated.

[0011] Furthermore, after obtaining the grayscale image, the grayscale image is corrected, including: obtaining the coordinates of the upper edge and lower edge of the columnar workpiece in the grayscale image, performing an addition algorithm on the average data to obtain the center line, and obtaining the slope of the center line by least squares fitting, thereby obtaining the rotation angle, and correcting the grayscale image according to the rotation angle.

[0012] Furthermore, after obtaining the corrected grayscale image, the grayscale image is preprocessed, including: extracting a region of interest; filtering the same grayscale image using a Gaussian filter; performing threshold segmentation on the processed grayscale image based on the Otsu algorithm; extracting the rough edges of the columnar workpiece in the grayscale image after threshold segmentation based on a multi-level edge detection algorithm; and obtaining fine edges from the rough edges using a polynomial fitting algorithm.

[0013] According to a second aspect of the present disclosure, a workpiece precision detection system is provided, comprising: an acquisition module for acquiring a plurality of grayscale images captured when a cylindrical workpiece is rotated axially, wherein the total angle of rotation of the cylindrical workpiece is 360°, and the plurality of grayscale images are captured at the same interval angle; a calculation module for acquiring a plurality of sampling points of pixel edges of the grayscale images, generating a first baseline according to a least squares method, setting a second baseline parallel to the first baseline, the second baseline taking the sampling point farthest from the first baseline in vertical distance as a base point, obtaining a first boundary line by changing the slope of the second baseline, setting a second boundary line parallel to the first boundary line, the second boundary line intersecting at a point perpendicular to the first boundary line The sampling point is farthest away, and the distance between the first boundary line and the second boundary line is calculated to obtain the straightness deviation; and based on the pixel edges of the multiple grayscale images obtained, a three-dimensional contour coordinate set of the surface of the columnar workpiece is obtained, all coordinate points of the coordinate set under the cross section of the same columnar workpiece are obtained, and based on the particle swarm optimization algorithm, the center coordinates of the cross section of the columnar workpiece are obtained, and the difference between the farthest distance and the closest distance of the coordinate points under the same cross section from the center coordinates is calculated to obtain the roundness deviation; and based on the least squares fitting method, a spatial axis is obtained according to the center coordinates of each cross section obtained, and the difference between the farthest point and the closest point from the spatial axis among the coordinate points of all cross sections is calculated to obtain the cylindricity deviation.

[0014] According to a third aspect of the present disclosure, there is provided a workpiece precision detection device, comprising: a camera and a light source; a robotic arm; one or more processors; and a storage device for storing one or more programs, which, when executed by the one or more processors, enables the one or more processors to implement the workpiece precision detection method as described above.

[0015] The technical solution disclosed in this disclosure has the following beneficial effects:

[0016] A machine vision-based workpiece accuracy inspection technology solution has been proposed. This solution meets the requirements for precision workpiece inspection. The inspection process does not touch or scratch the workpiece, and it can quickly capture the workpiece's shape and contour to calculate its accuracy. This solution offers the advantages of high efficiency, speed, and automated operation. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 This is a flow chart of a workpiece accuracy detection method according to an embodiment of this specification;

[0018] Figure 2 This is a schematic diagram of the straightness deviation calculation principle in the embodiments of this specification;

[0019] Figure 3 This is a schematic diagram of the three-dimensional contour calculation principle in the embodiments of this specification;

[0020] Figure 4 This is a structural block diagram of the workpiece precision detection equipment in the embodiment of this specification. DETAILED DESCRIPTION

[0021] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that the present disclosure will be more comprehensive and complete and will fully convey the concepts 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, many specific details are provided to provide a full understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced while omitting one or more of the specific details, or that other methods, components, devices, steps, etc. may be employed. In other cases, well-known technical solutions are not shown or described in detail to avoid obscuring various aspects of the present disclosure.

[0022] The accompanying drawings are merely schematic illustrations of the present disclosure. Identical reference numerals in the drawings denote identical or similar components, and thus their repeated description will be omitted. Some of the blocks shown in the accompanying drawings represent functional entities that do not necessarily correspond to physically or logically independent entities. These functional entities may be implemented in software, in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.

[0023] like Figure 1 As shown, the embodiment of this specification provides a workpiece accuracy detection method, which can be executed by a computer. The method can specifically include the following steps S101 to S104:

[0024] In step S101 , a plurality of grayscale images captured by a cylindrical workpiece under axial rotation are acquired, wherein the total angle of rotation of the cylindrical workpiece is 360°, and the plurality of grayscale images are captured at the same interval angle.

[0025] The cylindrical workpiece can be rotated under the control of the robot arm. After the rotation angle is fixed, an image of the cylindrical workpiece is taken. For example, if it is taken every 2°, 180 grayscale images are obtained.

[0026] In step S102, a plurality of sampling points of the pixel edge of the grayscale image are obtained, and a first baseline is generated according to the least squares method. A second baseline parallel to the first baseline is set, and the second baseline is based on the sampling point with the farthest vertical distance from the first baseline. A first boundary line is obtained by changing the slope of the second baseline, and a second boundary line parallel to the first boundary line is set, and the second boundary line intersects at the sampling point with the farthest vertical distance from the first boundary line. The distance between the first boundary line and the second boundary line is calculated to obtain a straightness deviation.

[0027] Among them, the straightness deviation is the difference between the maximum and minimum distances between the edge line of the workpiece and the reference line. Here, the minimum value of the distance between two parallel lines containing the measured edge is searched according to the minimum condition principle of the minimum area method. Figure 2 As shown, the least squares method is used to obtain the first baseline L1. The linear equation of the first baseline L1 is y=k1x+m. The sampling point P1 with the longest vertical distance from the first baseline is found to obtain the second baseline L2 in the initial state. The second baseline L2 in the initial state is parallel to the first baseline L1. Subsequently, all sampling points are divided into two categories: high points and low points. With P1 as the base point, by changing the slope of the second baseline L2, the sampling point is located below or above the second baseline L2, thereby determining the critical point P2. Where, k i=k1+a, k1 is the slope of the first baseline L1, a is the minimum value, and the corresponding intercept is calculated based on k1, m i =-k i xP1+yP1; In order to calculate the critical point P2, according to the formula W=k i x+m i -y, the coordinates of all points except P1 are replaced by the formula, and the sampling points are calculated when ki changes. When W is zero, the critical point P2 can be obtained. However, in actual situations, by setting a smaller a, P2 appears between the two baselines, and the following requirements should be met:

[0028] min{k i x+m i -y}<0;

[0029] First boundary line y=k i x+m is determined by P1 and P2, and the point P3 farthest from the first boundary line is found. The second boundary line can also be determined, and the straight-line distance between the first boundary line and the second boundary line is calculated to obtain the straightness deviation.

[0030] In step S103, based on the pixel edges of the multiple grayscale images obtained, a three-dimensional contour coordinate set of the cylindrical workpiece surface is obtained, all coordinate points of the coordinate set under the same cross section of the cylindrical workpiece are obtained, and based on the particle swarm algorithm, the center coordinates of the cross section of the cylindrical workpiece are obtained. The difference between the farthest distance and the closest distance of the coordinate points under the same cross section from the center coordinates is calculated to obtain the roundness deviation.

[0031] Among them, one end of the axis of the cylindrical workpiece is set as the coordinate origin, the initial position angle is set to 0°, the coordinates of the point on the workpiece contour surface collected by the camera are (x1, y1, z1), and after the cylindrical workpiece is rotated by angle β, its coordinates are (x2, y2, z2). The conversion relationship between the two coordinates is:

[0032] y1=AO·cos0°

[0033] z1=AO·sin0°

[0034] y2=BO·cosβ

[0035] z2=BO·sinβ

[0036] x1=x2

[0037] like Figure 3 As shown in the figure, A0 is the distance between point A and the workpiece axis. The workpiece edge information is collected by rotating the workpiece, and the camera builds a 3D contour model of the cylindrical workpiece surface, that is, a 3D contour coordinate set is obtained.

[0038] Assume (xi ,y i ) is the measured coordinate on the actual contour of the workpiece, (x k ,y k ) is the center coordinate of the minimum area method to be solved, then the distance from the measuring point to the center point is Then the roundness deviation is the largest H ik Subtract the minimum H ik , the coordinates (x k ,y k ) can get the roundness deviation, coordinate (x k ,y k ) is obtained by the particle swarm algorithm. The specific algorithm can refer to the original technology.

[0039] In step S104, according to the obtained coordinates of the center of each section, a spatial axis is obtained based on least square fitting, and the difference between the coordinate points of all sections that are farthest from the spatial axis and the points closest to the spatial axis is calculated to obtain the cylindricity deviation.

[0040] In one embodiment, before acquiring the grayscale image, a camera used to acquire the grayscale image is calibrated.

[0041] The process of generating a two-dimensional image involves varying degrees of nonlinear distortion, often referred to as geometric distortion. Furthermore, other factors contribute, such as the instability of the camera imaging process and quantization bias caused by low image resolution. Consequently, a complex nonlinear relationship exists between target points in the image and their corresponding points in the world coordinate system. Due to these distortions, the calibration coefficients for a given direction vary across different image regions. Therefore, calibration using a calibration plate is necessary to confirm the distortion coefficients of the camera's built-in and external matrix parameters.

[0042] In one embodiment, after obtaining the grayscale image, the grayscale image is corrected, including: obtaining the coordinates of the upper edge and lower edge of the columnar workpiece in the grayscale image, performing an addition algorithm on the average data to obtain a center line, and obtaining the slope of the center line by least squares fitting, thereby obtaining a rotation angle, and correcting the grayscale image according to the rotation angle.

[0043] Among them, due to the deviation of camera installation and equipment assembly, the obtained part image may have a small tilt angle. When calculating the shape deviation, it is necessary to obtain the edge coordinates of multiple grayscale images, and their coordinates will be affected by the small tilt angle. This increases the deviation and complexity of detection. In order to improve the detection accuracy and efficiency, it is necessary to correct part of the measured image. The correction method is as above, among which the correction by the rotation angle can be expressed as correcting the measured part image with q. Assuming that the counterclockwise rotation of this point P0 (x0, y0) is θ P0 (x, y), the coordinate point matrix expression after rotation is as follows:

[0044]

[0045] In one embodiment, after obtaining the corrected grayscale image, the grayscale image is preprocessed, including: extracting a region of interest; filtering the same grayscale image using a Gaussian filter; performing threshold segmentation on the processed grayscale image based on the Otsu method; extracting the rough edges of the columnar workpiece in the grayscale image after threshold segmentation based on a multi-level edge detection algorithm; and obtaining fine edges from the rough edges using a polynomial fitting algorithm.

[0046] Among them, the polynomial fitting algorithm can be expressed as:

[0047]

[0048] By calculating the quadratic sum of least squares and deriving it, if it is equal to 0, we get the result:

[0049]

[0050]

[0051] By solving the above equations, the fitted polynomial coefficients can be determined.

[0052] Based on the same idea, an exemplary embodiment of the present disclosure also provides a workpiece precision detection system, including: an acquisition module, used to obtain multiple grayscale images taken when a cylindrical workpiece is rotated axially, the total rotation angle of the cylindrical workpiece is 360 degrees, and the multiple grayscale images are taken at the same interval angle; a calculation module, used to obtain multiple sampling points of the pixel edge of the grayscale image, generate a first baseline according to the least squares method, set a second baseline parallel to the first baseline, the second baseline takes the sampling point with the farthest vertical distance from the first baseline as the base point, and obtains a first boundary line by changing the slope of the second baseline, and sets a second boundary line parallel to the first boundary line, and the second boundary line intersects with the first boundary line at The sampling point with the farthest vertical distance from the boundary line is used to calculate the distance between the first boundary line and the second boundary line to obtain the straightness deviation; and the pixel edges of the multiple grayscale images are used to obtain the three-dimensional contour coordinate set of the surface of the columnar workpiece, obtain all coordinate points of the coordinate set under the cross section of the same columnar workpiece, obtain the center coordinates of the cross section of the columnar workpiece based on the particle swarm optimization algorithm, calculate the difference between the farthest distance and the closest distance of the coordinate points under the same cross section from the center coordinates, and obtain the roundness deviation; and the spatial axis is obtained based on the least squares fitting according to the center coordinates of each cross section obtained, calculate the difference between the farthest point and the closest point from the spatial axis among the coordinate points of all cross sections, and obtain the cylindricity deviation.

[0053] The specific details of each module in the above system have been described in detail in the implementation method part. For details not disclosed, please refer to the implementation method part, and they will not be repeated here.

[0054] Based on the same idea, the embodiment of this specification also provides a workpiece precision detection device, such as Figure 4 shown.

[0055] The workpiece precision detection device may be the terminal device or server provided in the above embodiment.

[0056] The workpiece precision detection device may have relatively large differences due to different configurations or performances, and may include one or more processors 501 and memory 502, and the memory 502 may store one or more storage applications or data. Among them, the memory 502 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) and / or a cache storage unit, and may further include a read-only storage unit. The application stored in the memory 502 may include one or more program modules (not shown in the figure), such program modules include but are not limited to: an operating system, one or more application programs, other program modules and program data, each of these examples or some combination may include the implementation of a network environment. Furthermore, the processor 501 can be configured to communicate with the memory 502 to execute a series of computer executable instructions in the memory 502 on the workpiece precision detection device. The workpiece precision detection device may further include one or more power supplies 503, one or more wired or wireless network interfaces 504, one or more I / O interfaces (input and output interfaces) 505, and one or more external devices 506 (e.g., a keyboard, a pointing device, a Bluetooth device, etc.). The device may also communicate with one or more devices that enable a user to interact with the device, and / or with any device that enables the device to communicate with one or more other computing devices (e.g., a router, a modem, etc.). Such communication may be performed via the I / O interface 505. Furthermore, the device may also communicate with one or more networks (e.g., a local area network (LAN)) via the wired or wireless interface 504.

[0057] Specifically, in this 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, wherein 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 one or more programs are configured to be executed by one or more processors 501, including computer-executable instructions for performing the following:

[0058] Acquire multiple grayscale images captured by the cylindrical workpiece under axial rotation, wherein the total angle of rotation of the cylindrical workpiece is 360°, and the multiple grayscale images are captured at the same interval angle;

[0059] Acquire multiple sampling points on the pixel edge of the grayscale image, generate a first baseline based on a least squares method, set a second baseline parallel to the first baseline, the second baseline having the sampling point farthest from the first baseline as a base point, obtain a first boundary line by changing the slope of the second baseline, set a second boundary line parallel to the first boundary line, the second boundary line intersecting at the sampling point farthest from the first boundary line, calculate the distance between the first boundary line and the second boundary line, and obtain a straightness deviation;

[0060] Based on the pixel edges of the plurality of grayscale images obtained, a three-dimensional contour coordinate set of the surface of the cylindrical workpiece is obtained, all coordinate points of the coordinate set in a cross section of the same cylindrical workpiece are obtained, and based on a particle swarm optimization algorithm, the center coordinates of the cross section of the cylindrical workpiece are obtained, and the difference between the farthest distance and the closest distance of the coordinate points in the same cross section from the center coordinates is calculated to obtain the roundness deviation;

[0061] According to the obtained coordinates of the center of each section, the spatial axis is obtained based on the least squares fitting method, and the difference between the farthest and closest points from the spatial axis among the coordinate points of all sections is calculated to obtain the cylindricity deviation.

[0062] Through the description of the above embodiments, it is easy for those skilled in the art to understand that the example embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the exemplary embodiment of the present disclosure.

[0063] Furthermore, the figures above are merely illustrative of the processes included in the methods according to exemplary embodiments of the present disclosure and are not intended to be limiting. It is readily understood that the processes illustrated in the figures above do not indicate or limit the temporal order of these processes. Furthermore, it is readily understood that these processes may be executed synchronously or asynchronously, for example, in multiple modules.

[0064] It should be noted that although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the exemplary embodiments of the present disclosure, the features and functions of two or more modules or units described above can be concretized in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided into multiple modules or units to be concretized.

[0065] Other embodiments of the present disclosure will readily occur to those skilled in the art after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art not disclosed herein. The description and embodiments are to be considered as exemplary only, with the true scope and spirit of the present disclosure being indicated by the claims.

[0066] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes can be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. A workpiece precision detection method, characterized in that: The method comprises: Acquire multiple grayscale images captured by the cylindrical workpiece under axial rotation, wherein the total angle of rotation of the cylindrical workpiece is 360°, and the multiple grayscale images are captured at the same interval angle; Acquire multiple sampling points on the pixel edge of the grayscale image, generate a first baseline based on a least squares method, set a second baseline parallel to the first baseline, the second baseline having the sampling point farthest from the first baseline as a base point, obtain a first boundary line by changing the slope of the second baseline, set a second boundary line parallel to the first boundary line, the second boundary line intersecting at the sampling point farthest from the first boundary line, calculate the distance between the first boundary line and the second boundary line, and obtain a straightness deviation; Based on the pixel edges of the plurality of grayscale images obtained, a three-dimensional contour coordinate set of the surface of the cylindrical workpiece is obtained, all coordinate points of the coordinate set in a cross section of the same cylindrical workpiece are obtained, and based on a particle swarm optimization algorithm, the center coordinates of the cross section of the cylindrical workpiece are obtained, and the difference between the farthest distance and the closest distance of the coordinate points in the same cross section from the center coordinates is calculated to obtain the roundness deviation; According to the obtained coordinates of the center of each section, the spatial axis is obtained based on the least squares fitting method, and the difference between the farthest and closest points from the spatial axis among the coordinate points of all sections is calculated to obtain the cylindricity deviation.

2. The workpiece accuracy detection method according to claim 1, characterized in that: Before acquiring the grayscale image, a camera used to acquire the grayscale image is calibrated.

3. The workpiece accuracy detection method according to claim 1, characterized in that: After obtaining the grayscale image, correcting the grayscale image includes: The coordinates of the upper and lower edges of the columnar workpiece in the grayscale image are obtained, the center line is calculated by an addition algorithm on the average data, and the slope of the center line is obtained by least squares fitting, thereby obtaining the rotation angle, and the grayscale image is corrected according to the rotation angle.

4. The workpiece accuracy detection method according to claim 3, characterized in that: After obtaining the corrected grayscale image, preprocessing the grayscale image includes: Extract regions of interest; Using a Gaussian filter to filter the grayscale image; Performing threshold segmentation on the processed grayscale image based on the Otsu algorithm; Extracting rough edges of columnar workpieces in the grayscale image after threshold segmentation based on a multi-level edge detection algorithm; A polynomial fitting algorithm is used to obtain a fine edge from the rough edge.

5. A workpiece precision detection system, characterized in that: include: An acquisition module is used to acquire a plurality of grayscale images captured by the cylindrical workpiece under axial rotation, wherein the total angle of rotation of the cylindrical workpiece is 360°, and the plurality of grayscale images are captured at the same interval angle; a calculation module, configured to obtain a plurality of sampling points at the pixel edge of the grayscale image, generate a first baseline based on a least squares method, set a second baseline parallel to the first baseline, the second baseline being based on the sampling point that is the farthest vertically from the first baseline, obtain a first boundary line by changing the slope of the second baseline, set a second boundary line parallel to the first boundary line, the second boundary line intersecting at the sampling point that is the farthest vertically from the first boundary line, calculate the distance between the first boundary line and the second boundary line, and obtain a straightness deviation; and obtaining a three-dimensional contour coordinate set of the cylindrical workpiece surface based on the pixel edges of the plurality of grayscale images obtained, obtaining all coordinate points of the coordinate set in a cross section of the cylindrical workpiece, obtaining the center coordinates of the cross section of the cylindrical workpiece based on a particle swarm optimization algorithm, and calculating the difference between the farthest distance and the closest distance of the coordinate points in the same cross section from the center coordinates to obtain a roundness deviation; And it is used to obtain the spatial axis based on the least squares fitting method according to the center coordinates of each cross section, calculate the difference between the farthest and closest points from the spatial axis among the coordinate points of all cross sections, and obtain the cylindricity deviation.

6. A workpiece precision detection device, characterized in that: include: Camera and light source; Robotic arm; one or more processors; A storage device for storing one or more programs, which, when executed by the one or more processors, enables the one or more processors to implement the workpiece accuracy detection method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Method for detecting maximum bending point of shaft workpiece based on least square method

    CN112090994A

  • Center detection method

    JP2020091177A