Intelligent waste mechanical part recycling method and system based on AI vision

By using an AI vision-based method, the defect edge pixel set of waste mechanical parts is identified and segmented, which solves the problem of inaccurate defect area segmentation in existing technologies and improves recycling efficiency.

CN121937372APending Publication Date: 2026-04-28HUZHOU VOCATIONAL TECH COLLEGE
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HUZHOU VOCATIONAL TECH COLLEGE
Filing Date
2025-12-18
Publication Date
2026-04-28

AI Technical Summary

Technical Problem

Existing technologies for recycling waste mechanical parts result in messy segmentation of defective areas, failing to effectively separate defective areas of different natures, leading to low recycling efficiency.

Method used

By using an AI vision-based method, the defect edge pixel set of the target defect area is identified, adjacent pixels are extracted, and the same-order pixel set is identified based on grayscale value. The resulting segments are divided into descending and ascending pixel blocks, which are then classified and recycled using pre-built AI vision technology.

Benefits of technology

It has improved the efficiency of sorting and recycling waste mechanical parts, and enabled more precise segmentation and recycling of defective areas.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121937372A_ABST
    Figure CN121937372A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of waste mechanical part recycling, in particular to an intelligent waste mechanical part recycling method and system based on AI vision, and the method comprises the steps: recognizing adjacent pixel gray values and edge pixel gray values of defect edge pixel points; identifying a same-order pixel point set of defect edge pixel points in the target defect area according to the adjacent pixel gray values and the edge pixel gray values, respectively segmenting a descending-order pixel block and an ascending-order pixel block of the defect edge pixel point set according to the descending-order pixel point set and the ascending-order pixel point set, and judging whether the adjacent pixel points are extracted or not; if extraction is completed, whether block segmentation is completed or not is judged, if block segmentation is not completed, a target defect area is updated through an iteration defect area, and if block segmentation is completed, waste mechanical parts are classified and recycled through the AI vision technology according to descending-order pixel blocks, ascending-order pixel blocks and block segmentation lines. The classified recovery efficiency of the waste mechanical parts can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of waste mechanical parts recycling technology, and in particular to an intelligent recycling method and system for waste mechanical parts based on AI vision. Background Technology

[0002] In the field of machinery manufacturing and equipment remanufacturing, the efficient and precise recycling of waste mechanical parts is a key link in realizing resource recycling and promoting green manufacturing.

[0003] With the development of machine vision technology, some existing mechanical parts recycling solutions acquire grayscale images of the parts and use traditional image processing algorithms (such as global thresholding and edge detection) to identify defect areas. However, in the image segmentation stage, they fail to fully utilize the physical mechanisms of defect formation. Different types of defects often exhibit unique grayscale change trends and characteristics in images. For example, rusted areas typically appear as patches with gradually changing grayscale values, cracks appear as thin lines with abrupt changes in grayscale values, and oily areas may present as patches with uniform grayscale values ​​but differing from the substrate. Most existing methods ignore this characteristic of grayscale values ​​changing in the same direction, failing to aggregate pixels with similar grayscale evolution trends into "homogeneous blocks" with clear physical meaning. This results in messy segmentation results, making it impossible to effectively separate defect areas of different natures.

[0004] Therefore, the current methods for classifying and recycling waste mechanical parts suffer from low recycling efficiency. Summary of the Invention

[0005] This invention provides an intelligent recycling method and system for waste mechanical parts based on AI vision, the main purpose of which is to improve the efficiency of sorting and recycling waste mechanical parts.

[0006] To achieve the above objectives, this invention provides an intelligent recycling method for waste mechanical parts based on AI vision, comprising:

[0007] Obtain grayscale images of discarded mechanical parts;

[0008] In the grayscale image of the component, identify the set of defect edge pixels of the target defect region, and identify the set of adjacent pixels of the defect edge pixels in the set of defect edge pixels;

[0009] In the adjacent pixel set, adjacent pixels are extracted sequentially, and the gray values ​​of adjacent pixels and edge pixels of defect edge pixels are identified. The gray value of adjacent pixels refers to the gray value of adjacent pixels, and the gray value of edge pixels refers to the gray value of defect edge pixels.

[0010] Based on the gray values ​​of adjacent pixels and edge pixels, the same set of pixels at the edge of the defect is identified in the target defect area. The same set of pixels includes a descending set of pixels and an ascending set of pixels. The descending set of pixels refers to the set of consecutive pixels whose gray values ​​decrease as the distance between the defect edge pixels increases, and the ascending set of pixels refers to the set of consecutive pixels whose gray values ​​increase as the distance between the defect edge pixels increases.

[0011] Based on the descending and ascending pixel sets, the target defect region is segmented into descending and ascending pixel blocks of the defect edge pixel set, respectively, to obtain the iterative defect region;

[0012] Determine whether all adjacent pixels have been extracted;

[0013] If all adjacent pixels have not been extracted, return to the steps described above for sequentially extracting adjacent pixels from the set of adjacent pixels.

[0014] If adjacent pixels have been extracted, determine whether the target defect area has been divided into preset blocks.

[0015] If the target defect region is not segmented into blocks, the target defect region is updated using the iterative defect region, and the process returns to the steps described above for identifying the defect edge pixel set of the target defect region in the grayscale image of the component.

[0016] If the target defect area is segmented into blocks, the segmentation texture is identified based on the descending and ascending pixel blocks. Based on the segmentation texture, descending and ascending pixel blocks, pre-built AI vision technology is used to classify and recycle waste mechanical parts.

[0017] Optionally, acquiring the grayscale image of the scrap mechanical parts includes:

[0018] Pre-constructed standard mechanical parts are clamped and fixed to obtain positioning mechanical parts;

[0019] A positioning spherical coordinate system is constructed based on the positioning mechanical components, wherein the center point of the positioning mechanical components is the origin of the spherical coordinate system;

[0020] Based on the positioning sphere coordinate system, the shooting positioning latitude and longitude lines are constructed using preset unit longitude, unit latitude, and unit radius;

[0021] Receive the target latitude and longitude intersection point selected by the user in the shooting positioning latitude and longitude line, and construct a spatial positioning shooting vector based on the target latitude and longitude intersection point and the spherical coordinate origin, wherein the spatial positioning shooting vector takes the target latitude and longitude intersection point as the vector origin and the spherical coordinate origin as the vector endpoint;

[0022] A three-dimensional positioning coordinate system is constructed based on the positioning mechanical parts, wherein the origin of the three-dimensional positioning coordinate system is the center of the positioning mechanical parts, the positive x-axis is the direction of the front view of the positioning mechanical parts, the positive y-axis is the direction of the side view of the positioning mechanical parts, and the positive z-axis is the direction of the top view of the positioning mechanical parts.

[0023] Based on the spatial positioning shooting vector and the three-dimensional positioning coordinate system, the relative shooting parameters corresponding to the intersection of the target latitude and longitude lines are calculated using a pre-constructed shooting parameter formula to obtain a set of relative shooting parameters. The relative shooting parameters include relative shooting distance and relative shooting azimuth. The shooting parameter formula is shown below:

[0024] ;

[0025] in, This represents the angle between the spatial positioning and shooting vector and the x-axis of the three-dimensional positioning coordinate system. This represents the angle between the spatial positioning and shooting vector and the y-axis of the three-dimensional positioning coordinate system. This represents the angle between the spatial positioning and shooting vector and the z-axis of the three-dimensional positioning coordinate system. Indicates relative shooting distance. Represents the unit radius. Indicates the modulus length symbol. Represents the spatial positioning and imaging vector. This represents the vector components of the spatial positioning and imaging vector along the x-axis. This represents the vector component of the spatial positioning and shooting vector on the y-axis. This represents the vector component of the spatial positioning and shooting vector on the z-axis, and cos represents the cosine sign.

[0026] A positioning camera is obtained by taking pictures and fixing them in place using a pre-built high-resolution camera;

[0027] The relative shooting parameters are extracted sequentially from the set of relative shooting parameters. The position angle of the waste mechanical parts is adjusted according to the positioning camera and the relative shooting parameters to obtain the mechanical parts to be tested. The position angle adjustment includes position adjustment and angle adjustment.

[0028] The positioning camera is used to photograph the mechanical parts under test, and an image set of the parts under test is obtained;

[0029] The defect image set of the component to be tested is filtered to obtain a defective component image set;

[0030] Each defective component image in the defective component image set is converted to grayscale to obtain a component grayscale image.

[0031] Optionally, the step of adjusting the azimuth angle of the discarded mechanical parts according to the positioning camera and relative shooting parameters to obtain the mechanical parts to be tested includes:

[0032] The shooting orientation of the waste mechanical parts is adjusted according to the relative shooting orientation in the relative shooting parameters of the positioning camera to obtain the target mechanical parts, wherein the target mechanical parts and the shooting orientation of the positioning camera are relative shooting orientations.

[0033] The shooting distance of the waste mechanical parts is adjusted according to the relative shooting distance in the relative shooting parameters of the positioning camera to obtain the mechanical parts to be tested. The shooting orientation of the mechanical parts to be tested and the positioning camera are relative shooting orientations and shooting distances.

[0034] Optionally, the step of filtering defect images from the image set of the parts to be tested to obtain a set of defective parts images includes:

[0035] The positioning camera is used to photograph the positioning mechanical parts to obtain a standard parts image set;

[0036] The defective component image set is obtained by comparing the standard component image set with the component image set under test.

[0037] Optionally, the step of identifying the set of sequential pixels representing defect edge pixels in the target defect region based on the gray values ​​of adjacent pixels and edge pixels includes:

[0038] Determine whether the grayscale value of the adjacent pixel is greater than the grayscale value of the edge pixel;

[0039] If the gray value of the adjacent pixel is greater than the gray value of the edge pixel, then the defect edge pixel is aggregated with the adjacent pixel to obtain an initial ascending pixel set;

[0040] Identify the ascending edge pixel set of the initial ascending pixel set;

[0041] The ascending edge pixel set is iteratively aggregated within the target defect region to obtain the ascending pixel set;

[0042] If the gray value of the adjacent pixel is not greater than the gray value of the edge pixel, then the defect edge pixel is aggregated with the adjacent pixel to obtain an initial descending pixel set;

[0043] Identify the descending edge pixel set of the initial descending pixel set;

[0044] The descending edge pixel set is iteratively aggregated within the target defect region to obtain the descending pixel set.

[0045] Optionally, identifying the ascending edge pixel set of the initial ascending pixel set includes:

[0046] The aggregated ascending sub-blocks are determined based on the initial ascending pixel set;

[0047] Identify the ascending edge pixel set of the aggregated ascending sub-block, wherein the ascending edge pixel set refers to the set of edge pixels of the aggregated ascending sub-block, and the edge pixels of the aggregated ascending sub-block refer to the pixels located at the block edge of the aggregated ascending sub-block.

[0048] Optionally, the step of iteratively aggregating the ascending edge pixel set within the target defect region to obtain the ascending pixel set includes:

[0049] Determine whether the ascending edge pixel set contains any preset external pixels to be aggregated;

[0050] If there are external pixels to be aggregated in the ascending edge pixel set, then the ascending edge pixels are extracted sequentially from the ascending edge pixel set.

[0051] The ascending edge pixel is sequentially identified as an externally adjacent pixel, wherein the externally adjacent pixels include: the external left adjacent pixel, the external right adjacent pixel, the external top adjacent pixel, the external bottom adjacent pixel, the external upper left adjacent pixel, the external lower left adjacent pixel, the external upper right adjacent pixel, and the external lower right adjacent pixel. The externally adjacent pixels refer to pixels located outside the aggregated ascending sub-block and adjacent to the ascending edge pixel.

[0052] Identify the aggregated ascending edge grayscale value of the ascending edge pixel and the ascending external adjacent grayscale value of the ascending external adjacent pixel, wherein the aggregated ascending edge grayscale value refers to the grayscale value of the ascending edge pixel, and the ascending external adjacent grayscale value refers to the grayscale value of the ascending external adjacent pixel.

[0053] Determine whether the grayscale value of the adjacent outer part of the ascending order is greater than the grayscale value of the aggregated ascending edge;

[0054] If the gray value of the adjacent pixel outside the ascending order is greater than the gray value of the aggregated ascending edge, then the adjacent pixel outside the ascending order is taken as the target aggregated pixel.

[0055] If the gray value of the adjacent pixels outside the ascending order is not greater than the gray value of the aggregated ascending edge, then it is determined whether all the adjacent pixels outside the ascending order of the ascending edge pixel have been identified.

[0056] If not all of the ascending external neighboring pixels of the ascending edge pixel have been identified, then return to the above steps of sequentially identifying the ascending external neighboring pixels of the ascending edge pixel;

[0057] If all the adjacent pixels outside the ascending edge pixel have been identified, then it is determined whether all the ascending edge pixels have been extracted.

[0058] If not all of the ascending edge pixels have been extracted, return to the steps described above for sequentially extracting ascending edge pixels from the set of ascending edge pixels.

[0059] If all the ascending edge pixels have been extracted, then all target aggregated pixels are gathered to obtain the target aggregated pixel set;

[0060] The initial ascending pixel set is aggregated with the target aggregated pixel set to obtain an iterative ascending pixel set;

[0061] The initial ascending pixel set is updated using the iterative ascending pixel set, and the steps described above for identifying the ascending edge pixel set of the initial ascending pixel set are returned.

[0062] If the ascending edge pixel set does not contain any external pixels to be aggregated, then the iterative aggregation of the initial ascending pixel set is terminated, and the ascending pixel set is obtained.

[0063] Optionally, the step of segmenting the target defect region into descending and ascending pixel blocks of the defect edge pixel set based on the descending and ascending pixel sets respectively, to obtain the iterative defect region, includes:

[0064] A descending pixel block is determined based on the descending pixel set and an ascending pixel block is determined based on the ascending pixel set, wherein the descending pixel block refers to a pixel block composed of a descending pixel set and the ascending pixel block refers to a pixel block composed of an ascending pixel set.

[0065] The iterative defect region is obtained by segmenting the descending pixel block and the ascending pixel block from the target defect region.

[0066] Optionally, the step of identifying block segmentation patterns based on descending and ascending pixel blocks includes:

[0067] Identify the pixel grid composed of pixels in the grayscale image of the component, wherein the unit grid in the pixel grid is square, and each grid point in the pixel grid corresponds to one pixel;

[0068] Identify the center point of each cell in the pixel grid to obtain the set of cell center points;

[0069] Identify the segmentation routes of the descending and ascending pixel blocks;

[0070] Identify the sequence of segmentation center points located on the segmentation block route within the grid center point set;

[0071] Segmentation center points are extracted sequentially from the segmentation center point sequence, and the segmentation unit grid corresponding to the segmentation center point is identified.

[0072] Identify the set of segmented pixels on the segmentation unit grid, wherein the number of segmented pixels in the set of segmented pixels is 4;

[0073] Identify the grayscale value set of the segmented pixels corresponding to the set of segmented pixels, and calculate the average grayscale value of the segmented center point based on the grayscale value set of the segmented pixels. The average grayscale value of the segmented center point refers to the average value of the grayscale value set of the segmented pixels.

[0074] The segmented neighborhood region is defined based on the preset neighborhood radius and the segmentation center point;

[0075] Identify the pixels within the segmented neighborhood region and the grayscale values ​​of the pixels within the neighborhood region;

[0076] Based on the pixel grayscale values ​​within the domain and the average grayscale value at the segmentation center, the local binary pattern value of the segmentation center point is calculated using a pre-constructed local binary pattern formula, wherein the local binary pattern formula is as follows:

[0077] ;

[0078] in, This represents the local binary pattern value of the c-th segmentation center point. This indicates the number of pixels within the domain. Represents the neighborhood radius. This represents the grayscale value of the p-th pixel within the domain. This represents the average gray value of the segmentation center at the c-th segmentation center point. A sign function representing the c-th segmentation center point and the p-th pixel within the domain;

[0079] The pixel grayscale value of the segmentation center point is assigned according to the local binary mode value to obtain the block segmentation texture.

[0080] To achieve the above objectives, the present invention also provides an intelligent recycling system for waste mechanical parts based on AI vision, comprising:

[0081] The adjacent pixel set recognition module is used to acquire grayscale images of waste mechanical parts; identify the defect edge pixel set of the target defect area in the grayscale image of the parts; and identify the adjacent pixel set of the defect edge pixel set.

[0082] The same-order pixel set recognition module is used to sequentially extract adjacent pixels from the adjacent pixel set, and identify the gray values ​​of adjacent pixels and the edge pixels of defect edge pixels. The gray values ​​of adjacent pixels refer to the gray values ​​of adjacent pixels, and the gray values ​​of edge pixels refer to the gray values ​​of defect edge pixels. Based on the gray values ​​of adjacent pixels and edge pixels, the same-order pixel set of defect edge pixels is identified in the target defect region. The same-order pixel set includes a descending pixel set and an ascending pixel set. The descending pixel set refers to the set of consecutive pixels whose gray values ​​decrease as the distance to defect edge pixels increases, and the ascending pixel set refers to the set of consecutive pixels whose gray values ​​increase as the distance to defect edge pixels increases.

[0083] The block segmentation module is used to segment the target defect region into descending and ascending pixel blocks of the defect edge pixel set according to the descending and ascending pixel sets, respectively, to obtain the iterative defect region; determine whether the adjacent pixels have been extracted; if the adjacent pixels have not been extracted, return to the above steps of extracting adjacent pixels sequentially in the adjacent pixel set; if the adjacent pixels have been extracted, determine whether the target defect region has completed the preset block segmentation; if the target defect region has not completed the block segmentation, update the target defect region using the iterative defect region, and return to the above steps of identifying the defect edge pixel set of the target defect region in the grayscale image of the component.

[0084] The classification and recycling module is used to identify the block segmentation texture based on the descending and ascending pixel blocks if the target defect area has been segmented. Based on the block segmentation texture, descending and ascending pixel blocks, the module uses pre-built AI vision technology to classify and recycle waste mechanical parts.

[0085] To address the above problems, the present invention also provides an electronic device, the electronic device comprising:

[0086] A memory for storing at least one instruction; and a processor for executing the instructions stored in the memory to implement the AI ​​vision-based intelligent recycling method for waste mechanical parts described above.

[0087] To address the aforementioned issues, the present invention also provides a computer-readable storage medium storing at least one instruction, which is executed by a processor in an electronic device to implement the aforementioned AI vision-based intelligent recycling method for waste mechanical parts.

[0088] To address the problems described in the background, this invention first utilizes the defect edge pixel set of the target defect region of discarded mechanical parts to identify and segment sequential pixel sets, thereby achieving the classification and recycling of discarded mechanical parts based on descending and ascending pixel blocks using AI vision technology. Specifically, it first identifies the defect edge pixel set of the target defect region. Then, it sequentially extracts defect edge pixels from the defect edge pixel set and identifies the adjacent pixel sets of the defect edge pixels. At this point, targeted analysis can be performed on each adjacent pixel in the defect edge pixel set and the adjacent pixel set. Specifically, it first sequentially extracts adjacent pixels from the adjacent pixel set. Since this embodiment of the invention identifies sequential pixel sets based on pixel grayscale values, it is necessary to identify the grayscale values ​​of adjacent pixels and the edge pixels of defect edge pixels. Then, based on the grayscale values ​​of adjacent pixels and edge pixels, it identifies the sequential pixel set of defect edge pixels in the target defect region. After obtaining the sequential pixel set, it can be used to... The descending and ascending pixel sets are used to segment the target defect region into descending and ascending pixel blocks of the defect edge pixel set, respectively, to obtain the iterative defect region. At this point, it is necessary to segment other adjacent pixels. Therefore, it is necessary to first determine whether the adjacent pixels have been extracted. If the adjacent pixels have not been extracted, the step of extracting adjacent pixels sequentially in the adjacent pixel set is returned. If the adjacent pixels have been extracted, it is determined whether the target defect region has been segmented into blocks. If the target defect region has not been segmented into blocks, it means that the target defect region has not yet completed the segmentation of all descending and ascending pixel blocks. Therefore, the target defect region can be updated using the iterative defect region, and the step of identifying the defect edge pixel set of the target defect region can be returned. This process is repeated iteratively until the target defect region is segmented into blocks. Then, the segmentation texture is identified based on the descending and ascending pixel blocks. Finally, based on the segmentation texture, descending and ascending pixel blocks, the pre-built AI vision technology is used to classify and recycle waste mechanical parts. Therefore, this invention can improve the efficiency of sorting and recycling waste mechanical parts. Attached Figure Description

[0089] Figure 1 This is a flowchart illustrating an AI vision-based intelligent recycling method for waste mechanical parts according to an embodiment of the present invention.

[0090] Figure 2 A functional module diagram of an AI vision-based intelligent recycling system for waste mechanical parts provided in an embodiment of the present invention;

[0091] Figure 3This is a schematic diagram of the structure of an electronic device that implements the AI ​​vision-based intelligent recycling method for waste mechanical parts, according to an embodiment of the present invention.

[0092] Explanation of reference numerals in the attached figures:

[0093] 10. Electronic device; 11. Processor; 12. Memory; 13. Bus.

[0094] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0095] It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.

[0096] This application provides an AI vision-based intelligent recycling method for waste mechanical parts. The executing entity of this AI vision-based intelligent recycling method includes, but is not limited to, at least one of the following electronic devices that can be configured to execute the method provided in this application: a server, a terminal, etc. In other words, the AI ​​vision-based intelligent recycling method for waste mechanical parts can be executed by software or hardware installed on a terminal device or a server device, and the software can be a blockchain platform. The server includes, but is not limited to, a single server, a server cluster, a cloud server, or a cloud server cluster.

[0097] Reference Figure 1 The diagram shown is a flowchart illustrating an AI vision-based intelligent recycling method for waste mechanical parts according to an embodiment of the present invention. In this embodiment, the AI ​​vision-based intelligent recycling method for waste mechanical parts includes:

[0098] S1. Obtain grayscale images of discarded mechanical parts.

[0099] Understandably, the term "scrap mechanical parts" refers to mechanical parts that require recycling, such as gears, bearings, connecting rods, frames, molds, drill bits, milling cutters, etc. The term "part grayscale image" refers to a grayscale image of the scrap mechanical parts containing the defective areas, obtained by photographing these areas, as detailed in the following embodiments.

[0100] Obtain grayscale images of discarded mechanical parts, including:

[0101] Pre-constructed standard mechanical parts are clamped and fixed to obtain positioning mechanical parts;

[0102] A positioning spherical coordinate system is constructed based on the positioning mechanical components, wherein the center point of the positioning mechanical components is the origin of the spherical coordinate system;

[0103] Based on the positioning sphere coordinate system, the shooting positioning latitude and longitude lines are constructed using preset unit longitude, unit latitude, and unit radius;

[0104] Receive the target latitude and longitude intersection point selected by the user in the shooting positioning latitude and longitude line, and construct a spatial positioning shooting vector based on the target latitude and longitude intersection point and the spherical coordinate origin, wherein the spatial positioning shooting vector takes the target latitude and longitude intersection point as the vector origin and the spherical coordinate origin as the vector endpoint;

[0105] A three-dimensional positioning coordinate system is constructed based on the positioning mechanical parts, wherein the origin of the three-dimensional positioning coordinate system is the center of the positioning mechanical parts, the positive x-axis is the direction of the front view of the positioning mechanical parts, the positive y-axis is the direction of the side view of the positioning mechanical parts, and the positive z-axis is the direction of the top view of the positioning mechanical parts.

[0106] Based on the spatial positioning shooting vector and the three-dimensional positioning coordinate system, the relative shooting parameters corresponding to the intersection of the target latitude and longitude lines are calculated using a pre-constructed shooting parameter formula to obtain a set of relative shooting parameters. The relative shooting parameters include relative shooting distance and relative shooting azimuth. The shooting parameter formula is shown below:

[0107] ;

[0108] in, This represents the angle between the spatial positioning and shooting vector and the x-axis of the three-dimensional positioning coordinate system. This represents the angle between the spatial positioning and shooting vector and the y-axis of the three-dimensional positioning coordinate system. This represents the angle between the spatial positioning and shooting vector and the z-axis of the three-dimensional positioning coordinate system. Indicates relative shooting distance. Represents the unit radius. Indicates the modulus length symbol. Represents the spatial positioning and imaging vector. This represents the vector components of the spatial positioning and imaging vector along the x-axis. This represents the vector component of the spatial positioning and shooting vector on the y-axis. This represents the vector component of the spatial positioning and shooting vector on the z-axis, and cos represents the cosine sign.

[0109] A positioning camera is obtained by taking pictures and fixing them in place using a pre-built high-resolution camera;

[0110] The relative shooting parameters are extracted sequentially from the set of relative shooting parameters. The position angle of the waste mechanical parts is adjusted according to the positioning camera and the relative shooting parameters to obtain the mechanical parts to be tested. The position angle adjustment includes position adjustment and angle adjustment.

[0111] The positioning camera is used to photograph the mechanical parts under test, and an image set of the parts under test is obtained;

[0112] The defect image set of the component to be tested is filtered to obtain a defective component image set;

[0113] Each defective component image in the defective component image set is converted to grayscale to obtain a component grayscale image.

[0114] Understandably, the standard mechanical parts refer to qualified mechanical parts without defects. The positioning mechanical parts refer to standard mechanical parts that remain stationary in a fixed position within three-dimensional space. The positioning spherical coordinate system refers to a spherical coordinate system constructed based on the positioning mechanical parts, and the origin of the spherical coordinate system refers to the origin of the positioning spherical coordinate system. The center point of the positioning mechanical parts refers to the three-dimensional center point of the positioning mechanical parts, and its specific location can be set by the user.

[0115] Specifically, the unit longitude refers to a preset minimum unit longitude, which can be 10 degrees; the unit latitude refers to a preset minimum unit latitude, which can be 5 degrees; and the unit radius is set by the user based on the optimal shooting distance of the high-resolution camera and the size of the scrap mechanical parts, for example, 0.5m. The shooting positioning latitude and longitude lines refer to the intersection lines of longitude and latitude constructed in the positioning spherical coordinate system based on the unit longitude, unit latitude, and unit radius. The degree values ​​of the longitude lines in the shooting positioning latitude and longitude lines range from [missing value]. The range of latitude values ​​is: .

[0116] Furthermore, the target intersection of latitude and longitude lines refers to the intersection of latitude and longitude lines used to set the shooting distance and shooting orientation between the high-resolution camera and the positioning mechanical components. Since the intersection points of meridians and parallels in the shooting positioning latitude and longitude lines are not evenly distributed, in order to achieve approximately uniform selection of meridian and parallel intersection points in the shooting positioning latitude and longitude lines, the user needs to select a suitable target intersection of latitude and longitude lines.

[0117] For example, the interval latitude of the selected latitude can be... The longitude intervals selected can vary according to the latitude degrees, for example: in According to latitude The interval longitude is selected at the intersection of the target latitude and longitude lines. or According to latitude The interval longitude is selected at the intersection of the target latitude and longitude lines. or According to latitude The longitude interval is selected from the intersection of the target latitude and longitude lines. or On the latitude line, the two poles can be directly selected as the intersection points of the target latitude and longitude lines.

[0118] Specifically, the spatial positioning and shooting vector refers to the vector that determines the shooting distance and shooting orientation between the high-resolution camera and the positioning mechanical component. The three-dimensional positioning coordinate system refers to a three-dimensional coordinate system constructed based on the center of the positioning mechanical component to represent its spatial orientation. The front view direction refers to the opposite direction of the line of sight when obtaining the front view, the side view direction refers to the opposite direction of the line of sight when obtaining the side view, and the top view direction refers to the opposite direction of the line of sight when obtaining the top view.

[0119] Understandably, the relative shooting parameters refer to the shooting distance and orientation parameters between the high-resolution camera and the positioning mechanical components. The relative shooting parameter set refers to the set of relative shooting parameters for the intersections of the latitude and longitude lines of each target. The relative shooting distance refers to the relative distance between the high-resolution camera and the positioning mechanical components, and the relative shooting orientation refers to the relative orientation between the high-resolution camera and the positioning mechanical components. The shooting fixation refers to fixing the shooting position and shooting angle of the high-resolution camera at a preset camera shooting position, and the positioning camera refers to the high-resolution camera with its shooting position and shooting angle fixed.

[0120] It should be understood that the aforementioned azimuth adjustment refers to adjusting the spatial position and angle of the scrap mechanical parts, and the mechanical parts to be tested refer to the scrap mechanical parts that have undergone azimuth adjustment. The image set of the parts to be tested refers to the set of images obtained after taking pictures of the mechanical parts to be tested using a positioning camera. The image set of defective parts refers to images of the parts to be tested that have defects. The grayscale image of the parts refers to the grayscale image of the defective parts.

[0121] Further, the step of adjusting the azimuth angle of the discarded mechanical parts according to the positioning camera and relative shooting parameters to obtain the mechanical parts to be tested includes:

[0122] The shooting orientation of the waste mechanical parts is adjusted according to the relative shooting orientation in the relative shooting parameters of the positioning camera to obtain the target mechanical parts, wherein the target mechanical parts and the shooting orientation of the positioning camera are relative shooting orientations.

[0123] The shooting distance of the waste mechanical parts is adjusted according to the relative shooting distance in the relative shooting parameters of the positioning camera to obtain the mechanical parts to be tested. The shooting orientation of the mechanical parts to be tested and the positioning camera are relative shooting orientations and shooting distances.

[0124] In detail, the target mechanical component refers to a discarded mechanical component whose shooting orientation is relative to that of the positioning camera. During the process of adjusting the shooting orientation, it is also necessary to construct a three-dimensional coordinate system based on the discarded mechanical component. The construction process of the three-dimensional coordinate system is the same as the construction process of the three-dimensional positioning coordinate system corresponding to the positioning mechanical component, and will not be repeated here, because the shooting distance and shooting orientation of the discarded mechanical component need to be adjusted, and the position of the three-dimensional coordinate system is not fixed.

[0125] Further, the defect image filtering of the image set of the parts to be tested to obtain a defective parts image set includes:

[0126] The positioning camera is used to photograph the positioning mechanical parts to obtain a standard parts image set;

[0127] The defective component image set is obtained by comparing the standard component image set with the component image set under test.

[0128] Understandably, the standard component images refer to the set of component images obtained by taking pictures of the positioning mechanical components using a positioning camera. The component defect comparison refers to comparing the standard component images with the component images to be tested using the same relative shooting parameters. When there are differences, the difference area corresponding to the component image to be tested has a defect.

[0129] S2. Identify the set of defect edge pixels in the grayscale image of the component, and identify the set of adjacent pixels of the defect edge pixels in the set of defect edge pixels.

[0130] Understandably, the target defect region refers to the image region in the grayscale image of a scrap mechanical part where a defect exists. The defect edge pixel set refers to the set of pixels located at the edge of the target defect region. The defect edge pixel refers to the pixel located at the edge of the target defect region. The adjacent pixel set refers to the set of pixels adjacent to the defect edge pixel.

[0131] In this embodiment of the invention, the set of neighboring pixels of the defective edge pixel includes:

[0132] The adjacent pixel sites of the defect edge pixel are identified sequentially, wherein the adjacent pixel sites include: left adjacent pixel site, right adjacent pixel site, top adjacent pixel site, bottom adjacent pixel site, top left adjacent pixel site, bottom left adjacent pixel site, top right adjacent pixel site, and bottom right adjacent pixel site;

[0133] Determine whether there is a pixel at the adjacent pixel location;

[0134] If no pixel exists at the adjacent pixel location, return to the steps described above for sequentially identifying the adjacent pixel locations of the defective edge pixel.

[0135] If there is a pixel at the adjacent pixel location, then the pixel at the adjacent pixel location is identified, and the pixel at the adjacent pixel location is taken as the adjacent pixel to obtain the adjacent pixel set.

[0136] Understandably, the left adjacent pixel refers to the adjacent pixel to the left of the defect edge pixel, the right adjacent pixel refers to the adjacent pixel to the right of the defect edge pixel, the upper adjacent pixel refers to the adjacent pixel above the defect edge pixel, the lower adjacent pixel refers to the adjacent pixel below the defect edge pixel, the upper left adjacent pixel refers to the adjacent pixel to the upper left of the defect edge pixel, the lower left adjacent pixel refers to the adjacent pixel to the lower left of the defect edge pixel, the upper right adjacent pixel refers to the adjacent pixel to the upper right of the defect edge pixel, and the lower right adjacent pixel refers to the adjacent pixel to the lower right of the defect edge pixel.

[0137] Specifically, the adjacent pixel location refers to the pixel location adjacent to the defect edge pixel. Since the defect edge pixel is located at the edge of the target defect region, the defect edge pixel may not have adjacent pixels in a certain direction. For example, when the target defect region is square and the defect edge pixel is located at the left vertical edge of the region, there will be no adjacent pixels to the upper left, left, and lower left of the defect edge pixel.

[0138] S3. Sequentially extract adjacent pixels from the adjacent pixel set, and identify the gray values ​​of adjacent pixels and the edge pixels of defective edge pixels.

[0139] Specifically, the adjacent pixel grayscale value refers to the grayscale value of adjacent pixels, and the edge pixel grayscale value refers to the grayscale value of defect edge pixels.

[0140] S4. Identify the set of sequential pixels of the defect edge pixels in the target defect area based on the gray values ​​of adjacent pixels and edge pixels.

[0141] Explained, the set of sequential pixels refers to the set of pixels that are in the same grayscale value transformation direction as the pixel on the defect edge. The grayscale value transformation direction includes the direction of increasing grayscale value and the direction of decreasing grayscale value.

[0142] In detail, the set of pixels in the same order includes a set of pixels in descending order and a set of pixels in ascending order. The set of pixels in descending order refers to a set of consecutive pixels whose gray values ​​decrease as the distance between them and the defect edge pixels increases. The set of pixels in ascending order refers to a set of consecutive pixels whose gray values ​​increase as the distance between them and the defect edge pixels increases.

[0143] For example, when the target defect area is a 3*3 square area, the positions and gray values ​​of each pixel in the target defect area are (1, 1, 50), (1, 2, 55), (1, 3, 57), (2, 1, 48), (2, 2, 52), (2, 3, 53), (3, 1, 56), (3, 2, 51), and (3, 3, 55), respectively. Here, (1, 1, 50) indicates that the gray value of the pixel at pixel point (1, 1) is 50. At this time, the pixel position and gray value (2, 1, 48) are... 8) The ascending set of the corresponding defect edge pixels is (1, 1, 50), (1, 2, 55), (2, 2, 52), (3, 1, 56), and (3, 2, 51), and there is no descending set of pixels at pixel position (1, 1); the ascending set of the defect edge pixels corresponding to pixel position and gray value (1, 1, 50) is (1, 2, 55), (2, 2, 52), and the descending set of pixels is (2, 1, 48), and so on.

[0144] In this embodiment of the invention, the step of identifying the set of sequential pixels representing defect edge pixels in the target defect region based on the grayscale values ​​of adjacent pixels and edge pixels includes:

[0145] Determine whether the grayscale value of the adjacent pixel is greater than the grayscale value of the edge pixel;

[0146] If the gray value of the adjacent pixel is greater than the gray value of the edge pixel, then the defect edge pixel is aggregated with the adjacent pixel to obtain an initial ascending pixel set;

[0147] Identify the ascending edge pixel set of the initial ascending pixel set;

[0148] The ascending edge pixel set is iteratively aggregated within the target defect region to obtain the ascending pixel set;

[0149] If the gray value of the adjacent pixel is not greater than the gray value of the edge pixel, then the defect edge pixel is aggregated with the adjacent pixel to obtain an initial descending pixel set;

[0150] Identify the descending edge pixel set of the initial descending pixel set;

[0151] The descending edge pixel set is iteratively aggregated within the target defect region to obtain the descending pixel set.

[0152] It should be understood that the aggregation refers to merging the defect edge pixels with adjacent pixels into the same image region. The initial ascending pixel set refers to the set of ascending pixels of the defect edge pixels before iterative aggregation. The iterative aggregation refers to cyclically aggregating pixels in the target defect region that are in the same direction of grayscale value change as the defect edge pixels. See the following embodiments for details.

[0153] Specifically, the ascending edge pixel set refers to the set of edge pixels in the image region corresponding to the initial ascending pixel set. Similarly, the descending pixel set and the ascending pixel set use the same aggregation logic during iterative aggregation. The initial descending pixel set refers to the set of descending pixels before iterative aggregation of the defective edge pixels. The descending edge pixel set refers to the set of edge pixels in the image region corresponding to the initial descending pixel set.

[0154] In this embodiment of the invention, identifying the ascending edge pixel set of the initial ascending pixel set includes:

[0155] The aggregated ascending sub-blocks are determined based on the initial ascending pixel set;

[0156] Identify the ascending edge pixel set of the aggregated ascending sub-block, wherein the ascending edge pixel set refers to the set of edge pixels of the aggregated ascending sub-block, and the edge pixels of the aggregated ascending sub-block refer to the pixels located at the block edge of the aggregated ascending sub-block.

[0157] Understandably, the aggregated ascending sub-block refers to the image block corresponding to the initial ascending pixels before iterative aggregation of the initial ascending pixel set.

[0158] In this embodiment of the invention, the step of iteratively aggregating the ascending edge pixel set within the target defect region to obtain the ascending pixel set includes:

[0159] Determine whether the ascending edge pixel set contains any preset external pixels to be aggregated;

[0160] If there are external pixels to be aggregated in the ascending edge pixel set, then the ascending edge pixels are extracted sequentially from the ascending edge pixel set.

[0161] The ascending edge pixel is sequentially identified as an externally adjacent pixel, wherein the externally adjacent pixels include: the external left adjacent pixel, the external right adjacent pixel, the external top adjacent pixel, the external bottom adjacent pixel, the external upper left adjacent pixel, the external lower left adjacent pixel, the external upper right adjacent pixel, and the external lower right adjacent pixel. The externally adjacent pixels refer to pixels located outside the aggregated ascending sub-block and adjacent to the ascending edge pixel.

[0162] Identify the aggregated ascending edge grayscale value of the ascending edge pixel and the ascending external adjacent grayscale value of the ascending external adjacent pixel, wherein the aggregated ascending edge grayscale value refers to the grayscale value of the ascending edge pixel, and the ascending external adjacent grayscale value refers to the grayscale value of the ascending external adjacent pixel.

[0163] Determine whether the grayscale value of the adjacent outer part of the ascending order is greater than the grayscale value of the aggregated ascending edge;

[0164] If the gray value of the adjacent pixel outside the ascending order is greater than the gray value of the aggregated ascending edge, then the adjacent pixel outside the ascending order is taken as the target aggregated pixel.

[0165] If the gray value of the adjacent pixels outside the ascending order is not greater than the gray value of the aggregated ascending edge, then it is determined whether all the adjacent pixels outside the ascending order of the ascending edge pixel have been identified.

[0166] If not all of the ascending external neighboring pixels of the ascending edge pixel have been identified, then return to the above steps of sequentially identifying the ascending external neighboring pixels of the ascending edge pixel;

[0167] If all the adjacent pixels outside the ascending edge pixel have been identified, then it is determined whether all the ascending edge pixels have been extracted.

[0168] If not all of the ascending edge pixels have been extracted, return to the steps described above for sequentially extracting ascending edge pixels from the set of ascending edge pixels.

[0169] If all the ascending edge pixels have been extracted, then all target aggregated pixels are gathered to obtain the target aggregated pixel set;

[0170] The initial ascending pixel set is aggregated with the target aggregated pixel set to obtain an iterative ascending pixel set;

[0171] The initial ascending pixel set is updated using the iterative ascending pixel set, and the steps described above for identifying the ascending edge pixel set of the initial ascending pixel set are returned.

[0172] If the ascending edge pixel set does not contain any external pixels to be aggregated, then the iterative aggregation of the initial ascending pixel set is terminated, and the ascending pixel set is obtained.

[0173] Understandably, the external pixels to be aggregated refer to pixels that, after block segmentation, belong to the target defect region and are located outside the ascending edge pixel set. Block segmentation refers to the process of separating the descending and ascending pixel sets from the target defect region after iterative aggregation of the descending and ascending pixel sets.

[0174] In detail, the ascending outer adjacent pixels refer to the pixels among the outer pixels to be aggregated that are adjacent to the ascending edge pixels. The outer left adjacent pixel refers to the pixel in the outer pixels to be aggregated that is left-adjacent to the ascending edge pixel. The outer right adjacent pixel refers to the pixel in the outer pixels to be aggregated that is right-adjacent to the ascending edge pixel. The outer upper adjacent pixel refers to the pixel in the outer pixels to be aggregated that is upper-adjacent to the ascending edge pixel. The outer lower adjacent pixel refers to the pixel in the outer pixels to be aggregated that is lower-adjacent to the ascending edge pixel. The outer upper left adjacent pixel refers to the pixel in the outer pixels to be aggregated that is upper-left adjacent to the ascending edge pixel. The outer lower left adjacent pixel refers to the pixel in the outer pixels to be aggregated that is lower-left adjacent to the ascending edge pixel. The outer upper right adjacent pixel refers to the pixel in the outer pixels to be aggregated that is upper-right adjacent to the ascending edge pixel. The outer lower right adjacent pixel refers to the pixel in the outer pixels to be aggregated that is lower-right adjacent to the ascending edge pixel.

[0175] Understandably, the target aggregated pixel refers to a pixel that can be aggregated with its adjacent pixels outside the ascending order. The iterative ascending pixel set refers to the set of ascending pixels obtained after completing one round of aggregation.

[0176] In detail, firstly, it is necessary to identify each of the ascending external neighboring pixels of the ascending edge pixel in turn. After the identification of all the ascending external neighboring pixels of the ascending edge pixel is completed, it is necessary to identify all the ascending external neighboring pixels of each of the remaining ascending edge pixels in turn according to the same identification logic, until there are no external pixels to be aggregated in the set of ascending edge pixels, thereby completing the iterative aggregation of the initial ascending pixel set and obtaining the ascending pixel set.

[0177] Similarly, the iterative aggregation process of the descending pixel set is logically consistent with that of the ascending pixel set. The only difference is that the iterative aggregation process of the descending pixel set requires aggregating pixels whose gray values ​​are not greater than the gray value of the edge pixel with the defect edge pixel, which will not be elaborated here.

[0178] S5. Based on the descending and ascending pixel sets, segment the target defect region into descending and ascending pixel blocks of the defect edge pixel set, respectively, to obtain the iterative defect region.

[0179] Understandably, the iterative defect region refers to the image region composed of pixels that have not been fully aggregated during the iterative aggregation process. Both the descending pixel block and the ascending pixel block are one or more.

[0180] In this embodiment of the invention, the step of segmenting the target defect region into descending and ascending pixel blocks of the defect edge pixel set based on the descending and ascending pixel sets respectively, to obtain the iterative defect region, includes:

[0181] A descending pixel block is determined based on the descending pixel set and an ascending pixel block is determined based on the ascending pixel set, wherein the descending pixel block refers to a pixel block composed of a descending pixel set and the ascending pixel block refers to a pixel block composed of an ascending pixel set.

[0182] The iterative defect region is obtained by segmenting the descending pixel block and the ascending pixel block from the target defect region.

[0183] Understandably, once the descending or ascending pixel block is obtained, it can be segmented from the target defect region to obtain the iterative curve region, and then the next round of iterative aggregation can be performed.

[0184] S6. Determine whether all adjacent pixels have been extracted.

[0185] Understandably, since it is necessary to iteratively aggregate all adjacent pixels of the defect edge pixel, it is necessary to determine whether the adjacent pixels have been extracted.

[0186] If all adjacent pixels have not been extracted, return to the steps described above for sequentially extracting adjacent pixels from the set of adjacent pixels.

[0187] If adjacent pixels have been extracted, then execute S7 to determine whether the target defect area has completed the preset block segmentation.

[0188] It should be understood that after the extraction of adjacent pixels, it is necessary to determine whether all pixels within the target defect region have completed iterative aggregation of descending and ascending pixel blocks, that is, whether the target defect region has completed the preset block segmentation. The block segmentation refers to dividing the target defect region into blocks based on descending and ascending pixel blocks.

[0189] If the target defect region has not been segmented into blocks, then execute S8 to update the target defect region using the iterative defect region.

[0190] In detail, when the target defect region has not been segmented into blocks, it is necessary to continue segmenting the target defect region into blocks based on the iterative defect region. Therefore, it is necessary to replace the target defect region with the iterative defect region and continue segmenting into blocks.

[0191] Return to the steps described above for identifying the defect edge pixel set of the target defect region in the grayscale image of the component.

[0192] If the target defect area is segmented into blocks, then execute S9 to identify the block segmentation texture based on the descending and ascending pixel blocks. Based on the block segmentation texture, descending and ascending pixel blocks, use pre-built AI vision technology to classify and recycle waste mechanical parts.

[0193] Understandably, the block segmentation texture refers to the average grayscale segmentation path between in-order pixel blocks, and the in-order pixel blocks refer to descending or ascending pixel blocks, as detailed in the following embodiments. The AI ​​vision technology is an image defect classification technology using convolutional neural networks.

[0194] Specifically, the step of identifying block segmentation patterns based on descending and ascending pixel blocks includes:

[0195] Identify the pixel grid composed of pixels in the grayscale image of the component, wherein the unit grid in the pixel grid is square, and each grid point in the pixel grid corresponds to one pixel;

[0196] Identify the center point of each cell in the pixel grid to obtain the set of cell center points;

[0197] Identify the segmentation routes of the descending and ascending pixel blocks;

[0198] Identify the sequence of segmentation center points located on the segmentation block route within the grid center point set;

[0199] Segmentation center points are extracted sequentially from the segmentation center point sequence, and the segmentation unit grid corresponding to the segmentation center point is identified.

[0200] Identify the set of segmented pixels on the segmentation unit grid, wherein the number of segmented pixels in the set of segmented pixels is 4;

[0201] Identify the grayscale value set of the segmented pixels corresponding to the set of segmented pixels, and calculate the average grayscale value of the segmented center point based on the grayscale value set of the segmented pixels. The average grayscale value of the segmented center point refers to the average value of the grayscale value set of the segmented pixels.

[0202] The segmented neighborhood region is defined based on the preset neighborhood radius and the segmentation center point;

[0203] Identify the pixels within the segmented neighborhood region and the grayscale values ​​of the pixels within the neighborhood region;

[0204] Based on the pixel grayscale values ​​within the domain and the average grayscale value at the segmentation center, the local binary pattern value of the segmentation center point is calculated using a pre-constructed local binary pattern formula, wherein the local binary pattern formula is as follows:

[0205] ;

[0206] in, This represents the local binary pattern value of the c-th segmentation center point. This indicates the number of pixels within the domain. Represents the neighborhood radius. This represents the grayscale value of the p-th pixel within the domain. This represents the average gray value of the segmentation center at the c-th segmentation center point. A sign function representing the c-th segmentation center point and the p-th pixel within the domain;

[0207] The pixel grayscale value of the segmentation center point is assigned according to the local binary mode value to obtain the block segmentation texture.

[0208] Specifically, the pixel grid refers to a grid formed by connecting pixels in the grayscale image of a component. The unit grid refers to the smallest constituent unit of the pixel grid. The grid center point refers to the center point of the unit grid. The set of grid center points refers to the collection of grid center points. The segmentation block route refers to the route for segmenting the sequential pixel blocks. The segmentation center point sequence refers to the sequence of grid center points distributed along the segmentation block route. The segmentation center point refers to the grid center points distributed along the segmentation block route. The segmentation unit grid refers to a unit grid whose center point is the segmentation center point. The segmentation pixel set refers to the four pixels on the segmentation unit grid. The segmentation pixel grayscale value set refers to the set of grayscale values ​​corresponding to each segmented pixel in the segmentation pixel set. The pixel grayscale assignment refers to calibrating the grayscale value of the segmentation center point using the average grayscale value of the segmentation center point.

[0209] Further, the neighborhood radius refers to the radius of the adjacent region defined by the segmentation center point, which can be 2 pixels, 4 pixels, 6 pixels, 8 pixels, etc. When the neighborhood radius is 2 pixels, the segmentation neighborhood is a 2*2 region centered on the segmentation center point; when the neighborhood radius is 4 pixels, the segmentation neighborhood is a 4*4 region centered on the segmentation center point, and so on. The segmentation neighborhood refers to a square region centered on the segmentation center point with a side length equal to the neighborhood radius. The pixels within the neighborhood refer to pixels located within the segmentation neighborhood region, the grayscale value of the pixels within the neighborhood refers to the grayscale value of the pixels within the neighborhood, and the local binary mode value refers to the numerical value representing the local texture features of the segmentation center point.

[0210] In this embodiment of the invention, the step of classifying and recycling waste mechanical parts using pre-built AI vision technology based on block segmentation textures, descending pixel blocks, and ascending pixel blocks includes:

[0211] The descending pixel blocks are input into the descending input nodes of a pre-trained convolutional neural network in AI vision technology, the ascending pixel blocks are input into the ascending input nodes of the convolutional neural network, and the block segmentation texture is input into the texture input nodes of the convolutional neural network to obtain the defect type level. The defect type level includes the defect type and the defect level of the defect type. The input layer of the convolutional neural network includes descending input nodes, ascending input nodes, and texture input nodes, and the output layer includes a defect type level output node set.

[0212] Waste mechanical parts are classified and recycled according to the defect type level.

[0213] Understandably, the descending input node refers to the input layer node in a convolutional neural network that inputs descending pixel blocks. The ascending input node refers to the input layer node in a convolutional neural network that inputs ascending pixel blocks. The texture input node refers to the input layer node that segments the texture of the input block. The defect type level refers to the defect type and defect level corresponding to the target defect area. For example, the defect type can be cracks, scratches, indentations, corrosion, etc., and the defect level can be minor cracks, moderate cracks, severe cracks, minor indentations, moderate indentations, severe indentations, etc. After classification, waste mechanical parts with the same defect type and the same defect level can be categorized and recycled.

[0214] Furthermore, the defect type level output node set refers to the set of defect level output nodes for each defect type, which may include crack defect level output nodes, scratch and abrasion defect level output nodes, indentation defect level output nodes, and corrosion defect level output nodes. When the crack defect level output node outputs a mild level, it indicates that there is a mild crack in the target defect area.

[0215] In this embodiment of the invention, before inputting the descending pixel block into the descending input node of the pre-trained convolutional neural network in AI vision technology, the method further includes:

[0216] Obtain a set of training defect regions, and extract training defect regions sequentially from the set of training defect regions.

[0217] The training defect region is segmented into blocks to obtain training ascending pixel blocks, training descending pixel blocks, and training block texture sets;

[0218] Identify the training defect type and training defect level of the training defect region, and train the pre-constructed initial convolutional neural network using training ascending pixel blocks, training descending pixel blocks, training block texture sets, training defect type, and training defect level to obtain a pre-trained convolutional neural network.

[0219] Understandably, the training defect region set refers to the set of defective image regions used for training the convolutional neural network, and each training defect region in the training defect region set has a clearly defined corresponding defect type level. The training ascending pixel block refers to the set of ascending pixel blocks obtained when segmenting the training defect region, and the training descending pixel block refers to the set of descending pixel blocks obtained when segmenting the training defect region. The training block texture set refers to the block segmentation texture used for training corresponding to the training descending pixel block or the training ascending pixel block, the training defect type refers to the defect type corresponding to the training defect region, and the training defect level refers to the defect level of the defect type corresponding to the training defect region.

[0220] To address the problems described in the background, this invention first utilizes the defect edge pixel set of the target defect region of discarded mechanical parts to identify and segment sequential pixel sets, thereby achieving the classification and recycling of discarded mechanical parts based on descending and ascending pixel blocks using AI vision technology. Specifically, it first identifies the defect edge pixel set of the target defect region. Then, it sequentially extracts defect edge pixels from the defect edge pixel set and identifies the adjacent pixel sets of the defect edge pixels. At this point, targeted analysis can be performed on each adjacent pixel in the defect edge pixel set and the adjacent pixel set. Specifically, it first sequentially extracts adjacent pixels from the adjacent pixel set. Since this embodiment of the invention identifies sequential pixel sets based on pixel grayscale values, it is necessary to identify the grayscale values ​​of adjacent pixels and the edge pixels of defect edge pixels. Then, based on the grayscale values ​​of adjacent pixels and edge pixels, it identifies the sequential pixel set of defect edge pixels in the target defect region. After obtaining the sequential pixel set, it can be used to... The descending and ascending pixel sets are used to segment the target defect region into descending and ascending pixel blocks of the defect edge pixel set, respectively, to obtain the iterative defect region. At this point, it is necessary to segment other adjacent pixels. Therefore, it is necessary to first determine whether the adjacent pixels have been extracted. If the adjacent pixels have not been extracted, the step of extracting adjacent pixels sequentially in the adjacent pixel set is returned. If the adjacent pixels have been extracted, it is determined whether the target defect region has been segmented into blocks. If the target defect region has not been segmented into blocks, it means that the target defect region has not yet completed the segmentation of all descending and ascending pixel blocks. Therefore, the target defect region can be updated using the iterative defect region, and the step of identifying the defect edge pixel set of the target defect region can be returned. This process is repeated iteratively until the target defect region is segmented into blocks. Then, the segmentation texture is identified based on the descending and ascending pixel blocks. Finally, based on the segmentation texture, descending and ascending pixel blocks, the pre-built AI vision technology is used to classify and recycle waste mechanical parts. Therefore, this invention can improve the efficiency of sorting and recycling waste mechanical parts.

[0221] like Figure 2 The diagram shown is a functional block diagram of an AI vision-based intelligent recycling system for waste mechanical parts provided in an embodiment of the present invention.

[0222] The AI ​​vision-based intelligent recycling system 100 for waste mechanical parts described in this invention can be installed in an electronic device. Depending on the functions implemented, the AI ​​vision-based intelligent recycling system 100 may include an adjacent pixel set recognition module 101, a sequential pixel set recognition module 102, a block segmentation module 103, and a sorting and recycling module 104. The module described in this invention can also be called a unit, which refers to a series of computer program segments that can be executed by the processor of an electronic device and can perform a fixed function, and is stored in the memory of the electronic device.

[0223] The adjacent pixel set recognition module 101 is used to acquire grayscale images of waste mechanical parts; identify the defect edge pixel set of the target defect area in the grayscale image of the parts; and identify the adjacent pixel set of the defect edge pixel set.

[0224] The same-order pixel set recognition module 102 is used to sequentially extract adjacent pixels from the adjacent pixel set, and recognize the gray values ​​of adjacent pixels and the edge pixels of defect edge pixels. The gray values ​​of adjacent pixels refer to the gray values ​​of adjacent pixels, and the gray values ​​of edge pixels refer to the gray values ​​of defect edge pixels. Based on the gray values ​​of adjacent pixels and edge pixels, the same-order pixel set of defect edge pixels is recognized in the target defect region. The same-order pixel set includes a descending pixel set and an ascending pixel set. The descending pixel set refers to the set of consecutive pixels whose gray values ​​decrease as the distance to defect edge pixels increases, and the ascending pixel set refers to the set of consecutive pixels whose gray values ​​increase as the distance to defect edge pixels increases.

[0225] The block segmentation module 103 is used to segment the target defect region into descending pixel blocks and ascending pixel blocks of the defect edge pixel set according to the descending pixel set and ascending pixel set, respectively, to obtain the iterative defect region; determine whether the adjacent pixels have been extracted; if the adjacent pixels have not been extracted, return to the above steps of extracting adjacent pixels sequentially in the adjacent pixel set; if the adjacent pixels have been extracted, determine whether the target defect region has completed the preset block segmentation; if the target defect region has not completed the block segmentation, update the target defect region using the iterative defect region, and return to the above steps of identifying the defect edge pixel set of the target defect region in the grayscale image of the component.

[0226] The classification and recycling module 104 is used to identify the block segmentation texture based on the descending and ascending pixel blocks if the target defect area is segmented into blocks, and to classify and recycle the waste mechanical parts using pre-built AI vision technology based on the block segmentation texture, descending and ascending pixel blocks.

[0227] In detail, the modules in the AI ​​vision-based intelligent recycling system 100 for waste mechanical parts described in this embodiment of the invention employ the same methods as described above during use. Figure 1 The method used here is the same as the AI ​​vision-based intelligent recycling method for waste mechanical parts described above, and it can produce the same technical effect, so it will not be repeated here.

[0228] like Figure 3 The diagram shown is a structural schematic of an electronic device for implementing an AI vision-based intelligent recycling method for waste mechanical parts, according to an embodiment of the present invention.

[0229] The electronic device 1 may include a processor 10, a memory 11 and a bus 12, and may also include a computer program stored in the memory 11 and capable of running on the processor 10, such as an AI vision-based intelligent recycling method program for waste mechanical parts.

[0230] The memory 11 includes at least one type of readable storage medium, such as flash memory, portable hard drive, multimedia card, card-type memory (e.g., SD or DX memory), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 11 can be an internal storage unit of the electronic device 1, such as the portable hard drive of the electronic device 1. In other embodiments, the memory 11 can be an external storage device of the electronic device 1, such as a plug-in portable hard drive, smart media card (SMC), secure digital card (SD), flash card, etc., equipped on the electronic device 1. Furthermore, the memory 11 includes both internal storage units and external storage devices of the electronic device 1. The memory 11 can be used not only to store application software and various types of data installed on the electronic device 1, such as the code of a method for intelligent recycling of waste mechanical parts based on AI vision, but also to temporarily store data that has been output or will be output.

[0231] In some embodiments, the processor 10 may be composed of integrated circuits, such as a single packaged integrated circuit or multiple integrated circuits with the same or different functions, including combinations of one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and various control chips. The processor 10 is the control unit of the electronic device, connecting various components of the entire electronic device through various interfaces and lines. It executes programs or modules stored in the memory 11 (e.g., a method for intelligent recycling of waste mechanical parts based on AI vision) and calls data stored in the memory 11 to perform various functions of the electronic device 1 and process data.

[0232] The bus 12 can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus 12 can be divided into an address bus, a data bus, a control bus, etc. The bus 12 is configured to realize the connection and communication between the memory 11 and at least one processor 10, etc.

[0233] Figure 3 Only electronic devices with components are shown; it will be understood by those skilled in the art that... Figure 3 The structure shown does not constitute a limitation on the electronic device 1, and may include fewer or more components than shown, or combine certain components, or have different component arrangements.

[0234] For example, although not shown, the electronic device 1 may also include a power supply (such as a battery) to power the various components. Preferably, the power supply can be logically connected to the at least one processor 10 through a power management device, thereby enabling functions such as charging management, discharging management, and power consumption management. The power supply may also include one or more DC or AC power supplies, recharging devices, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components. The electronic device 1 may also include various sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be described in detail here.

[0235] Furthermore, the electronic device 1 may also include a network interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a Wi-Fi interface, a Bluetooth interface, etc.), which is typically used to establish communication connections between the electronic device 1 and other electronic devices.

[0236] Optionally, the electronic device 1 may further include a user interface, which may be a display, an input unit (such as a keyboard), and optionally, a standard wired interface or a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, or an OLED (Organic Light-Emitting Diode) touchscreen, etc. The display may also be appropriately referred to as a screen or display unit, used to display information processed in the electronic device 1 and to display a visual user interface.

[0237] The program for intelligent recycling of waste mechanical parts based on AI vision, stored in the memory 11 of the electronic device 1, is a combination of multiple instructions. When run in the processor 10, it can achieve the following:

[0238] Obtain grayscale images of discarded mechanical parts;

[0239] In the grayscale image of the component, identify the set of defect edge pixels of the target defect region, and identify the set of adjacent pixels of the defect edge pixels in the set of defect edge pixels;

[0240] In the adjacent pixel set, adjacent pixels are extracted sequentially, and the gray values ​​of adjacent pixels and edge pixels of defect edge pixels are identified. The gray value of adjacent pixels refers to the gray value of adjacent pixels, and the gray value of edge pixels refers to the gray value of defect edge pixels.

[0241] Based on the gray values ​​of adjacent pixels and edge pixels, the same set of pixels at the edge of the defect is identified in the target defect area. The same set of pixels includes a descending set of pixels and an ascending set of pixels. The descending set of pixels refers to the set of consecutive pixels whose gray values ​​decrease as the distance between the defect edge pixels increases, and the ascending set of pixels refers to the set of consecutive pixels whose gray values ​​increase as the distance between the defect edge pixels increases.

[0242] Based on the descending and ascending pixel sets, the target defect region is segmented into descending and ascending pixel blocks of the defect edge pixel set, respectively, to obtain the iterative defect region;

[0243] Determine whether all adjacent pixels have been extracted;

[0244] If all adjacent pixels have not been extracted, return to the steps described above for sequentially extracting adjacent pixels from the set of adjacent pixels.

[0245] If adjacent pixels have been extracted, determine whether the target defect area has been divided into preset blocks.

[0246] If the target defect region is not segmented into blocks, the target defect region is updated using the iterative defect region, and the process returns to the steps described above for identifying the defect edge pixel set of the target defect region in the grayscale image of the component.

[0247] If the target defect area is segmented into blocks, the segmentation texture is identified based on the descending and ascending pixel blocks. Based on the segmentation texture, descending and ascending pixel blocks, pre-built AI vision technology is used to classify and recycle waste mechanical parts.

[0248] Specifically, the processor 10's implementation method for the above instructions can be found in [reference needed]. Figures 1 to 3 The descriptions of the relevant steps in the corresponding embodiments are not repeated here.

[0249] Furthermore, if the modules / units integrated in the electronic device 1 are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. The computer-readable storage medium can be volatile or non-volatile. For example, the computer-readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, or a read-only memory (ROM).

[0250] The present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor of an electronic device, can perform the following:

[0251] Obtain grayscale images of discarded mechanical parts;

[0252] In the grayscale image of the component, identify the set of defect edge pixels of the target defect region, and identify the set of adjacent pixels of the defect edge pixels in the set of defect edge pixels;

[0253] In the adjacent pixel set, adjacent pixels are extracted sequentially, and the gray values ​​of adjacent pixels and edge pixels of defect edge pixels are identified. The gray value of adjacent pixels refers to the gray value of adjacent pixels, and the gray value of edge pixels refers to the gray value of defect edge pixels.

[0254] Based on the gray values ​​of adjacent pixels and edge pixels, the same set of pixels at the edge of the defect is identified in the target defect area. The same set of pixels includes a descending set of pixels and an ascending set of pixels. The descending set of pixels refers to the set of consecutive pixels whose gray values ​​decrease as the distance between the defect edge pixels increases, and the ascending set of pixels refers to the set of consecutive pixels whose gray values ​​increase as the distance between the defect edge pixels increases.

[0255] Based on the descending and ascending pixel sets, the target defect region is segmented into descending and ascending pixel blocks of the defect edge pixel set, respectively, to obtain the iterative defect region;

[0256] Determine whether all adjacent pixels have been extracted;

[0257] If all adjacent pixels have not been extracted, return to the steps described above for sequentially extracting adjacent pixels from the set of adjacent pixels.

[0258] If adjacent pixels have been extracted, determine whether the target defect area has been divided into preset blocks.

[0259] If the target defect region is not segmented into blocks, the target defect region is updated using the iterative defect region, and the process returns to the steps described above for identifying the defect edge pixel set of the target defect region in the grayscale image of the component.

[0260] If the target defect area is segmented into blocks, the segmentation texture is identified based on the descending and ascending pixel blocks. Based on the segmentation texture, descending and ascending pixel blocks, pre-built AI vision technology is used to classify and recycle waste mechanical parts.

[0261] In the embodiments provided by this invention, it should be understood that the disclosed devices, systems, and methods can be implemented in other ways. For example, the system embodiments described above are merely illustrative, and actual implementations may have other classification methods.

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

[0263] Furthermore, the functional modules in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or in the form of hardware plus software functional modules.

[0264] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.

[0265] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.

Claims

1. A method for intelligent recycling of waste mechanical parts based on AI vision, characterized in that, The method includes: Obtain grayscale images of discarded mechanical parts; In the grayscale image of the component, identify the set of defect edge pixels of the target defect region, and identify the set of adjacent pixels of the defect edge pixels in the set of defect edge pixels; In the adjacent pixel set, adjacent pixels are extracted sequentially, and the gray values ​​of adjacent pixels and edge pixels of defect edge pixels are identified. The gray value of adjacent pixels refers to the gray value of adjacent pixels, and the gray value of edge pixels refers to the gray value of defect edge pixels. Based on the gray values ​​of adjacent pixels and edge pixels, the same set of pixels at the edge of the defect is identified in the target defect area. The same set of pixels includes a descending set of pixels and an ascending set of pixels. The descending set of pixels refers to the set of consecutive pixels whose gray values ​​decrease as the distance between the defect edge pixels increases, and the ascending set of pixels refers to the set of consecutive pixels whose gray values ​​increase as the distance between the defect edge pixels increases. Based on the descending and ascending pixel sets, the target defect region is segmented into descending and ascending pixel blocks of the defect edge pixel set, respectively, to obtain the iterative defect region; Determine whether all adjacent pixels have been extracted; If all adjacent pixels have not been extracted, return to the steps described above for sequentially extracting adjacent pixels from the set of adjacent pixels. If adjacent pixels have been extracted, determine whether the target defect area has been divided into preset blocks. If the target defect region is not segmented into blocks, the target defect region is updated using iterative defect regions, and the process returns to the steps described above for identifying the defect edge pixel set of the target defect region in the grayscale image of the component. If the target defect area is segmented into blocks, the segmentation texture is identified based on the descending and ascending pixel blocks. Based on the segmentation texture, descending and ascending pixel blocks, pre-built AI vision technology is used to classify and recycle waste mechanical parts.

2. The intelligent recycling method for waste mechanical parts based on AI vision as described in claim 1, characterized in that, The acquisition of grayscale images of discarded mechanical parts includes: Pre-constructed standard mechanical parts are clamped and fixed to obtain positioning mechanical parts; A positioning spherical coordinate system is constructed based on the positioning mechanical components, wherein the center point of the positioning mechanical components is the origin of the spherical coordinate system; Based on the positioning sphere coordinate system, the shooting positioning latitude and longitude lines are constructed using preset unit longitude, unit latitude, and unit radius; Receive the target latitude and longitude intersection point selected by the user in the shooting positioning latitude and longitude line, and construct a spatial positioning shooting vector based on the target latitude and longitude intersection point and the spherical coordinate origin, wherein the spatial positioning shooting vector takes the target latitude and longitude intersection point as the vector origin and the spherical coordinate origin as the vector endpoint; A three-dimensional positioning coordinate system is constructed based on the positioning mechanical parts, wherein the origin of the three-dimensional positioning coordinate system is the center of the positioning mechanical parts, the positive x-axis is the direction of the front view of the positioning mechanical parts, the positive y-axis is the direction of the side view of the positioning mechanical parts, and the positive z-axis is the direction of the top view of the positioning mechanical parts. Based on the spatial positioning shooting vector and the three-dimensional positioning coordinate system, the relative shooting parameters corresponding to the intersection of the target latitude and longitude lines are calculated using a pre-constructed shooting parameter formula to obtain a set of relative shooting parameters. The relative shooting parameters include relative shooting distance and relative shooting azimuth. The shooting parameter formula is shown below: ; in, This represents the angle between the spatial positioning and shooting vector and the x-axis of the three-dimensional positioning coordinate system. This represents the angle between the spatial positioning and shooting vector and the y-axis of the three-dimensional positioning coordinate system. This represents the angle between the spatial positioning and shooting vector and the z-axis of the three-dimensional positioning coordinate system. Indicates relative shooting distance. Represents the unit radius. Indicates the modulus length symbol. Represents the spatial positioning and imaging vector. This represents the vector components of the spatial positioning and imaging vector along the x-axis. This represents the vector component of the spatial positioning and shooting vector on the y-axis. This represents the vector component of the spatial positioning and shooting vector on the z-axis, and cos represents the cosine sign. A positioning camera is obtained by taking pictures and fixing them in place using a pre-built high-resolution camera; The relative shooting parameters are extracted sequentially from the set of relative shooting parameters. The position angle of the waste mechanical parts is adjusted according to the positioning camera and the relative shooting parameters to obtain the mechanical parts to be tested. The position angle adjustment includes position adjustment and angle adjustment. The positioning camera is used to photograph the mechanical parts under test, thereby obtaining an image set of the parts under test; The defect image set of the component to be tested is filtered to obtain a defective component image set; Each defective component image in the defective component image set is converted to grayscale to obtain a component grayscale image.

3. The intelligent recycling method for waste mechanical parts based on AI vision as described in claim 2, characterized in that, The step of adjusting the azimuth angle of the discarded mechanical parts according to the positioning camera and relative shooting parameters to obtain the mechanical parts to be tested includes: The shooting orientation of the waste mechanical parts is adjusted according to the relative shooting orientation in the relative shooting parameters of the positioning camera to obtain the target mechanical parts, wherein the target mechanical parts and the shooting orientation of the positioning camera are relative shooting orientations. The shooting distance of the waste mechanical parts is adjusted according to the relative shooting distance in the relative shooting parameters of the positioning camera to obtain the mechanical parts to be tested. The shooting orientation of the mechanical parts to be tested and the positioning camera are relative shooting orientations and shooting distances.

4. The intelligent recycling method for waste mechanical parts based on AI vision as described in claim 2, characterized in that, The step of filtering defective images from the image set of the components to be tested to obtain a defective component image set includes: The positioning camera is used to photograph the positioning mechanical parts to obtain a standard parts image set; The defective component image set is obtained by comparing the standard component image set with the component image set under test.

5. The intelligent recycling method for waste mechanical parts based on AI vision as described in claim 1, characterized in that, The step of identifying the set of sequential pixels representing defect edge pixels in the target defect region based on the gray values ​​of adjacent pixels and edge pixels includes: Determine whether the grayscale value of the adjacent pixel is greater than the grayscale value of the edge pixel; If the gray value of the adjacent pixel is greater than the gray value of the edge pixel, then the defect edge pixel is aggregated with the adjacent pixel to obtain an initial ascending pixel set; Identify the ascending edge pixel set of the initial ascending pixel set; The ascending edge pixel set is iteratively aggregated within the target defect region to obtain the ascending pixel set; If the gray value of the adjacent pixel is not greater than the gray value of the edge pixel, then the defect edge pixel is aggregated with the adjacent pixel to obtain an initial descending pixel set; Identify the descending edge pixel set of the initial descending pixel set; The descending edge pixel set is iteratively aggregated within the target defect region to obtain the descending pixel set.

6. The intelligent recycling method for waste mechanical parts based on AI vision as described in claim 5, characterized in that, The process of identifying the ascending edge pixel set of the initial ascending pixel set includes: The aggregated ascending sub-blocks are determined based on the initial ascending pixel set; Identify the ascending edge pixel set of the aggregated ascending sub-block, wherein the ascending edge pixel set refers to the set of edge pixels of the aggregated ascending sub-block, and the edge pixels of the aggregated ascending sub-block refer to the pixels located at the block edge of the aggregated ascending sub-block.

7. The intelligent recycling method for waste mechanical parts based on AI vision as described in claim 6, characterized in that, The step of iteratively aggregating the ascending edge pixel set within the target defect region to obtain the ascending pixel set includes: Determine whether the ascending edge pixel set contains any preset external pixels to be aggregated; If there are external pixels to be aggregated in the ascending edge pixel set, then the ascending edge pixels are extracted sequentially from the ascending edge pixel set. The ascending edge pixel is sequentially identified as an externally adjacent pixel, wherein the externally adjacent pixels include: the external left adjacent pixel, the external right adjacent pixel, the external top adjacent pixel, the external bottom adjacent pixel, the external upper left adjacent pixel, the external lower left adjacent pixel, the external upper right adjacent pixel, and the external lower right adjacent pixel. The externally adjacent pixels refer to pixels located outside the aggregated ascending sub-block and adjacent to the ascending edge pixel. Identify the aggregated ascending edge grayscale value of the ascending edge pixel and the ascending external adjacent grayscale value of the ascending external adjacent pixel, wherein the aggregated ascending edge grayscale value refers to the grayscale value of the ascending edge pixel, and the ascending external adjacent grayscale value refers to the grayscale value of the ascending external adjacent pixel. Determine whether the grayscale value of the adjacent outer part of the ascending order is greater than the grayscale value of the aggregated ascending edge; If the gray value of the adjacent pixel outside the ascending order is greater than the gray value of the aggregated ascending edge, then the adjacent pixel outside the ascending order is taken as the target aggregated pixel. If the gray value of the adjacent pixels outside the ascending order is not greater than the gray value of the aggregated ascending edge, then it is determined whether all the adjacent pixels outside the ascending order of the ascending edge pixel have been identified. If not all of the ascending external neighboring pixels of the ascending edge pixel have been identified, then return to the above steps of sequentially identifying the ascending external neighboring pixels of the ascending edge pixel; If all the adjacent pixels outside the ascending edge pixel have been identified, then it is determined whether all the ascending edge pixels have been extracted. If not all of the ascending edge pixels have been extracted, return to the steps described above for sequentially extracting ascending edge pixels from the set of ascending edge pixels. If all the ascending edge pixels have been extracted, then all target aggregated pixels are gathered to obtain the target aggregated pixel set; The initial ascending pixel set is aggregated with the target aggregated pixel set to obtain an iterative ascending pixel set; The initial ascending pixel set is updated using the iterative ascending pixel set, and the steps described above for identifying the ascending edge pixel set of the initial ascending pixel set are returned. If the ascending edge pixel set does not contain any external pixels to be aggregated, then the iterative aggregation of the initial ascending pixel set is terminated, and the ascending pixel set is obtained.

8. The intelligent recycling method for waste mechanical parts based on AI vision as described in claim 7, characterized in that, The step of segmenting the target defect region into descending and ascending pixel blocks of the defect edge pixel set based on the descending and ascending pixel sets respectively, to obtain the iterative defect region, includes: A descending pixel block is determined based on the descending pixel set and an ascending pixel block is determined based on the ascending pixel set, wherein the descending pixel block refers to a pixel block composed of a descending pixel set and the ascending pixel block refers to a pixel block composed of an ascending pixel set. The iterative defect region is obtained by segmenting the descending pixel block and the ascending pixel block from the target defect region.

9. The intelligent recycling method for waste mechanical parts based on AI vision as described in claim 8, characterized in that, The step of identifying block segmentation patterns based on descending and ascending pixel blocks includes: Identify the pixel grid composed of pixels in the grayscale image of the component, wherein the unit grid in the pixel grid is square, and each grid point in the pixel grid corresponds to one pixel; Identify the center point of each cell in the pixel grid to obtain the set of cell center points; Identify the segmentation routes of the descending and ascending pixel blocks; Identify the sequence of segmentation center points located on the segmentation block route within the grid center point set; Segmentation center points are extracted sequentially from the segmentation center point sequence, and the segmentation unit grid corresponding to the segmentation center point is identified. Identify the set of segmented pixels on the segmentation unit grid, wherein the number of segmented pixels in the set of segmented pixels is 4; Identify the grayscale value set of the segmented pixels corresponding to the set of segmented pixels, and calculate the average grayscale value of the segmented center point based on the grayscale value set of the segmented pixels. The average grayscale value of the segmented center point refers to the average value of the grayscale value set of the segmented pixels. The segmented neighborhood region is defined based on the preset neighborhood radius and the segmentation center point; Identify the pixels within the segmented neighborhood region and the grayscale values ​​of the pixels within the neighborhood region; Based on the pixel grayscale values ​​within the domain and the average grayscale value at the segmentation center, the local binary pattern value of the segmentation center point is calculated using a pre-constructed local binary pattern formula, wherein the local binary pattern formula is as follows: ; in, This represents the local binary pattern value of the c-th segmentation center point. This indicates the number of pixels within the domain. Represents the neighborhood radius. This represents the grayscale value of the p-th pixel within the domain. This represents the average gray value of the segmentation center at the c-th segmentation center point. The sign function represents the c-th segmentation center point and the p-th pixel in the domain; the pixel grayscale value is assigned to the segmentation center point according to the local binary mode value to obtain the block segmentation texture.

10. An intelligent recycling system for waste mechanical parts based on AI vision, characterized in that, The system includes: The adjacent pixel set recognition module is used to acquire grayscale images of waste mechanical parts; identify the defect edge pixel set of the target defect area in the grayscale image of the parts; and identify the adjacent pixel set of the defect edge pixel set. The same-order pixel set recognition module is used to sequentially extract adjacent pixels from the adjacent pixel set, and identify the gray values ​​of adjacent pixels and the edge pixels of defect edge pixels. The gray values ​​of adjacent pixels refer to the gray values ​​of adjacent pixels, and the gray values ​​of edge pixels refer to the gray values ​​of defect edge pixels. Based on the gray values ​​of adjacent pixels and edge pixels, the same-order pixel set of defect edge pixels is identified in the target defect region. The same-order pixel set includes a descending pixel set and an ascending pixel set. The descending pixel set refers to the set of consecutive pixels whose gray values ​​decrease as the distance to defect edge pixels increases, and the ascending pixel set refers to the set of consecutive pixels whose gray values ​​increase as the distance to defect edge pixels increases. The block segmentation module is used to segment the target defect region into descending and ascending pixel blocks of the defect edge pixel set according to the descending and ascending pixel sets, respectively, to obtain the iterative defect region; determine whether the adjacent pixels have been extracted; if the adjacent pixels have not been extracted, return to the above steps of extracting adjacent pixels sequentially in the adjacent pixel set; if the adjacent pixels have been extracted, determine whether the target defect region has completed the preset block segmentation; if the target defect region has not completed the block segmentation, update the target defect region using the iterative defect region, and return to the above steps of identifying the defect edge pixel set of the target defect region in the grayscale image of the component. The classification and recycling module is used to identify the block segmentation texture based on the descending and ascending pixel blocks if the target defect area has been segmented. Based on the block segmentation texture, descending and ascending pixel blocks, the module uses pre-built AI vision technology to classify and recycle waste mechanical parts.