Screw machining error measuring method, device and equipment and storage medium

Through optical projection and image processing technology, the processing error of the screw is quickly measured, which solves the problems of slow measurement and high workload in the prior art, and achieves efficient and accurate screw error evaluation.

CN119289896APending Publication Date: 2025-01-10ZHEJIANG UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411506819.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-28
Publication Date
2025-01-10

AI Technical Summary

Technical Problem

The existing screw machining error measurement methods are relatively slow, require long waits and manual programming, which increases the workload of the measuring staff and lacks rapid measurement methods.

Method used

Optical projection is used to obtain the screw contour image, and the processing error of the screw is calculated through image processing and edge contour extraction, including image noise reduction processing, edge detection, reference image mapping adjustment and area segmentation, and the size and profile error of the screw are calculated.

Benefits of technology

It realizes rapid measurement of screw machining errors, improves measurement accuracy and efficiency, and reduces the workload of measuring personnel.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119289896A_ABST
    Figure CN119289896A_ABST
Patent Text Reader

Abstract

A screw machining error measurement method, device and equipment and a storage medium, the measurement method comprises: performing optical projection on a screw to obtain a first target image, and generating a reference image according to theoretical parameters of the screw, the first target image being an optical projection image, the matching contour reference image being a digital image, and the matching contour reference image being a digital image; the first target image is preprocessed to obtain a second target image, the second target image is a digital image, the second target image is mapped and adjusted based on the reference image to obtain a third target image, the third target image is a digital image, and a screw machining error is determined based on the reference image and the third target image; compared with the prior art, the screw contour image is obtained through optical projection, image processing and edge extraction are carried out on the screw contour image, and the machining error of the screw is calculated based on the edge extraction result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of parts measurement, and in particular to a method, device, equipment and storage medium for measuring screw machining errors. Background Art

[0002] Plastic machinery represented by high-end large-scale injection molding machines is the industrial mother machine for polymer material molding and processing. The high-performance engineering plastic products it produces are in great demand in the fields of aerospace, military defense, and the automotive industry. The screw, as the "heart" of the injection molding machine, is responsible for stirring, mixing, extruding, and melting plastic particles. From the perspective of screw manufacturing, the core indicators of injection molding machines such as plasticization quality and efficiency, melt pressure fluctuations, and repeated injection accuracy rely on the consistency of the screw base diameter, screw outer diameter concentricity, screw dimensional accuracy, screw surface roughness, and surface integrity.

[0003] During the production process of the screw, it is necessary to measure the relevant process parameters of the screw in a timely manner to confirm the process status of the screw. The existing screw processing error measurement is often carried out by scanning the screw surface with a probe to build a screw model, and then obtaining the relevant process parameters based on the constructed screw model. In actual measurement, the scanning process of the probe is relatively slow, and the measurement waiting time is long. At the same time, in order to adapt to different types of screws, it is necessary to manually program the scanning path of the probe, which increases the workload of the measurement personnel. Therefore, a faster measurement method is needed to measure the screw processing error.

[0004] In view of the above problems, it is necessary to improve them. Summary of the invention

[0005] In view of the above shortcomings, the technical problem to be solved by the present invention is to provide a method, device, equipment and storage medium for measuring screw machining errors, so as to quickly measure the screw and evaluate the screw machining errors.

[0006] In order to solve the above technical problems, the technical solution adopted by the present invention is: In a first aspect, the present invention provides a method for measuring a screw machining error, comprising the steps of: S1: optically projecting the screw to obtain a first target image, and generating a reference image according to theoretical parameters of the screw, wherein the first target image is an optically projected image, and the reference image is a digital image; S2: preprocessing the first target image to obtain a second target image, where the second target image is a digital image; S3: Adjusting the second target image based on the reference image mapping to obtain a third target image, wherein the third target image is a digital image; S4: Based on the reference image and the third target image, confirm the screw machining error.

[0007] In an optional solution of the first aspect, preprocessing the first target image includes: Performing image denoising processing on the first target image to obtain a repaired image; Based on the edge detection algorithm, the screw profile in the repaired image is extracted to generate a screw profile image.

[0008] In an optional solution of the first aspect, step S3 includes the following steps: S31: extracting screw profile features in the reference image and the second target image based on an edge detection algorithm; S32: Correcting the screw profile in the second target image according to the screw profile feature.

[0009] In an optional solution of the first aspect, the screw profile features include edge point features and axis features.

[0010] In an optional solution of the first aspect, correcting the screw profile in the second target image includes: Moving the screw profile in the second target image until edge point features of the screw profile coincide with edge point features of the screw profile in the reference image; Rotating the screw profile in the second target image until the axis feature of the screw profile coincides with the axis feature of the screw profile in the reference image; The screw profile in the second target image is scaled until the axis feature of the screw profile is equal in length to the axis feature of the screw profile in the reference image.

[0011] In an optional solution of the first aspect, step S4 includes the following steps: Performing region segmentation on the reference image and the third target image to obtain reference region small blocks and target region small blocks; Extract the screw contour line in the small block of the reference area, obtain the coordinates of the intersection of the screw contour line and the boundary of the small block of the reference area, and record them as the reference coordinates; Extract the screw contour line in the small block corresponding to the target area, obtain the coordinates of the intersection of the screw contour line and the boundary of the small block corresponding to the target area, and record them as the target coordinates; The screw machining error is calculated based on the reference coordinates and the target coordinates.

[0012] In an optional solution of the first aspect, calculating the screw processing error includes: Calculate the distance between the reference coordinate and the target coordinate in the image space to obtain the screw size error; A reference vector is generated based on the reference coordinates, a target vector is generated based on the target coordinates, the angle between the reference vector and the target vector is calculated, and the screw profile error is obtained.

[0013] In a second aspect, the present invention provides a device for measuring screw machining errors, comprising: An optical projection module, used for performing optical projection processing on the screw to obtain a first target image, where the first target image is an optical projection image; The image processing module includes an image denoising unit, an image correction unit and an image dividing unit; the image denoising unit is used to perform image denoising on the first target image to obtain a second target image; the image correction unit is used to perform image geometric transformation operation on the second target image to obtain a third target image; the image dividing unit is used to perform region segmentation on the reference image and the third target image; Edge detection module, used to extract edge features in different images; The deviation calculation module is used to calculate the distance between the coordinate point in the image space and the angular deviation between the coordinate vector in the image space.

[0014] In a third aspect, the present invention provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the method for measuring screw machining errors provided in the first aspect of the embodiment of the present application or any one of the implementations of the first aspect.

[0015] In a fourth aspect, the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute the method for measuring screw processing errors as described in the first aspect of the embodiment of the present invention and any one of the first aspects.

[0016] Compared with the prior art, the present invention has the following beneficial effects: obtaining a screw profile image by optical projection, performing image processing and edge profile extraction operations on the screw profile image, and calculating the screw machining error based on the edge profile extraction result. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 A schematic flow chart of a method for measuring screw machining errors provided in an embodiment of the present application; Figure 2 A schematic diagram of the structure of a screw machining error measuring device provided in an embodiment of the present application; Figure 3 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application; Reference numerals: optical projection module 100 , image processing module 200 , edge detection module 300 , deviation calculation module 400 , electronic device 500 , central processing unit 501 , communication bus 502 , user interface 503 , network interface 504 , memory 505 . DETAILED DESCRIPTION

[0018] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.

[0019] The following description provides examples and does not limit the scope, applicability or examples set forth in the claims. Changes may be made to the functions and arrangements of the elements described without departing from the scope of the present application. Various processes or components may be appropriately omitted, substituted or added to each example. For example, the described method may be performed in an order different from the order described, and various steps may be added, omitted or combined. In addition, features described in some examples may be combined in other examples.

[0020] See also Figure 1 , Figure 1 The figure shows a schematic flow chart of a method for measuring screw machining error provided in an embodiment of the present application. Figure 1 As shown, a method for measuring screw machining error comprises the following steps: S1: Optically project the screw to obtain a first target image, and generate a reference image according to theoretical parameters of the screw, wherein the first target image is an optically projected image and the reference image is a digital image.

[0021] In the embodiment of the present application, the method for measuring the screw machining error can be, but is not limited to, applied to a terminal device, and the terminal device can be, but is not limited to, a digital camera, a desktop computer, a laptop computer, and a tablet computer. The screw theoretical parameters are the design parameters of the screw, and a screw profile image is constructed based on the design parameters of the screw, and the screw profile image is used as a reference image; the screw is processed based on the design parameters of the screw, and a screw profile image of the processed screw is obtained based on optical projection as a first target image, and the screw profile image is compared with the screw profile image in the reference image to obtain the screw machining error data.

[0022] Furthermore, by optically projecting multiple circumferential angles of the same processed screw, multiple first target images of the same processed screw can be obtained, and the screw profiles in the multiple first target images can be compared with the screw profiles in the reference image, respectively, to obtain multiple sets of processing error data of the same screw, so as to eliminate random errors that may exist in the measurement process and improve the measurement accuracy.

[0023] Specifically, the optical projection module 100 includes a light source transmitter and a CMOS receiver, and the object to be measured can quickly and accurately generate a high-precision projection image on the CMOS receiver; the screw to be measured is arranged between the light source transmitter and the CMOS receiver, and the light source transmitter emits a monochromatic LED parallel light, which passes through the screw to be measured, so that the shadow of the screw to be measured generates a first target image on the CMOS receiver; the optical projection module 100 transmits the generated first target image to the image processing module 200. At the same time, the measurement personnel can input the theoretical parameters of the screw into the external drawing software, and the external drawing software automatically generates a reference image based on the parametric drawing, and transmits the generated reference image to the image processing module 200. The first target image generated by the optical projection module 100 and the reference image generated by the external drawing software are the same size.

[0024] S2: Preprocess the first target image to obtain a second target image, where the second target image is a digital image.

[0025] In the embodiment of the present application, in order to improve the clarity of the first target image obtained by optical projection, the first target image needs to be preprocessed, and the second target image obtained after preprocessing is the same size as the reference image. The higher the clarity of the preprocessed optical projection image, the closer the screw profile image obtained based on the optical projection image is to the actual profile of the screw, the more accurate the result obtained by comparing the screw profile with the screw profile in the reference image, and the higher the measurement accuracy.

[0026] As an option of the embodiment of the present application, preprocessing the first target image includes: Performing image denoising processing on the first target image to obtain a repaired image; It can be understood that the image noise reduction processing includes at least one of median filtering noise reduction, mean filtering noise reduction and bilateral filtering noise reduction, and the image noise reduction processing is performed on the first target image to remove image noise that may exist in the first target image to improve the clarity of the first target image; illustratively, the image noise reduction processing of the first target image adopts a median filtering algorithm to replace the value of a certain point in the digital image with the median value of each point in a neighborhood of the point, so that the surrounding pixel values ​​are close to the true value, thereby eliminating isolated noise points, while protecting the edges and details of the image, so as to facilitate the accurate extraction of the screw contour and edge point features in the image.

[0027] Based on the edge detection algorithm, the screw profile in the repaired image is extracted to generate a screw profile image.

[0028] It can be understood that, in a digital image, an edge refers to the part of the image where local changes are most significant. The edge mainly exists between targets and targets, and between targets and backgrounds. It is the discontinuity of local characteristics of the image, such as grayscale mutations, texture structure mutations, and color mutations. Exemplarily, the screw contour in the repaired image can be extracted by using a conventional edge detection algorithm (such as Sobel, Canny) to perform edge detection on the repaired image to obtain a binary screw contour image. The repaired image can also be interpolated by sub-pixel interpolation based on the Zernike moment to determine the screw edge position to obtain the screw contour image.

[0029] Furthermore, preprocessing the first target image can also include graying the first target image to obtain a grayed image, and then performing image noise reduction and screw profile extraction based on the grayed image; the graying process can filter the first target image by filtering it with a mean filter, a Gaussian filter, etc. to remove noise in the image and obtain a smoother image.

[0030] S3: Adjusting the second target image based on the reference image mapping to obtain a third target image, wherein the third target image is a digital image.

[0031] In the embodiment of the present application, the two-dimensional coordinates of the screw profile in the reference image in the reference image are used as the reference, and the two-dimensional coordinates of the screw profile in the second target image in the second target image are adjusted so that the screw profile in the third target image and the screw profile in the reference image have the same coordinate position in the image. At this time, the screw profile in the third target image and the screw profile in the reference image have a high degree of overlap, which is convenient for calculating the processing error of the screw. The third target image obtained by the mapping adjustment is the same size as the reference image.

[0032] As an option in the embodiment of the present application, step S3 includes the following steps: S31: extracting screw profile features in the reference image and the second target image based on an edge detection algorithm; It can be understood that, in a digital image, an edge refers to the part of the image where local changes are most significant. The edge mainly exists between targets and targets, and between targets and backgrounds. It is the discontinuity of local characteristics of the image, such as grayscale mutations, texture structure mutations, and color mutations. Exemplarily, the screw profile features of the reference image and the second target image can be extracted by using conventional edge detection algorithms (such as Sobel and Canny) to perform edge detection on the repaired image to obtain binary screw profile features. The repaired image can also be interpolated by sub-pixel interpolation based on the Zernike moment to determine the screw edge position to obtain the screw profile features.

[0033] Specifically, the screw profile features include edge point features and axis features. Exemplarily, based on the actual characteristics of the screw and the screw processing requirements, in order to facilitate the selection of the same edge point features in the reference image and the second target image, the midpoint of the contour line of the outermost end of the screw head is used as the edge point feature, and the midpoint of the contour line of the outermost end of the screw tail is used as the auxiliary edge point feature. The edge point features are combined to construct the axis feature of the screw profile, and the axis feature uses the edge point feature and the auxiliary edge point feature as the axis endpoints respectively.

[0034] S32: Correcting the screw profile in the second target image according to the screw profile feature.

[0035] It can be understood that correcting the screw profile in the second target image refers to adjusting the screw profile in the second target image so that the two-dimensional coordinates of the screw profile feature in the second target image are the same as the two-dimensional coordinates of the screw profile feature in the reference image in the reference image; at this time, the screw profile in the second target image has a high degree of overlap with the screw profile in the reference image, and various parts of the screw correspond to each other, so as to improve the accuracy of the calculation of the processing error.

[0036] As another optional embodiment of the present application, correcting the screw profile in the second target image includes: Moving the screw profile in the second target image until edge point features of the screw profile coincide with edge point features of the screw profile in the reference image; Exemplarily, the midpoint of the contour line at the outermost end of the screw head is used as the edge point feature, the two-dimensional coordinates of the edge point features in the second target image and the reference image are extracted, and then the screw contour in the second target image is moved until the two-dimensional coordinates of the edge point feature coincide with the two-dimensional coordinates of the edge point feature in the reference image.

[0037] Rotating the screw profile in the second target image until the axis feature of the screw profile coincides with the axis feature of the screw profile in the reference image; Exemplarily, the midpoint of the contour line of the outermost end of the screw head is used as the edge point feature, and the midpoint of the contour line of the outermost end of the screw tail is used as the auxiliary edge point feature, and the edge point features are combined to construct the axis feature of the screw profile; the two-dimensional coordinates of the auxiliary edge point features in the second target image and the two-dimensional coordinates of the auxiliary edge point features in the reference image are extracted, and the screw profile in the second target image is rotated based on the edge point features in the second target image until the axis feature of the screw profile in the second target image coincides with the axis feature of the screw profile in the reference image.

[0038] The screw profile in the second target image is scaled until the axis feature of the screw profile is equal in length to the axis feature of the screw profile in the reference image.

[0039] Exemplarily, the midpoint of the contour line of the outermost end of the screw head is used as the edge point feature, and the midpoint of the contour line of the outermost end of the screw tail is used as the auxiliary edge point feature, and the edge point features are combined to construct the axis feature of the screw profile; the two-dimensional coordinates of the auxiliary edge point features in the second target image and the two-dimensional coordinates of the auxiliary edge point features in the reference image are extracted, and the screw profile in the second target image is scaled based on the edge point features in the second target image until the auxiliary edge point features of the screw profile in the second target image coincide with the two-dimensional coordinates of the screw profile in the reference image, at which point the axis feature of the screw profile in the second target image is equal in length to the axis feature of the screw profile in the reference image.

[0040] The reference image and the third target image are segmented into regions to obtain a number of region blocks of equal number and same size; the several region blocks in the reference image are matched with the several region blocks in the third target image so that two region blocks located in the same two-dimensional region of the reference image and the third target image correspond to each other; the deviation value of the screw contour line in the two corresponding region blocks is calculated, and the processing error of the screw is quantified based on the several deviation values.

[0041] S4: Based on the reference image and the third target image, confirm the screw machining error.

[0042] In the embodiment of the present application, the third target image obtained by adjusting the mapping of the second target image is equal in size to the reference image.

[0043] As an option in the embodiment of the present application, step S4 includes the following steps: S41: performing region segmentation on the reference image and the third target image to obtain reference region small blocks and target region small blocks; Specifically, the reference image is segmented into regions to obtain a number of reference region blocks, and the third target image is segmented into regions to obtain a number of target region blocks, the number of the reference region blocks is equal to the number of the target region blocks and the image sizes are the same; the reference region blocks and the target region blocks located at the same position of the image are used for matching and comparison.

[0044] S42: extracting the screw contour line in the small block of the reference area, obtaining the coordinates of the intersection of the screw contour line and the boundary of the small block of the reference area, and recording them as the reference coordinates; Specifically, based on the edge detection algorithm, the coordinates of the intersections of the image lines and the image boundary in the small block of the reference area are obtained. Usually, the image lines and the image boundary form two intersections. Based on the position of the small block of the reference area in the reference image, the coordinates of the intersections of the image lines and the image boundary in the small block of the reference area are converted into the coordinates of the intersections in the reference image.

[0045] S43: extracting the screw contour line in the small block corresponding to the target area, obtaining the coordinates of the intersection of the screw contour line and the boundary of the small block corresponding to the target area, and recording them as the target coordinates; Specifically, based on the edge detection algorithm, the coordinates of the intersections of the image lines and the image boundary in the target area block are obtained. Usually, the image lines and the image boundary form two intersections. Based on the position of the target area block in the third target image, the coordinates of the intersections of the image lines and the image boundary in the target area block are converted into the coordinates of the intersections in the third target image.

[0046] S44: Calculate the screw machining error based on the reference coordinates and the target coordinates.

[0047] Specifically, based on the small blocks of the reference area and the small blocks of the target area located at the same position of the reference image and the third target image, the coordinate values ​​of the intersections of the image lines and the image boundary in the small blocks of the reference area are extracted, and the coordinate values ​​of the intersections of the image lines and the image boundary in the small blocks of the target area are extracted, and the two sets of intersection coordinate values ​​are converted into intersection coordinate values ​​in the same image coordinate system. The Euclidean distance between the intersection of the image line and the image boundary in the third target image and the intersection of the corresponding image line and the image boundary in the reference image is calculated, and this distance is the dimensional deviation at the screw profile part, and the average value or weighted average of the dimensional deviation is calculated to obtain the overall deviation.

[0048] Furthermore, based on the two intersection points formed by the image lines and the image boundary, a screw profile vector is constructed, and the angular deviation between the screw profile vector in the reference image and the screw profile vector at the corresponding position in the third target image is calculated to obtain the profile deviation at the screw profile portion.

[0049] The following will be combined with the attached Figure 2 , a screw machining error measuring device provided in an embodiment of the present application is introduced in detail. It should be noted that, Figure 2 A schematic diagram of a screw machining error measuring device provided in an embodiment of the present application, which is used to perform the present application Figure 1 For the convenience of explanation, only the part related to the embodiment of the present application is shown. For the specific technical details not disclosed, please refer to the present application. Figure 1 The embodiment shown.

[0050] See also Figure 2 , Figure 2 Schematic diagram of a screw machining error measuring device provided in an embodiment of the present application. Figure 3 As shown, a screw machining error measuring device comprises: The optical projection module 100 is used to perform optical projection processing on the screw to obtain a first target image, where the first target image is an optical projection image; The image processing module 200 includes an image denoising unit, an image correction unit and an image segmentation unit; the image denoising unit is used to perform image denoising on the first target image to obtain a second target image; the image correction unit is used to perform image geometric transformation operation on the second target image to obtain a third target image; the image segmentation unit is used to perform region segmentation on the reference image and the third target image; An edge detection module 300 is used to extract edge features in different images; The deviation calculation module 400 is used to calculate the distance between the coordinate point in the image space and the angular deviation between the coordinate vector in the image space.

[0051] In one possible implementation, the image noise reduction unit is specifically used for: Perform image denoising processing on the first target image to obtain a repaired image.

[0052] In one possible implementation, the image correction unit is specifically used for: Moving the screw profile in the second target image until edge point features of the screw profile coincide with edge point features of the screw profile in the reference image; Rotating the screw profile in the second target image until the axis feature of the screw profile coincides with the axis feature of the screw profile in the reference image; The screw profile in the second target image is scaled until the axis feature of the screw profile is equal in length to the axis feature of the screw profile in the reference image.

[0053] In one possible implementation, the image segmentation unit is specifically used for: The reference image and the third target image are segmented into regions to obtain reference region blocks and target region blocks.

[0054] In one possible implementation, the edge detection module 300 is specifically used for: Based on the edge detection algorithm, the screw profile in the repaired image is extracted to generate a screw profile image; Based on the edge detection algorithm, the screw profile features in the reference image and the second target image are extracted; Extract the screw contour line in the small block of the reference area, obtain the coordinates of the intersection of the screw contour line and the boundary of the small block of the reference area, and record them as the reference coordinates; The screw contour line in the small block corresponding to the target area is extracted, and the coordinates of the intersection of the screw contour line and the boundary of the small block corresponding to the target area are obtained and recorded as the target coordinates.

[0055] In one possible implementation, the deviation calculation module 400 is specifically used for: Calculate the distance between the reference coordinate and the target coordinate in the image space to obtain the screw size error; A reference vector is generated based on the reference coordinates, a target vector is generated based on the target coordinates, the angle between the reference vector and the target vector is calculated, and the screw profile error is obtained.

[0056] Those skilled in the art can clearly understand that the technical solutions of the embodiments of the present application can be implemented with the help of software and / or hardware. The "unit" and "module" in this specification refer to software and / or hardware that can independently complete or cooperate with other components to complete specific functions, where the hardware can be, for example, a field programmable gate array (FPGA), an integrated circuit (IC), etc.

[0057] Each processing unit and / or module of the embodiments of the present application may be implemented by an analog circuit that implements the functions described in the embodiments of the present application, or may be implemented by software that executes the functions described in the embodiments of the present application.

[0058] See also Figure 3 , which shows a schematic diagram of the structure of an electronic device involved in an embodiment of the present application, the electronic device can be used to implement Figure 1 The method in the embodiment shown. Figure 3 As shown, the electronic device 500 may include at least one central processor 501 , at least one network interface 504 , a user interface 503 , a memory 505 , and at least one communication bus 502 .

[0059] The communication bus 502 is used to realize the connection and communication between these components.

[0060] The user interface 503 may include a display screen (Display) and a camera (Camera). Optionally, the user interface 503 may also include a standard wired interface and a wireless interface.

[0061] The network interface 504 may optionally include a standard wired interface or a wireless interface.

[0062] Among them, the central processing unit 501 may include one or more processing cores. The central processing unit 501 uses various interfaces and lines to connect various parts of the entire electronic device 500, and executes various functions and processes data of the terminal 500 by running or executing instructions, programs, code sets or instruction sets stored in the memory 505, and calling data stored in the memory 505. Optionally, the central processing unit 501 can be implemented in at least one hardware form of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA). The central processing unit 501 can integrate one or a combination of a central processing unit (Central Processing Unit, CPU), a graphics processing unit (Graphics Processing Unit, GPU) and a modem. Among them, the CPU mainly processes the operating system, user interface and application programs; the GPU is responsible for rendering and drawing the content to be displayed on the display screen; and the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the central processing unit 501, but implemented separately through a chip.

[0063] Among them, the memory 505 may include a random access memory (Random Access Memory, RAM) and may also include a read-only memory (Read-Only Memory). Optionally, the memory 505 includes a non-transitory computer-readable storage medium. The memory 505 can be used to store instructions, programs, codes, code sets or instruction sets. The memory 505 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned various method embodiments, etc.; the data storage area may store data involved in the above-mentioned various method embodiments, etc. The memory 505 may also be optionally at least one storage device located away from the aforementioned central processor 501. As Figure 3 As shown, the memory 505 as a computer storage medium may include an operating system, a network communication module, a user interface module, and program instructions.

[0064] The present application also provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the steps of the above method are implemented. The computer-readable storage medium may include, but is not limited to, any type of disk, including a floppy disk, an optical disk, a DVD, a CD-ROM, a micro drive, and a magneto-optical disk, a ROM, a RAM, an EPROM, an EEPROM, a DRAM, a VRAM, a flash memory device, a magnetic card or an optical card, a nanosystem (including a molecular memory IC), or any type of medium or device suitable for storing instructions and / or data.

[0065] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.

[0066] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0067] In the several embodiments provided in the present application, it should be understood that the disclosed devices can be implemented in other ways. For example, the device embodiments described above are only schematic, such as the division of units, which is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some service interfaces, and the indirect coupling or communication connection of devices or units can be electrical or other forms.

[0068] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0069] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0070] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a memory, including a number of instructions to enable a computer device (which can be a personal computer, server or network device, etc.) to execute all or part of the steps of the various embodiments of the present application. The aforementioned memory includes: U disk, read-only memory (ROM), random access memory (RAM), mobile hard disk, disk or optical disk and other media that can store program codes.

Claims

1. A method for measuring screw machining error, characterized in that: The following steps are included: S1: optically projecting the screw to obtain a first target image, and generating a reference image according to theoretical parameters of the screw, wherein the first target image is an optically projected image, and the reference image is a digital image; S2: preprocessing the first target image to obtain a second target image, where the second target image is a digital image; S3: Adjusting the second target image based on the reference image mapping to obtain a third target image, wherein the third target image is a digital image; S4: Based on the reference image and the third target image, confirm the screw machining error.

2. A method for measuring screw machining error according to claim 1, characterized in that: The preprocessing of the first target image comprises: Performing image denoising processing on the first target image to obtain a repaired image; Based on the edge detection algorithm, the screw profile in the repaired image is extracted to generate a screw profile image.

3. The method for measuring screw machining error according to claim 1, characterized in that: The step S3 includes the following steps: S31: extracting screw profile features in the reference image and the second target image based on an edge detection algorithm; S32: Correcting the screw profile in the second target image according to the screw profile feature.

4. A method for measuring screw machining error according to claim 3, characterized in that: The screw profile features include edge point features and axis features.

5. The method for measuring screw machining error according to claim 3, characterized in that: The correcting the screw profile in the second target image comprises: Moving the screw profile in the second target image until edge point features of the screw profile coincide with edge point features of the screw profile in the reference image; Rotating the screw profile in the second target image until the axis feature of the screw profile coincides with the axis feature of the screw profile in the reference image; The screw profile in the second target image is scaled until the axis feature of the screw profile is equal in length to the axis feature of the screw profile in the reference image.

6. A method for measuring screw machining error according to claim 1, characterized in that: The step S4 includes the following steps: S41: performing region segmentation on the reference image and the third target image to obtain reference region small blocks and target region small blocks; S42: extracting the screw contour line in the small block of the reference area, obtaining the coordinates of the intersection of the screw contour line and the boundary of the small block of the reference area, and recording them as the reference coordinates; S43: extracting the screw contour line in the small block corresponding to the target area, obtaining the coordinates of the intersection of the screw contour line and the boundary of the small block corresponding to the target area, and recording them as the target coordinates; S44: Calculate the screw machining error based on the reference coordinates and the target coordinates.

7. A method for measuring screw machining errors according to claim 6, characterized in that: The calculation of screw machining error includes: Calculate the distance between the reference coordinate and the target coordinate in the image space to obtain the screw size error; A reference vector is generated based on the reference coordinates, a target vector is generated based on the target coordinates, the angle between the reference vector and the target vector is calculated, and the screw profile error is obtained.

8. A device for measuring screw machining errors, characterized in that: include An optical projection module (100) is used to perform optical projection processing on the screw to obtain a first target image, wherein the first target image is an optical projection image; The image processing module (200) comprises an image denoising unit, an image correction unit and an image dividing unit; the image denoising unit is used to perform image denoising on a first target image to obtain a second target image; the image correction unit is used to perform image geometric transformation operation on the second target image to obtain a third target image; the image dividing unit is used to perform region segmentation on the reference image and the third target image; An edge detection module (300) is used to extract edge features in different images; The deviation calculation module (400) is used to calculate the distance of the coordinate point in the image space and the angular deviation of the coordinate vector in the image space.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, wherein the computer-readable storage medium has instructions stored therein, and when the instructions are executed on a computer or a processor, the computer or the processor executes the steps of the method according to any one of claims 1 to 7.