Automatic grinding method, device and equipment for long products

By acquiring the image of the long material and automatically identifying the central axis and defect coordinates, and controlling the grinding head with the pressure sensor, the problem of existing equipment being unable to accurately locate and control grinding is solved, and the precise grinding and efficient repair of the long material is achieved.

CN118990143BActive Publication Date: 2024-12-31CHENGDE JIANLONG SPECIAL STEEL
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411488158.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-24
Publication Date
2024-12-31
Estimated Expiration
2044-10-24

AI Technical Summary

Technical Problem

The existing long-material grinding equipment cannot accurately locate the defect position and cannot accurately control the opening and closing time of the grinding machine, resulting in the inability to accurately detect and repair the raised defects of the long-material, which is prone to cause new defects.

Method used

By obtaining the two ends and side images of the target long material, automatically identify the central axis and defect coordinates, determine the position of the raised defect by changing the light reflectivity, and control the start and stop of the grinding head through multiple pressure sensors to achieve accurate grinding.

Benefits of technology

It improves defect identification efficiency and polishing accuracy, avoids the occurrence of new defects, and enhances the accuracy and flexibility of the polishing process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118990143B_ABST
    Figure CN118990143B_ABST
Patent Text Reader

Abstract

The present application is applicable to the field of metallurgical technology, and provides a method, device and equipment for automatic grinding of long materials, the method comprising: obtaining images of both ends of the target long material; obtaining the central axis of the target long material based on the images of both ends; controlling the center of the fixing device to align with the central axis of the target long material, and controlling the fixing device to clamp the target long material; obtaining a side image of the target long material; obtaining the coordinates of the defect of the target long material based on the side image; controlling the fixing device to rotate according to the coordinates so that the defect of the target long material is aligned with the defect grinding head; and controlling the defect grinding head to grind the target defect. The present application can realize accurate automatic grinding of long materials.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of metallurgical technology, and in particular relates to a method, device and equipment for automatically grinding long products. Background Art

[0002] During the production process, long products are affected by gravity, clamping force, inertia force, transmission force and cutting force. Under the influence of these forces, the long products produced will have a certain degree of error in some areas. Therefore, when long products are ground in sections, there will be height differences at the joints of different sections, that is, raised defects. This kind of raised defect is difficult to detect with the human eye and requires equipment for precise measurement.

[0003] After the production of long products is completed, the defects need to be re-grinded. However, the existing equipment is not accurate in detecting and grinding raised defects. It can only determine a rough grinding range and cannot accurately determine the length of the grinding time. In other words, it cannot accurately control the opening and closing time of the grinding machine, which is easy to cause new defects. Summary of the invention

[0004] In order to overcome the technical problems existing in the related art that the defect position cannot be accurately located and the opening and closing time of the grinding machine cannot be accurately controlled, the embodiments of the present application provide a method, device and equipment for automatic grinding of long materials.

[0005] This application is implemented through the following technical solutions:

[0006] In a first aspect, an embodiment of the present application provides a method for automatically grinding a long material, comprising:

[0007] Acquire images of both ends of the target long material.

[0008] Based on the images at both ends, the central axis of the target long material is obtained; the center of the fixing device is controlled to align with the central axis of the target long material, and the fixing device is controlled to clamp the target long material.

[0009] A side image of the target long material is obtained; based on the side image, the coordinates of the defect of the target long material are obtained; according to the coordinates, the fixing device is controlled to rotate so that the defect of the target long material is aligned with the defect grinding head.

[0010] Control the defect grinding head to grind the target defect.

[0011] In combination with the first aspect, in some possible implementations, obtaining the coordinates of the target long material defect based on the side image includes:

[0012] Based on the side image, a raised defect sub-image is determined.

[0013] Based on the raised defect sub-image, the coordinates of the target long material defect are obtained.

[0014] In combination with the first aspect, in some possible implementations, determining the convex defect sub-image based on the side image includes:

[0015] The side image is subjected to noise reduction processing to obtain a preprocessed image.

[0016] Convert the preprocessed image into a grayscale image.

[0017] Divide the grayscale image into multiple grayscale sub-images.

[0018] For each grayscale sub-image, the mean and variance of the grayscale values ​​of the pixels in the grayscale sub-image are calculated; and according to the mean and variance of the adjacent sub-images of the grayscale sub-image, whether the grayscale sub-image is an abnormal image is determined.

[0019] The grayscale sub-image determined to be an abnormal image is regarded as a convex defect sub-image.

[0020] In combination with the first aspect, in some possible implementations, obtaining the coordinates of the target long material defect based on the raised defect sub-image includes:

[0021] For the longitudinal directions corresponding to different lengths of the target long material, if the number of raised defect sub-images in the longitudinal direction is greater than or equal to the preset number, the target coordinates are obtained based on the length and the origin; wherein the origin is the four vertices of the side image.

[0022] Summarize all target coordinates to obtain the coordinates of the target long material defect.

[0023] In combination with the first aspect, in some possible implementations, the multiple grayscale sub-images have the same size, and the number of pixels in each grayscale sub-image is the same.

[0024] In combination with the first aspect, in some possible implementations, a plurality of pressure sensors are evenly arranged on the grinding side of the defect grinding head; and controlling the defect grinding head to grind the target defect includes:

[0025] The first pressure collected by each pressure sensor is obtained; and the defect grinding head is controlled to move toward the direction of the target long material.

[0026] When the variance of the plurality of first pressures increases and increases to above a preset threshold, the defect grinding head is controlled to start grinding the target defect.

[0027] When the variance of the plurality of first pressures decreases and decreases below a preset threshold, the defect grinding head is controlled to be powered off to stop grinding the target defect.

[0028] In combination with the first aspect, in some possible implementations, obtaining the central axis of the target long material based on the two end images includes:

[0029] For any end image, the center of the end image is obtained and recorded as the first center.

[0030] The straight line passing through the two first centers is used as the center axis of the target long material.

[0031] In conjunction with the first aspect, in some possible implementations, obtaining a center of the end image, recorded as a first center, includes:

[0032] Three points are randomly selected from the edge of the target long material in the end image and recorded as the first sampling points.

[0033] Arbitrarily select two first sampling points to connect into a line segment, which are recorded as the first line segment and the second line segment.

[0034] Through the midpoint of the first line segment, draw the normal of the first line segment and record it as the first normal.

[0035] Through the midpoint of the second line segment, draw the normal of the second line segment and record it as the second normal.

[0036] The intersection point of the first normal line and the second normal line is taken as the center of the end image and is recorded as the first center.

[0037] In a second aspect, an embodiment of the present application provides an automatic grinding device for long materials, comprising:

[0038] The data acquisition module is used to acquire images of both ends of the target long material.

[0039] The long material correction module is used to obtain the central axis of the target long material based on the images at both ends; control the center of the fixing device to align with the central axis of the target long material, and control the fixing device to clamp the target long material.

[0040] The defect positioning module is used to obtain a side image of the target long material; based on the side image, the coordinates of the defect of the target long material are obtained; according to the coordinates, the fixing device is controlled to rotate so that the defect of the target long material is aligned with the defect grinding head.

[0041] The defect grinding module is used to control the defect grinding head to grind the target defect.

[0042] In a third aspect, an embodiment of the present application provides a terminal device, comprising: a processor and a memory, the memory being used to store a computer program, and when the processor executes the computer program, the method for automatically grinding long materials as described in any one of the first aspects is implemented.

[0043] It can be understood that the beneficial effects of the second and third aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here.

[0044] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:

[0045] The present application can automatically identify the central axis of the target long material by acquiring images of both ends and side surfaces of the target long material, and can also determine the raised defect sub-image, and then determine the coordinates of the target long material defect. This is because for the surface of a long material with a smooth surface, the reflectivity should be the same. If there is a raised defect, then the light reflectivity at that position will change significantly. Automatic identification utilizes the principle of light reflection, which makes it easier to identify the location of the defect and improves the identification efficiency, thereby facilitating the subsequent control of the defect grinding head to accurately grind the defect. A control logic for the defect grinding head that is more suitable for raised defects of different heights is also designed based on the multiple pressure sensors on the defect grinding head, which can make the present solution more universal.

[0046] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present specification. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0048] Figure 1 It is a schematic diagram of the process of the automatic grinding method of long materials provided in one embodiment of the present application;

[0049] Figure 2 It is a schematic structural diagram of a long material automatic grinding device provided in one embodiment of the present application;

[0050] Figure 3 It is a structural diagram of a terminal device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0051] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.

[0052] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.

[0053] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0054] As used in the specification and appended claims of this application, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [described condition or event]", depending on the context.

[0055] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.

[0056] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.

[0057] The embodiment of the present application provides a method for automatically grinding long products, which is specifically used for long products with smooth surfaces, including steel pipes, bars, etc. Figure 1 is a schematic diagram of the process of the automatic grinding method of long materials provided in one embodiment of the present application, referring to Figure 1 , the automatic grinding method of the long product is described in detail as follows:

[0058] Step 101, acquiring images of both ends of a target long material.

[0059] In some specific embodiments, the acquired two end images of the target long material are images of the upper and lower ends of the cylinder of the target long material.

[0060] Step 102, based on the two end images, obtain the central axis of the target long material; control the center of the fixing device to align with the central axis of the target long material, and control the fixing device to clamp the target long material.

[0061] Exemplarily, obtaining the central axis of the target long material based on the two end images includes:

[0062] For any end image, the center of the end image is obtained and recorded as the first center.

[0063] The straight line passing through the two first centers is used as the center axis of the target long material.

[0064] In some specific embodiments, when grinding the protrusions at the joints, the target long material also needs to be rotated at high speed. At this time, the rotation center must be ensured to be the central axis of the target long material (the central axis of the cylinder). In this way, the rotation technology meets the safety requirements and will not cause new defects due to grinding the protrusion defects.

[0065] Exemplarily, obtaining the center of the end image, recorded as a first center, includes:

[0066] Three points are randomly selected from the edge of the target long material in the end image and recorded as the first sampling points.

[0067] Arbitrarily select two first sampling points to connect into a line segment, which are recorded as the first line segment and the second line segment.

[0068] Through the midpoint of the first line segment, draw the normal of the first line segment and record it as the first normal.

[0069] Through the midpoint of the second line segment, draw the normal of the second line segment and record it as the second normal.

[0070] The intersection point of the first normal line and the second normal line is taken as the center of the end image and is recorded as the first center.

[0071] Step 103, obtaining a side image of the target long material; obtaining coordinates of a defect of the target long material based on the side image; and controlling the fixing device to rotate according to the coordinates so that the defect of the target long material is aligned with the defect grinding head.

[0072] In some specific embodiments, the acquired side image of the target long material is an image of the side of a cylinder. The side image may be an image obtained by splicing multiple shots.

[0073] Exemplarily, based on the side image, the coordinates of the target long material defect are obtained, including:

[0074] Based on the side image, a raised defect sub-image is determined.

[0075] Based on the raised defect sub-image, the coordinates of the target long material defect are obtained.

[0076] Exemplarily, determining the convex defect sub-image based on the side image includes:

[0077] The side image is subjected to noise reduction processing to obtain a preprocessed image.

[0078] Convert the preprocessed image into a grayscale image.

[0079] Divide the grayscale image into multiple grayscale sub-images.

[0080] For each grayscale sub-image, the mean and variance of the grayscale values ​​of the pixels in the grayscale sub-image are calculated; and according to the mean and variance of the adjacent sub-images of the grayscale sub-image, whether the grayscale sub-image is an abnormal image is determined.

[0081] The grayscale sub-image determined to be an abnormal image is regarded as a convex defect sub-image.

[0082] In some specific embodiments, there will be a certain slope at the location where the raised defect exists, which is reflected in the image as less light is reflected back. Therefore, there will be obvious differences in the grayscale value of the grayscale image, which is significantly different from the normal grayscale value image. Through comprehensive evaluation of the mean and variance, it is possible to more accurately determine whether a grayscale sub-image is an abnormal image, thereby ensuring the accuracy of abnormal image determination and improving the accuracy of automatic polishing.

[0083] Exemplarily, obtaining the coordinates of the target long material defect based on the raised defect sub-image may include:

[0084] For the longitudinal directions corresponding to different lengths of the target long material, if the number of raised defect sub-images in the longitudinal direction is greater than or equal to the preset number, the target coordinates are obtained based on the length and the origin; wherein the origin is the four vertices of the side image.

[0085] Summarize all target coordinates to obtain the coordinates of the target long material defect.

[0086] In some specific embodiments, in the side image, each raised defect sub-image is marked, and because the grayscale sub-images are of the same size, the number of pixels in the horizontal direction is fixed for the grayscale sub-images. By simply counting the number of grayscale sub-images that the raised defect sub-image is, the coordinates can be determined based on the product of the number of pixels in the horizontal direction of each grayscale sub-image and the number of grayscale sub-images that the raised defect sub-image is.

[0087] In some specific embodiments, the number of grayscale sub-images accommodated in the longitudinal direction of the side image is also fixed. Then, when the number of raised defect sub-images exceeds a preset number, it can be considered that a raised defect exists at this position. The preset number can be determined based on half of the number of grayscale sub-images accommodated in the longitudinal direction of the side image. That is, when the number of grayscale sub-images accommodated in the longitudinal direction of the side image is 10, the preset number can be equal to 5.

[0088] Exemplarily, the multiple grayscale sub-images have the same size, and the number of pixels in each grayscale sub-image is the same.

[0089] In some specific embodiments, in order to better determine the coordinates of the target long material defect, it is necessary to ensure that the size of each grayscale sub-image is the same and the number of pixels in each grayscale sub-image is the same. In this way, the position of the coordinates can be determined more conveniently when determining the defect coordinates. Compared with grayscale sub-images of different sizes, it is also necessary to determine the number of pixels in the horizontal direction when determining the coordinates, and then add them up to obtain the coordinates. The calculation is more accurate, less prone to errors, and the coordinate positioning is more accurate.

[0090] Step 104, controlling the defect grinding head to grind the target defect.

[0091] Exemplarily, a plurality of pressure sensors are evenly arranged on the grinding side of the defect grinding head.

[0092] Exemplarily, controlling the defect grinding head to grind the target defect may include:

[0093] The first pressure collected by each pressure sensor is obtained; and the defect grinding head is controlled to move toward the direction of the target long material.

[0094] When the variance of the plurality of first pressures increases and increases to above a preset threshold, the defect grinding head is controlled to start grinding the target defect.

[0095] When the variance of the plurality of first pressures decreases and decreases below a preset threshold, the defect grinding head is controlled to be powered off to stop grinding the target defect.

[0096] In some specific embodiments, the arrangement of the pressure sensors is an array arrangement. When there is a protrusion defect, the pressure of the sensor directly contacting the protrusion will increase, and the other factors remain unchanged, which causes the variance of the sensor to increase. When the protrusion disappears, that is, when the grinding is completed, the variance will decrease and return to the original level. According to such characteristics, automatic grinding can be achieved. When it is detected that the variance decreases and returns to the original level (decreases to below the preset threshold), the power is automatically cut off and the grinding is stopped. In this way, it is possible to accurately control the start and shut-off time of the defect grinding head, achieve the purpose of accurately grinding the defects, and avoid creating new defects. At the same time, such a design can also ensure that the grinding time can be adaptively adjusted for protrusion defects of different heights, and the grinding process is more flexible.

[0097] In addition, compared with the method of re-detecting defects based on images to determine whether polishing is completed, it is faster, occupies less computing resources of the equipment, and is more efficient.

[0098] The above-mentioned automatic grinding method for long materials can automatically identify the central axis of the target long material by acquiring the images of both ends and the side images of the target long material, and can also determine the raised defect sub-image, and then determine the coordinates of the target long material defect. This is because for the surface of a long material with a smooth surface, the reflectivity should be the same. If there is a raised defect, then the light reflectivity at that position will change significantly. The automatic identification utilizes the principle of light reflection, which makes it easier to identify the location of the defect and improves the identification efficiency, thereby facilitating the subsequent control of the defect grinding head to accurately grind the defect. A control logic for the defect grinding head that is more suitable for raised defects of different heights is also designed based on the multiple pressure sensors on the defect grinding head, which can make this solution more universal.

[0099] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0100] Corresponding to the long material automatic grinding method described in the above embodiment, Figure 2 A structural block diagram of the long material automatic grinding device provided in an embodiment of the present application is shown. For the sake of convenience of explanation, only the parts related to the embodiment of the present application are shown.

[0101] See also Figure 2 The long material automatic grinding device in the embodiment of the present application may include:

[0102] The data acquisition module 201 is used to acquire images of both ends of the target long material.

[0103] The long material correction module 202 is used to obtain the central axis of the target long material based on the images at both ends; control the center of the fixing device to align with the central axis of the target long material, and control the fixing device to clamp the target long material.

[0104] The defect positioning module 203 is used to obtain a side image of the target long material; based on the side image, obtain the coordinates of the defect of the target long material; according to the coordinates, control the rotation of the fixing device so that the defect of the target long material is aligned with the defect grinding head.

[0105] The defect grinding module 204 is used to control the defect grinding head to grind the target defect.

[0106] Exemplarily, the defect location module 203 may also be used for:

[0107] Based on the side image, a raised defect sub-image is determined.

[0108] Based on the raised defect sub-image, the coordinates of the target long material defect are obtained.

[0109] Exemplarily, the defect location module 203 may also be used for:

[0110] The side image is subjected to noise reduction processing to obtain a preprocessed image.

[0111] Convert the preprocessed image into a grayscale image.

[0112] Divide the grayscale image into multiple grayscale sub-images.

[0113] For each grayscale sub-image, the mean and variance of the grayscale values ​​of the pixels in the grayscale sub-image are calculated; and according to the mean and variance of the adjacent sub-images of the grayscale sub-image, whether the grayscale sub-image is an abnormal image is determined.

[0114] The grayscale sub-image determined to be an abnormal image is regarded as a convex defect sub-image.

[0115] Exemplarily, the defect location module 203 may also be used for:

[0116] For the longitudinal directions corresponding to different lengths of the target long material, if the number of raised defect sub-images in the longitudinal direction is greater than or equal to the preset number, the target coordinates are obtained based on the length and the origin; wherein the origin is the four vertices of the side image.

[0117] Summarize all target coordinates to obtain the coordinates of the target long material defect.

[0118] Exemplarily, the multiple grayscale sub-images have the same size, and the number of pixels in each grayscale sub-image is the same.

[0119] Exemplarily, a plurality of pressure sensors are evenly arranged on the grinding side of the defect grinding head; the defect grinding module 204 can also be used for:

[0120] The first pressure collected by each pressure sensor is obtained; and the defect grinding head is controlled to move toward the direction of the target long material.

[0121] When the variance of the plurality of first pressures increases and increases to above a preset threshold, the defect grinding head is controlled to start grinding the target defect.

[0122] When the variance of the plurality of first pressures decreases and decreases below a preset threshold, the defect grinding head is controlled to be powered off to stop grinding the target defect.

[0123] Exemplarily, the long material correction module 202 may also be used for:

[0124] For any end image, the center of the end image is obtained and recorded as the first center.

[0125] The straight line passing through the two first centers is used as the center axis of the target long material.

[0126] Exemplarily, the long material correction module 202 may also be used for:

[0127] Three points are randomly selected from the edge of the target long material in the end image and recorded as the first sampling points.

[0128] Arbitrarily select two first sampling points to connect into a line segment, which are recorded as the first line segment and the second line segment.

[0129] Through the midpoint of the first line segment, draw the normal of the first line segment and record it as the first normal.

[0130] Through the midpoint of the second line segment, draw the normal of the second line segment and record it as the second normal.

[0131] The intersection point of the first normal line and the second normal line is taken as the center of the end image and is recorded as the first center.

[0132] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / units are based on the same concept as the method embodiment of the present application. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.

[0133] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0134] The present application also provides a terminal device, see Figure 3 The terminal device 300 may include: at least one processor 310 and a memory 320, wherein the memory 320 is used to store a computer program 321, and the processor 310 is used to call and run the computer program 321 stored in the memory 320 to implement the steps in any of the above-mentioned method embodiments, for example Figure 1 Steps 101 to 104 in the illustrated embodiment. Alternatively, when the processor 310 executes the computer program, the functions of each module / unit in the above-mentioned device embodiments are implemented, for example Figure 2 The functions of each module are shown.

[0135] Exemplarily, the computer program 321 may be divided into one or more modules / units, one or more modules / units are stored in the memory 320, and are executed by the processor 310 to complete the present application. The one or more modules / units may be a series of computer program segments that can complete specific functions, and the program segments are used to describe the execution process of the computer program in the terminal device 300.

[0136] Those skilled in the art will understand that Figure 3 It is only an example of a terminal device and does not constitute a limitation on the terminal device. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components, such as input and output devices, network access devices, buses, etc.

[0137] The processor 310 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0138] The memory 320 may be an internal storage unit of the terminal device, or an external storage device of the terminal device, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. The memory 320 is used to store the computer program and other programs and data required by the terminal device. The memory 320 may also be used to temporarily store data that has been output or is to be output.

[0139] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus in the drawings of this application is not limited to only one bus or one type of bus.

[0140] The automatic grinding method for long materials provided in the embodiments of the present application can be applied to terminal devices such as computers, wearable devices, vehicle-mounted devices, tablet computers, laptops, netbooks, etc. The embodiments of the present application do not impose any restrictions on the specific types of terminal devices.

[0141] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in each embodiment of the above-mentioned method for automatic grinding of long materials can be implemented.

[0142] An embodiment of the present application provides a computer program product. When the computer program product runs on a mobile terminal, the mobile terminal can implement the steps in each embodiment of the above-mentioned long material automatic grinding method when executing the computer program product.

[0143] 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 storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may at least include: any entity or device that can carry the computer program code to the camera device / terminal device, recording medium, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, RandomAccess Memory), electrical carrier signal, telecommunication signal and software distribution medium. For example, a USB flash drive, a mobile hard disk, a disk or an optical disk.

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

[0145] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0146] In the embodiments provided in the present application, it should be understood that the disclosed devices / network equipment and methods can be implemented in other ways. For example, the device / network equipment embodiments described above are merely schematic. For example, the division of the modules or units 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 interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0147] 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.

[0148] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. A method for automatically grinding long materials, characterized in that: include: Acquire images of both ends of the target long material; Based on the two end images, the central axis of the target long material is obtained; Controlling the center of the fixture to align with the central axis of the target long material, and controlling the fixture to clamp the target long material; Acquire a side image of the target long material; obtain coordinates of a defect of the target long material based on the side image; and control the fixing device to rotate according to the coordinates so that the defect of the target long material is aligned with the defect grinding head; Controlling the defect grinding head to grind the target defect; A plurality of pressure sensors are evenly arranged on the grinding side of the defect grinding head; and the step of controlling the defect grinding head to grind the target defect comprises: Acquire a first pressure collected by each pressure sensor; and control the defect grinding head to move toward the direction of the target long material; When the variance of the plurality of first pressures increases and increases to above a preset threshold, controlling the defect grinding head to start grinding the target defect; When the variance of the plurality of first pressures decreases and decreases below the preset threshold, controlling the defect grinding head to be powered off and stop grinding the target defect; The obtaining the coordinates of the target long material defect based on the side image includes: Based on the side image, determining a convex defect sub-image; Based on the convex defect sub-image, obtaining the coordinates of the target long material defect; The obtaining the coordinates of the target long material defect based on the convex defect sub-image includes: For the longitudinal directions corresponding to different lengths of the target long material, if the number of raised defect sub-images in the longitudinal direction is greater than or equal to a preset number, the target coordinates are obtained according to the length and the origin; wherein the origin is the four vertices of the side image; All target coordinates are collected to obtain the coordinates of the target long material defect.

2. The method for automatically grinding long materials according to claim 1, characterized in that: The determining of the convex defect sub-image based on the side image includes: Performing noise reduction processing on the side image to obtain a preprocessed image; Converting the preprocessed image into a grayscale image; Dividing the grayscale image into a plurality of grayscale sub-images; For each grayscale sub-image, calculate the mean and variance of the grayscale values ​​of the pixels in the grayscale sub-image; determine whether the grayscale sub-image is an abnormal image based on the mean and variance of the adjacent sub-images of the grayscale sub-image; The grayscale sub-image determined to be an abnormal image is used as the convex defect sub-image.

3. The method for automatically grinding long materials according to claim 2, characterized in that: The multiple grayscale sub-images have the same size, and the number of pixels in each grayscale sub-image is the same.

4. The method for automatically grinding long materials according to claim 1, characterized in that: The obtaining of the target long material center axis based on the two end images comprises: For any end image, obtain the center of the end image, which is recorded as the first center; A straight line passing through the two first centers is used as the central axis of the target long material.

5. The method for automatically grinding long materials according to claim 4, characterized in that: The step of obtaining the center of the end image, recorded as a first center, includes: Three points are randomly selected from the edge of the target long material in the end image and recorded as first sampling points; Randomly select two of the first sampling points to connect into a line segment, recorded as a first line segment and a second line segment; A normal line of the first line segment is drawn through the midpoint of the first line segment, and is recorded as a first normal line; A normal line of the second line segment is drawn through the midpoint of the second line segment, and is recorded as a second normal line; The intersection point of the first normal line and the second normal line is taken as the center of the image at the end, and is recorded as the first center.

6. A terminal device, comprising: A processor and a memory, wherein the memory stores a computer program that can be run on the processor, and wherein when the processor executes the computer program, the automatic grinding method for long materials as described in any one of claims 1 to 5 is implemented.