AI visual system for shaft part stain identification and cleaning equipment
By applying an AI vision system on shaft parts, identifying and determining the stain area, and triggering the cleaning equipment to automatically clean, the problem of low stain identification and cleaning efficiency in the prior art is solved, and an efficient and automatic stain cleaning process is achieved.
Patent Information
- Application Number
- CN202510135943.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-07
- Publication Date
- 2025-06-03
AI Technical Summary
The prior art fails to effectively identify stains by obtaining surface images of shaft-type parts and performing control operations of cleaning equipment, resulting in low stain cleaning efficiency.
Provides an AI vision system for stain recognition of shaft parts, which includes an image acquisition module and a stain recognition module. The image acquisition module obtains the surface image of the axis-like parts through the camera and generates the axis-like parts image. The stain recognition module processes the image of axle-like parts, recognizes local contrast, detects stain edges, merges sub-blocks to determine the stain area, and triggers the device signal.
Real-time monitoring and identification of surface stains of shaft parts is realized, and cleaning equipment is automatically triggered, which improves production efficiency and product quality and reduces manual intervention.
Smart Images

Figure CN120088209A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of visual recognition technology, and particularly to an AI visual system and a cleaning device for identifying stains on shaft parts. Background Art
[0002] With the development of science and technology, the detection and recognition of stains on the surface of shaft parts are realized through high-contrast images and advanced image processing algorithms, improving the detection efficiency and accuracy; at the same time, in many manufacturing industries, the recognition of stains on the surface of shaft parts has been realized through high-precision cameras, improving production efficiency, enabling fully automated operation, reducing manual intervention, and lowering labor intensity. However, most of them do not solve the problem of how to identify stains by obtaining the surface image of shaft parts and then perform the control operation of the equipment.
[0003] For example, Chinese Patent No. CN118967577A discloses an intelligent recognition and cleaning method, system and medium for containers. The method includes: obtaining image data of the space to be cleaned inside the container, preprocessing the image data to generate a color region image; performing region division on the color region image based on a division strategy to generate point regions; obtaining point cloud data of the space to be cleaned inside the container, analyzing the distribution information of the point cloud data, and judging the type of the point regions based on the distribution information of the point cloud data to obtain region types; comparing the point regions with historical image data to obtain verified point regions, and comparing the point region types with historical point cloud data to obtain verified type information; cleaning the point regions of different region types according to the verified type information; collecting and analyzing data through visual recognition and data scanning to achieve targeted cleaning of different point regions, ensuring comprehensive and thorough cleaning of the entire container and cleaner cleaning.
[0004] For example, Chinese Patent No. CN112734720B discloses a method and system for on-line detection of laser cleaning of ship hulls based on visual recognition. The steps are as follows: collecting the surface image of the ship hull after laser cleaning; the computer image processing device sequentially performs de-illumination processing, surface image stitching processing, surface image fusion processing, component equalization processing of the surface image, color extraction of the surface image, removal of interference points from the surface image, and calculation of the proportion of pollutants on the collected surface image, and finally obtains the processed surface image; comparing the processed surface image with the cleanliness standard. This detection method improves the accuracy and reliability of laser cleaning visual detection; the system has strong anti-interference ability, adaptability and fast processing speed.
[0005] The above patents have the problems raised in this background art: the above two patents do not solve the problem of how to identify stains by obtaining the surface image of shaft parts and then perform the cleaning of the stains on the shaft parts by the cleaning equipment. Summary of the Invention
[0006] In view of the deficiencies of the prior art, the present application provides an AI vision system and a cleaning device for stain recognition of shaft parts.
[0007] In a first aspect, the present application provides an AI vision system for stain recognition of shaft parts, which system includes: an image acquisition module and a stain recognition module;
[0008] The image acquisition module is used to acquire the surface image of the shaft part to generate a shaft part image. The generation strategy of the shaft part image includes generating a shaft gray-scale image based on the surface image of the shaft part, segmenting the shaft gray-scale image into shaft sub-blocks, and processing the shaft sub-blocks to obtain the shaft part image;
[0009] The stain recognition module is used to process the shaft part image, recognize the local contrast of each shaft sub-block in the shaft part image to obtain a stain candidate region, detect whether there is a stain edge in each shaft sub-block of the stain candidate region, merge the shaft sub-blocks to obtain a stain region, and trigger a device signal.
[0010] As an optional implementation manner, the determination strategy of the stain region includes:
[0011] Calculate the local contrast of each shaft sub-block respectively, configure a contrast threshold, and compare the local contrast of each shaft sub-block with the contrast threshold to select a stain candidate region;
[0012] Detect whether there is a stain edge in each shaft sub-block of the stain candidate region. When there is no stain edge in a certain shaft sub-block of the stain candidate region, distinguish whether the shaft sub-block is a stain;
[0013] Merge the shaft sub-blocks with stain edges and determined to be stains to obtain a stain region;
[0014] Determine the position, shape, size and type of the stain region, and synchronously trigger a device signal.
[0015] As an optional implementation manner, the logic for detecting whether there is a stain edge in each shaft sub-block of the stain candidate region includes:
[0016] Select a traversal sub-block to search each shaft sub-block in the stain candidate region;
[0017] During the traversal sub-block search process, obtain the pixel change situation of the part covered by the traversal sub-block in the shaft sub-block through threshold comparison based on the difference in gray values of adjacent pixels;
[0018] Obtain whether there is a stain edge in each shaft sub-block of the stain candidate region through threshold comparison according to the pixel change situation of the part covered by the traversal sub-block in the shaft sub-block.
[0019] As an alternative implementation, the logic for the combined shaft sub-blocks to obtain the stain area includes:
[0020] Mark all shaft sub-blocks as unvisited, and create a stain area set and a stain edge set;
[0021] Traverse and search for shaft sub-blocks adjacent to the shaft sub-blocks, and respectively judge the attributes of the shaft sub-blocks adjacent to the shaft sub-blocks to update the stain area set and the stain edge set;
[0022] Repeat the process of traversing and searching to obtain the contour information of multiple stain area sets and stain edges;
[0023] Optimize the merging of the stain area set according to the contour information of the stain edge, and analyze the shape difference and gray difference of each stain area set to obtain the stain area.
[0024] As an alternative implementation, the generation strategy of the shaft part image includes:
[0025] Obtain the surface image of the shaft part through a camera, convert the surface image of the shaft part into a grayscale image of the shaft part, and generate a shaft grayscale image;
[0026] Calculate the average grayscale value of the shaft grayscale image, divide the shaft grayscale image into shaft sub-blocks, and respectively calculate the average grayscale value of each shaft sub-block;
[0027] Subtract the average grayscale value of the shaft grayscale image from the average grayscale value of each shaft sub-block to obtain a brightness difference matrix;
[0028] Perform interpolation processing on the brightness difference matrix to obtain an adjusted brightness difference matrix;
[0029] And enhance the contrast of each shaft sub-block to obtain a contrast enhancement matrix;
[0030] Calculate and obtain a compensated shaft grayscale image, that is, a shaft part image, by combining the adjusted brightness difference matrix and the contrast enhancement matrix.
[0031] In a second aspect, the present application provides a shaft part cleaning device, which includes: an annular track line and an industrial robot;
[0032] The annular track line is used to carry and transport shaft parts, and a dry ice nozzle is arranged on the industrial robot, which is used to control the dry ice nozzle to clean the shaft parts after receiving the device signal.
[0033] As an alternative embodiment, the annular track line includes a positioning guide rail, a shaft part, and a transmission power source. The shaft part is connected to the positioning guide rail, and the transmission power source is used to control the positioning guide rail to transmit the shaft part.
[0034] As an alternative embodiment, the industrial robot includes a dry ice nozzle and a robotic arm. A positioning power source is provided on the robotic arm. The dry ice nozzle is connected to the positioning power source, and a rotation motor is also provided at the connection between the dry ice nozzle and the positioning power source. The rotation motor is used to control the rotation of the dry ice nozzle.
[0035] As an alternative embodiment, receive the device signal, determine the cleaning parameters of the cleaning device. The cleaning parameters include the dry ice particle injection amount, injection pressure, injection time, rotation angle, and movement trajectory of the dry ice nozzle, and generate a cleaning instruction according to the cleaning parameters of the cleaning device.
[0036] Compared with the prior art, the beneficial effects of the present application are as follows: The surface image of the shaft part is obtained through the image acquisition module to generate a shaft part image, and the surface image of the shaft part is captured in real time, providing a data basis for subsequent stain recognition; the stain recognition module processes the shaft part image, identifies the local contrast of each shaft sub-block in the shaft part image to obtain a stain candidate area, detects whether there is a stain edge in each shaft sub-block of the stain candidate area, merges the shaft sub-blocks to obtain a stain area, and triggers a device signal. This real-time monitoring and recognition ability makes the production process more efficient and can timely detect and handle problems. According to the device signal of the vision system, the corresponding cleaning operation can be automatically executed to clean the shaft part. This automated process reduces manual intervention and improves production efficiency and product quality. Description of the Drawings
[0037] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following drawings are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings. Among them:
[0038] Figure 1 It is the overall structure diagram of the shaft part cleaning device provided by the embodiment of the present application;
[0039] Figure 2 It is the partial structure diagram of the shaft part cleaning device provided by the embodiment of the present application;
[0040] Figure 3 It is the stain area determination strategy diagram of the AI vision system for shaft part stain recognition provided by the embodiment of the present application;
[0041] Figure 4 Flow chart of recognition result generation strategy for AI vision system for stain recognition of shaft parts provided by embodiments of the present application;
[0042] Figure 5 Logic diagram of stain edge detection for AI vision system for stain recognition of shaft parts provided by embodiments of the present application;
[0043] Figure 6 Logic diagram of obtaining stain area by merging shaft sub - blocks for AI vision system for stain recognition of shaft parts provided by embodiments of the present application.
[0044] Reference numerals:
[0045] 1, annular track line; 2, industrial robot; 3, dust collector; 4, dry - ice cleaning machine; 5, electrical control cabinet; 11, positioning guide rail; 12, shaft part; 13, transmission power source; 21, dry - ice nozzle; 22, robotic arm; 221, positioning power source; 222, rotation motor. Detailed implementation manners
[0046] To make the objectives, technical solutions, and advantages of the embodiments of the present application more apparent and understandable, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings of the specification. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments.
[0047] Embodiment 1
[0048] As Figure 3 shown, a system structure diagram of an AI vision system for stain recognition of shaft parts is provided by an embodiment of the present application. The system includes an image acquisition module and a stain recognition module.
[0049] The image acquisition module is used to acquire the surface image of the shaft part and generate a shaft part image. The generation strategy of the shaft part image includes generating a shaft gray - scale image based on the surface image of the shaft part, segmenting the shaft gray - scale image into shaft sub - blocks, and processing the shaft sub - blocks to obtain the shaft part image.
[0050] The generation strategy of the shaft part image includes:
[0051] Obtain the surface image of the shaft part through a camera, convert the surface image of the shaft part into a grayscale image of the shaft part to generate a shaft grayscale image, calculate the average grayscale value of the shaft grayscale image, divide the shaft grayscale image into shaft sub-blocks, calculate the average grayscale value of each shaft sub-block respectively, subtract the average grayscale value of the shaft grayscale image from the average grayscale value of each shaft sub-block to obtain a brightness difference matrix, perform interpolation processing on the brightness difference matrix to obtain an adjusted brightness difference matrix, and enhance the contrast of each shaft sub-block to obtain a contrast enhancement matrix. Combine the adjusted brightness difference matrix and the contrast enhancement matrix to calculate and obtain a compensated shaft grayscale image, that is, the shaft part image.
[0052] It should be understood that the purpose of adjusting and compensating the brightness of the surface image of the shaft part is to enhance the image quality of the surface image by improving the problem of uneven illumination. For example, in an indoor environment, brightness compensation is performed on the brightness of over-bright and over-dark areas to reduce the uneven illumination in the surface image. In addition to brightness compensation, increasing contrast enhancement can further improve the visual effect, especially for areas with strong or weak illumination.
[0053] Image contrast is a key factor affecting surface quality inspection. Especially when the surface details of the shaft part are relatively complex, traditional contrast enhancement methods are often limited to single whole image processing. Combining contrast enhancement at different levels of partial images and the whole image enables effective improvement of details in different regions.
[0054] The surface image of the shaft part obtained through the camera is a color image and needs to be converted into a grayscale image to generate a shaft grayscale image in order to accurately capture the brightness of the surface image of the shaft part. Exemplarily, those skilled in the art can directly implement the conversion from a color image to a grayscale image through Python code.
[0055] Determine the width and height of the shaft grayscale image to obtain the total number of pixels of the shaft grayscale image, that is, the width of the shaft grayscale image multiplied by the height, and determine the grayscale value of each pixel position in the shaft grayscale image, which is usually a value between 0 and 255, representing the brightness of the pixel. Accumulate the grayscale values of each pixel position in the shaft grayscale image and then divide by the total number of pixels of the shaft grayscale image to obtain the average grayscale value of the shaft grayscale image to ensure the consistency of the overall brightness of the shaft grayscale image, reflecting the overall illumination level of the shaft grayscale image.
[0056] Divide the shaft grayscale image into several shaft sub-blocks, and the size of the shaft sub-blocks can also be dynamically adjusted according to the complexity of the content of the shaft grayscale image. For example, a fixed shaft sub-block size (such as 16×16 pixels) can be used, or the size of the shaft sub-blocks can be adaptively adjusted according to the brightness difference of the shaft grayscale image.
[0057] If a fixed axis sub - block size is used here, sum all the pixels in each axis sub - block to obtain the total gray - scale value of the axis sub - block, and then divide it by the total number of pixels in the axis sub - block to get the average gray - scale value of the axis sub - block. This average gray - scale value can help remove the illumination variation of the axis sub - block and highlight the texture details. By subtracting the average gray - scale value of the axis gray - scale image from the average gray - scale value of the axis sub - block, a brightness difference matrix is obtained. This brightness difference matrix represents the deviation of the average gray - scale value of the current axis sub - block from the average gray - scale value of the axis gray - scale image, reflecting the difference in brightness between the axis sub - block and the axis gray - scale image.
[0058] To obtain the adjusted brightness difference matrix, the brightness difference matrix needs to be interpolated. Here, the bicubic interpolation method is used. It takes into account the gradient information in the horizontal and vertical directions of the axis sub - block, and performs interpolation and smoothing adjustment based on the gray - scale values of adjacent pixel points to preserve the details of the axis sub - block. This is to adjust the brightness difference matrix (a matrix with a smaller size) to the same size as the axis gray - scale image, so that the brightness adjustment in different axis sub - block regions of the axis gray - scale image can be smoothly transitioned, thereby enabling the contrast enhancement processing for each axis sub - block.
[0059] The functional expression for obtaining the contrast - enhanced matrix is as follows:
[0060] I enhanced (x,y) = α×(I(x,y) - μ local (x,y)) + μ local (x,y);
[0061] Among them, I enhanced (x,y) represents the contrast - enhanced matrix obtained after contrast enhancement for each axis sub - block, α represents the enhancement coefficient of the axis sub - block, I(x,y) represents the gray - scale value of the axis gray - scale image at the pixel position (x,y), and μ local (x,y) represents the average gray - scale value of the axis sub - block;
[0062] It should be noted that: I enhanced (x,y) refers to the contrast - enhanced matrix obtained after contrast enhancement for each axis sub - block, that is, the final gray - scale value after contrast enhancement; the enhancement coefficient α of the axis sub - block is used to adjust the degree of contrast enhancement of the axis sub - block. Increasing α will significantly enhance the contrast of the axis sub - block, making the details of the axis sub - block more prominent. Appropriately selecting the value of α is crucial. An overly large value may cause the noise of the axis sub - block to be over - amplified, thus affecting the quality of the axis gray - scale image. Generally, the value of α is taken between 1.2 and 2.0.
[0063] It should be understood that the core of contrast enhancement for each shaft - type sub - block is to strengthen details through the brightness difference of the shaft - type sub - block, thereby improving the clarity of the shaft - type sub - block. For the surface image of a shaft - type part with complex texture or surface defects, by enhancing the contrast of the shaft - type sub - block, the texture and defects become more obvious. However, it should also be noted to avoid excessive enhancement resulting in an increase in noise in the grayscale image of the shaft, and it can effectively handle the illumination differences, texture complexity, and defects that may appear in the surface image of the shaft - type part, ensuring the improvement of the surface image quality.
[0064] The compensated grayscale image of the shaft, that is, the image of the shaft - type part, is obtained by subtracting the adjusted brightness difference matrix from the contrast enhancement matrix. At the same time, to ensure the validity of the calculation result and avoid pixel overflow, a grayscale value clipping operation is performed to ensure that the calculation result is within the range of [0, 255]. If the calculation result is less than 0, it is set to 0, and if the calculation result is greater than 255, it is set to 255.
[0065] Through the above strategy, the grayscale image of the shaft with enhanced contrast and brightness compensation of the shaft - type sub - block, that is, the image of the shaft - type part, is obtained, which preserves the details of the shaft - type part image and avoids over - brightening or over - darkening, so as to better process the shaft - type part image subsequently and identify the stain characteristics of the shaft - type part.
[0066] The stain recognition module is used to process the shaft - type part image, identify the local contrast of each shaft - type sub - block in the shaft - type part image to obtain stain candidate regions, detect whether there are stain edges in each shaft - type sub - block of the stain candidate regions, merge the shaft - type sub - blocks to obtain the stain region, and trigger a device signal.
[0067] The determination strategy of the stain region is as Figure 4 shown, and specifically includes:
[0068] Calculate the local contrast of each shaft - type sub - block respectively, configure the contrast threshold, and compare the local contrast of each shaft - type sub - block with the contrast threshold to select stain candidate regions;
[0069] Detect whether there are stain edges in each shaft - type sub - block of the stain candidate regions. When there is no stain edge in a certain shaft - type sub - block of the stain candidate region, distinguish whether this shaft - type sub - block is a stain;
[0070] Merge the shaft - type sub - blocks with stain edges and those determined to be stains to obtain the stain region;
[0071] Determine the position, shape, size, and type of the stain region, and synchronously trigger a device signal.
[0072] Assume there is an oil stain on the surface of a shaft-like part. The reflection characteristics of the oil stain area are different from those of the surrounding normal area, resulting in differences in local contrast in the shaft-like part image. By calculating the local contrast of each shaft-like sub-block respectively, the characteristic differences of different areas on the surface of the shaft-like part can be highlighted. In each shaft-like sub-block, the local contrast is measured by the maximum and minimum values of the gray values at the pixel positions in the shaft-like sub-block. The difference between the maximum and minimum values of the gray values at the pixel positions in the shaft-like sub-block is obtained as the gray value difference, and then the gray value difference is divided by the average gray value of the shaft-like sub-block to obtain the local contrast of the shaft-like sub-block. Define a contrast threshold, which represents the difference in contrast between the stain area and the background area. When the local contrast of the shaft-like sub-block is greater than the set contrast threshold, the shaft-like sub-block is marked as a stain candidate area, preliminarily locating the possible position of the stain, narrowing the scope of subsequent detection, and improving the detection efficiency.
[0073] Perform stain edge detection on each shaft-like sub-block in the stain candidate area. If there is no stain edge in a certain shaft-like sub-block, further distinguish whether it is a stain. This is based on the morphological characteristics of the stain. The stain either has obvious edges or, although there are no obvious edges, shows different characteristics (such as gray values, textures, etc.) from the normal area as a whole, so as to more accurately judge whether there is a stain edge in each shaft-like sub-block.
[0074] The logic for detecting whether there is a stain edge in each shaft-like sub-block in the stain candidate area is as Figure 5 shown, specifically including:
[0075] Select traversal sub-blocks to search each shaft-like sub-block in the stain candidate area;
[0076] During the traversal sub-block search process, obtain the pixel change situation of the part covered by the traversal sub-block in the shaft-like sub-block through threshold comparison based on the difference in adjacent pixel gray values;
[0077] Obtain whether there is a stain edge in each shaft-like sub-block in the stain candidate area through threshold comparison according to the pixel change situation of the part covered by the traversal sub-block in the shaft-like sub-block.
[0078] The pixel gray values in the edge area of the shaft-like part image usually change significantly. For example, for a shaft-like sub-block with a size of 16×16, select traversal sub-blocks with a size of 4×4 for traversal search, calculate the absolute value of the difference Δd between the gray value of each pixel covered by the traversal sub-block in the shaft-like sub-block and the gray value of the adjacent pixel, configure the difference threshold d 0 , count the number of pixel points n that satisfy Δd≥d 0 in the part covered by the traversal sub-block, and the number of pixel points that satisfy Δd≥d 0The number of pixels n of is divided by the total number of pixels N within the covered part of the traversed sub-block to obtain the pixel ratio n / N.
[0079] Set a ratio threshold p. If the pixel ratio n / N is greater than or equal to the ratio threshold p, it is determined that there is a stain edge in the covered part of the traversed sub-block within the shaft sub-block, that is, the covered part of the traversed sub-block within the shaft sub-block is the stain edge area, and the covered part of the traversed sub-block within the shaft sub-block is denoted as E = 0; if the pixel ratio n / N is less than the ratio threshold p, it is determined that there is no stain edge in the covered part of the traversed sub-block within the shaft sub-block, and the covered part of the traversed sub-block within the shaft sub-block is denoted as E = 1. Representing the pixel change situation of the covered part of the traversed sub-block within the shaft sub-block with the pixel ratio can successfully determine whether there is a stain edge in the covered part of the traversed sub-block within the shaft sub-block, providing an important basis for accurately determining the stain range subsequently.
[0080] When it is determined that there is a stain edge in the covered part of the traversed sub-block within the shaft sub-block, further reduce the size of the traversed sub-block, for example, reduce it to a traversed sub-block of size 2×2 or 1×1, and use the reduced traversed sub-block to traverse the stain edge area again. Recalculate the absolute value of the difference Δd between the gray value of each pixel in the stain edge area and the gray value of the adjacent pixel, and count the number of pixels that satisfy Δd≥d 0 of the pixel points, calculate the new pixel ratio, and based on the new pixel ratio, determine again whether there is a stain edge in the covered part of the traversed sub-block within the stain edge area. By recording the position information of the reduced traversed sub-block, the contour of the stain edge can be depicted more precisely, which helps to merge the stain areas more accurately subsequently, improving the accuracy and reliability of the entire stain recognition AI system and reducing the situations of misjudgment and missed judgment.
[0081] Some stains do not have obvious edges, but there are differences in local contrast with the normal area. For the situation where there is no stain edge in the covered part of the traversed sub-block within the shaft sub-block, it is necessary to distinguish whether the covered part of the traversed sub-block within the shaft sub-block is a stain. Calculate the local contrast of the covered part of the traversed sub-block within the shaft sub-block. When the local contrast of the covered part of the traversed sub-block within the shaft sub-block is greater than the set contrast threshold, it indicates that the covered part of the traversed sub-block within the shaft sub-block is a stain, and when the local contrast of the covered part of the traversed sub-block within the shaft sub-block is less than or equal to the set contrast threshold, it indicates that the covered part of the traversed sub-block within the shaft sub-block is not a stain. It accurately judges whether the part without a stain edge within the shaft sub-block is a stain, further refining the detection of stains, avoiding missed detections caused by unclear stain edges, and improving the accuracy and integrity of stain detection.
[0082] Stains on the surface of shaft parts are usually continuous. Merging the edges of the stains and the shaft sub-blocks identified as stains is based on the characteristic that stains are usually continuously distributed. By merging these shaft sub-blocks, the scattered stain information can be integrated to form a complete stain area, facilitating subsequent analysis and processing of the stains.
[0083] The logic for merging shaft sub-blocks to obtain the stain area is as Figure 6 shown and specifically includes:
[0084] Mark all shaft sub-blocks as unvisited, and create a stain area set and a stain edge set;
[0085] Traverse and search for shaft sub-blocks adjacent to the shaft sub-blocks, and respectively judge the attributes of the shaft sub-blocks adjacent to the shaft sub-blocks to update the stain area set and the stain edge set;
[0086] Repeat the process of traversing and searching to obtain the contour information of multiple stain area sets and stain edges;
[0087] Optimize the merging of the stain area set according to the contour information of the stain edges, and analyze the shape differences and gray-scale differences of each stain area set to obtain the stain area.
[0088] In order to process the shaft sub-blocks in an orderly manner, it is necessary to clarify the initial state of each shaft sub-block, mark the shaft sub-blocks as unvisited, and define an empty stain area set and a stain edge set, which are respectively used to store all possible stain areas and record the relevant information of the stain edges, so that the entire processing flow has a clear starting point and data storage structure, facilitating the subsequent step-by-step construction of the stain area and recording the contour information of the stain edges.
[0089] Based on the characteristic that stains are usually continuously distributed on the surface of shaft parts, by continuously incorporating eligible adjacent shaft sub-blocks into the same stain area, the initial division of the stain area is realized. Therefore, arbitrarily select an unvisited shaft sub-block, mark the shaft sub-block as visited, judge the attribute of the shaft sub-block. When the shaft sub-block is determined to be a stain, add the shaft sub-block to the stain area set. When the shaft sub-block has a stain edge, add the shaft sub-block to the stain edge set. Then traverse the attributes corresponding to all adjacent shaft sub-blocks of the shaft sub-block. If the adjacent shaft sub-block is determined to be a stain, then add the adjacent shaft sub-block to the stain area set. If the adjacent shaft sub-block has a stain edge, then add the adjacent shaft sub-block to the stain edge set, and update the adjacent shaft sub-block as visited, the stain area set, and the stain edge set, initially constructing the contour information of an initial stain area and stain edge, laying a foundation for the subsequent complete determination of the stain area.
[0090] There are multiple independent stains on the surface of the shaft parts. To ensure that all stain areas can be detected, it is necessary to traverse all shaft sub-blocks. When there are still shaft sub-blocks in the unvisited state, repeat the marking of the shaft sub-blocks and the judgment of their attributes. Finally, multiple stain area sets and relatively complete contour information of the stain edges are obtained. Each stain area set contains some shaft sub-blocks that are interrelated and conform to the stain characteristics, and multiple stain areas are completely identified, covering different positions on the surface of the shaft parts where stains exist.
[0091] Further optimize the obtained stain area sets, remove the wrongly merged and duplicate parts to make the stain areas more accurate. For example, judge whether there is an overlap of shaft sub-blocks between each stain area set. If common shaft sub-blocks are found, merge these overlapping shaft sub-blocks to avoid duplicate calculations; according to the contour information of the stain edges in the stain edge set (obtained based on whether there are stain edges in the covered parts of the traversed sub-blocks within the above-mentioned shaft sub-blocks), divide the shaft sub-blocks in the stain area set into traversed sub-blocks of the same size, check the edge continuity in different stain area sets. If the edges of two stain area sets are adjacent and continuous in the contour information, even if these two stain area sets are not directly connected in the previous traversal, merge the traversed sub-blocks in these two stain area sets to form a new stain area set.
[0092] Analyze the shape differences of each stain area set, such as calculating the aspect ratio and circularity of the area formed by the shaft sub-blocks contained in each stain area set. At the same time, analyze the gray-scale differences of each stain area set, such as calculating the gray-scale variance of the shaft sub-blocks within the stain area set. If the shape difference or gray-scale difference of a certain stain area set is larger than the pre-set threshold, it indicates a misjudged area, and remove this stain area set. After processing, more accurate stain areas are obtained, reducing the situations of misjudgment and missed judgment, and providing more reliable data for the subsequent cleaning of the stains.
[0093] To enable the subsequent cleaning equipment to accurately process the stains, it is necessary to know information such as the specific position, shape, size, and type of the stains. After obtaining the accurate stain areas, determine the positions of the stain areas by analyzing the coordinate information of the shaft sub-blocks contained in the stain areas in the shaft part image. For example, assume that each shaft sub-block has corresponding row and column coordinates in the shaft part image, count the coordinate ranges of all shaft sub-blocks in the stain area set, and take the minimum and maximum coordinate values to determine the approximate position range of the stain area in the shaft part image. If there are multiple stain area sets, determine the positions of each stain area set respectively, providing accurate stain positioning for the subsequent cleaning equipment, enabling the cleaning equipment to accurately operate on the stain areas, and improving the pertinence and efficiency of cleaning.
[0094] The shape of the stain area is determined using a contour detection algorithm, providing the shape information of the stain for subsequent cleaning equipment, which helps to determine the cleaning parameters of the cleaning equipment; the size of the stain area is calculated based on the number of shaft sub-blocks and the number of traversed sub-blocks within the shaft sub-blocks included in the stain area set, providing quantitative size information of the stain area for the cleaning equipment and facilitating the determination of the cleaning parameters of the cleaning equipment.
[0095] Different types of stains have different chemical compositions and physical properties, and different cleaning parameters are adopted. By comparing the characteristics of the stain area with the characteristics of various existing stains, the stain type is determined, including oil stains, dust, and water stains, etc. It can be comprehensively classified by texture contrast and shape. For example, oil stains usually have a smooth texture and appear circular or irregular in shape, while dust may show a rougher texture and has an irregular and scattered shape, providing key stain type information for subsequent cleaning.
[0096] Once the information such as the location, shape, size, and type of the stain area is determined, the device signal is immediately synchronously triggered and sent to the cleaning equipment. So that after the cleaning equipment receives the device signal containing the detailed stain information, it can process the stain in a timely manner, realizing the automated process of the entire stain recognition AI system and seamlessly docking with the subsequent cleaning equipment, improving work efficiency and reducing manual intervention.
[0097] Embodiment 2
[0098] As Figure 1 shown, the overall structure diagram of the shaft part cleaning equipment is provided in the embodiment of the present application. The equipment includes:
[0099] Annular track line 1, industrial robot 2, dust collector 3, dry ice cleaning machine 4, and electrical control cabinet 5;
[0100] Receive the device signal, determine the cleaning parameters of the cleaning equipment. The cleaning parameters include the dry ice particle injection amount, injection pressure, injection time, rotation angle, and movement trajectory of the dry ice nozzle 21. Generate a cleaning instruction according to the cleaning parameters of the cleaning equipment and perform the control operation of the cleaning equipment;
[0101] When it is received that the device signal indicates the existence of a stain area, calculate the area of the stain area, such as the length × width of a rectangle, πr of a circle 2 , and the area of an irregular area can be obtained by pixel counting or shape fitting. Adjust the dry ice particle injection amount of the dry ice nozzle 21 according to the shape, area, and type of the stain area. For example, a large area stain requires a larger dry ice particle injection amount. For oil stains, a larger dry ice particle injection amount may be required because oil stains usually have a strong adhesion force and are difficult to remove. Dust cleaning is relatively simple, and the dry ice particle injection amount can be reduced, while water stains may require a medium amount of dry ice particle injection amount.
[0102] Adjust the injection pressure of the dry ice nozzle 21 according to the area and type of the stain area. For example, higher injection pressure is required for oil stains to break the adhesion of the oil stains, while lower injection pressure can be provided for cleaning dust to avoid dust scattering caused by excessive pressure. For cleaning water stains, the injection pressure provided should be moderate to avoid splashing of the water stains, while ensuring the cleaning effect. For another example, larger stain areas may require higher injection pressure to ensure uniform coverage and thorough cleaning.
[0103] Adjust the injection time of the dry ice nozzle 21 according to the area and type of the stain area. For example, oil stains are more stubborn and require a longer cleaning time, while dust is easier to clean, so the injection time is shorter. For another example, larger stain areas may require a longer injection time.
[0104] Adjust the rotation angle of the dry ice nozzle 21 according to the shape of the stain area. For example, if the stain shape is relatively regular, the rotation angle may be fixed, such as 0° to 360°. For example, for a circular shape, set the rotation angle of the dry ice nozzle 21 to 360°, and for a rectangular shape, set the rotation angle of the dry ice nozzle 21 to 180°. If the stain shape is more complex or irregular, the rotation angle may need to be adjusted according to the aspect ratio of the area of the stain area or a specific cleaning path.
[0105] Adjust the movement trajectory of the dry ice nozzle 21 according to the shape and position of the stain area. For example, for a rectangular area, the movement trajectory of the dry ice nozzle 21 can be designed for left - right or up - down cleaning. For a circular area, it can be designed to clean along the edge of the circular area. If the stain shape is more complex, then a gradually moving or spiral movement trajectory can be adopted for cleaning.
[0106] The annular track line 1 is used to carry and transport shaft parts 12. When receiving the equipment signal, the shaft parts 12 need to be transported to the cleaning areas at the industrial robot 2 and the dust collector 3. The dry ice nozzle 21 is arranged on the industrial robot 2 and is used to control the dry ice nozzle 21 to clean the shaft parts 12 after receiving the equipment signal, including determining the cleaning parameters. The dry ice particles sprayed by the dry ice nozzle 21 are transported through the pipeline of the dry ice cleaning machine 4. After the cleaning is completed, the cleaning residues including stain particles and dry ice residues are absorbed by the dust collector 3 and centrally processed. The above - mentioned annular track line 1, industrial robot 2, dry ice cleaning machine 4 and dust collector 3 are communicatively connected to the electrical control cabinet 5.
[0107] The annular track line 1 includes a positioning guide rail 11 and a transmission power source 13. The shaft part 12 is connected to the positioning guide rail 11 to ensure the stable transmission of the shaft part 12. The transmission power source 13 is used to control the positioning guide rail 11 to transmit the shaft part 12, so that the transmission power source 13 drives the positioning guide rail 11 to move orderly back and forth along the shape direction of the annular track line 1. At the same time, the shaft part 12 moves orderly back and forth along the shape direction of the annular track line 1 under the drive of the positioning guide rail 11. After receiving the equipment signal, the shaft part 12 carried by the annular track line 1 is transmitted to the industrial robot 2 and the dust collector 3 for cleaning. It is more convenient to absorb the cleaning residue stain particles and dry ice residue through the dust collector 3 after the shaft part 12 is cleaned, so as to realize the pipeline operation from the visual system to identify the stain area to the cleaning.
[0108] The annular track line 1 is made of high-strength corrosion-resistant materials and is designed in a closed loop. A plurality of positioning guide rails 11 are arranged on the surface to ensure the accurate and stable transmission of the shaft part 12 during the transmission process. By adjusting the cleaning instructions, the industrial robot is controlled to perform 360-degree omnidirectional recognition and cleaning of the shaft part 12, and at the same time, it can adapt to various shaft parts 12. Among them, the transmission power source 13 is connected to the electrical control cabinet 5 and receives relevant instructions issued by the electrical control cabinet 5. For example, after the visual system identifies the stain area, a transmission instruction is issued to transmit the shaft part 12 with the stain area along the shape direction of the annular track line 1 to the industrial robot 2 for cleaning work.
[0109] As Figure 2 shown, the industrial robot 2 includes a dry ice nozzle 21 and a robotic arm 22. A positioning power source 221 is arranged on the robotic arm 22. The dry ice nozzle 21 is connected to the positioning power source 221, so that the positioning power source 221 drives the dry ice nozzle 21 to move freely along with the robotic arm 22. A rotating motor 222 is also arranged at the connection between the dry ice nozzle 21 and the positioning power source 221. The rotating motor 222 is used to control the rotation of the dry ice nozzle 21. After receiving the equipment signal, the shaft part 12 carried by the annular track line 1 is transmitted to the industrial robot 2 and the dust collector 3 for cleaning. According to the cleaning instructions generated by the cleaning parameters, the rotation angle and movement trajectory of the dry ice nozzle 21 are controlled to achieve the omnidirectional cleaning of the stains on the shaft part 12.
[0110] The industrial robot 2 quickly locks the key area stain area on the shaft part 12 according to the position of the stain area identified by the visual system, and controls the dry ice nozzle 21 to be positioned at the shaft part 12 to be cleaned through the positioning power source 221. Then, through the cleaning instructions generated by the cleaning parameters, through the communication connection with the electrical control cabinet 5 and the control of the rotating motor 222, the rotation angle and movement trajectory of the dry ice nozzle 21 are controlled to achieve the best cleaning effect. Among them, the industrial robot 2 is arranged adjacent to the annular track line 1.
[0111] Dry ice particles are ejected through the dry ice nozzle 21. The dry ice particles remove the stains on the surface of the shaft-like part 12 through physical impact and temperature difference effects, while protecting the integrity of the surface of the shaft-like part 12. And the rotation motor 222 is used to drive the dry ice nozzle 21 to change the rotation angle and movement trajectory, so as to achieve multi-angle precise spraying on the surface of the shaft-like part 12. Among them, the dry ice nozzle 21 is connected to the dry ice cleaning machine 4 through a pipeline and is controlled by the electrical control cabinet 5 to achieve efficient cleaning of all aspects of the surface of the shaft-like part 12.
[0112] The dust collector 3 is used to absorb and filter the cleaning residue stain particles and dry ice residues generated during the cleaning of the shaft-like part 12 by the dry ice nozzle 21, prevent secondary pollution of the shaft-like part 12, and can handle dry ice residues and stain particles. Among them, the dust collector 3 is connected to the electrical control cabinet 5, starts and stops synchronously with the dry ice nozzle 21, and adjusts the dust suction intensity according to the amount of cleaning residues. The dust collector 3 is installed opposite to the industrial robot 2, that is, the area where the dust collector 3 and the industrial robot 2 are installed is used as the cleaning area. So that when the industrial robot 2 controls the dry ice nozzle 21 to clean the shaft-like part 12, the dust collector 3 directly absorbs the cleaning residue stain particles and dry ice residues generated during the cleaning process and conducts centralized treatment.
[0113] The dry ice cleaning machine 4 is used to provide high-purity dry ice particles for the dry ice nozzle 21. The dry ice cleaning machine 4 is connected to the dry ice nozzle 21 through a pipeline, can communicate with the electrical control cabinet 5 under the command control of the electrical control cabinet 5, and conveys dry ice particles as required according to the cleaning instructions generated by the cleaning parameters, including the dry ice particle spraying amount, spraying pressure and spraying time, to ensure the stability and cleaning effect when the dry ice particles are conveyed to the dry ice nozzle 21.
[0114] The electrical control cabinet 5 is the core control unit of the entire cleaning equipment, responsible for the coordinated work of the entire cleaning equipment, and is communicatively connected to the transmission power source 13, industrial robot 2, dry ice nozzle 21, dry ice cleaning machine 4, dust collector 3 and vision system, and sends relevant instructions to the transmission power source 13, industrial robot 2, dry ice nozzle 21, dry ice cleaning machine 4, dust collector 3 and vision system to coordinate the recognition and cleaning processes.
[0115] It can be seen that the working process of the above cleaning equipment is as follows:
[0116] ① Transfer the shaft-like part 12 to be cleaned from the feeding device to the circular track line 1;
[0117] ② During the transmission of the shaft-like part 12 on the circular track line 1, the vision system takes all-round pictures of the surface of the shaft-like part 12 and identifies the stains, generating equipment signals including whether there are stain areas, and the position, shape, size and type of the stain areas;
[0118] ③Determine the cleaning parameters of the cleaning equipment according to the equipment signals, including the dry ice particle injection volume, injection pressure, injection time, rotation angle and movement trajectory of the dry ice nozzle 21, and perform fixed-point cleaning on the stain area through the dry ice nozzle 21. The change of the cleaning parameters can ensure that the industrial robot cleans all areas on the surface of the shaft part 12;
[0119] ④Collect and process the cleaning residues generated during the cleaning process through the dust collector 3 to ensure environmental cleanliness;
[0120] ⑤After the cleaning is completed, transfer the shaft part 12 to the blanking area to complete the entire cleaning process of the shaft part 12.
[0121] Through the working process of the above cleaning equipment, the present application realizes the efficient identification and cleaning of stains on the surface of the shaft parts, not only improves the cleaning efficiency, but also protects the integrity of the part surface, and is suitable for large-scale industrial application scenarios.
Claims
1. AI vision system for stain recognition of shaft parts, characterized by: include: Image acquisition module and stain recognition module; The image acquisition module is used to acquire the surface image of the shaft part and generate the shaft part image. The generation strategy of the shaft part image includes generating a shaft grayscale image according to the surface image of the shaft part, dividing the shaft grayscale image into shaft sub-blocks, and processing the shaft sub-blocks to obtain the shaft part image; The stain recognition module is used to process the shaft part image, identify the local contrast of each shaft sub-block in the shaft part image, obtain the stain candidate area, detect whether there is a stain edge in each shaft sub-block in the stain candidate area, merge the shaft sub-blocks to obtain the stain area, and trigger the device signal.
2. The AI vision system for stain recognition of shaft parts according to claim 1, characterized in that: The stain area determination strategy includes: Calculate the local contrast of each axis sub-block respectively, configure the contrast threshold, compare the local contrast of each axis sub-block with the contrast threshold to select the stain candidate area; Detect whether there is a stain edge in each axis sub-block of the stain candidate area, and when a certain axis sub-block in the stain candidate area does not have a stain edge, distinguish whether the axis sub-block is a stain; Merge the axis sub-blocks with stain edges and those determined to be stains to obtain the stain area; Determine the location, shape, size and type of the soiled area and trigger the device signal synchronously.
3. The AI vision system for stain recognition of shaft parts as claimed in claim 2, characterized in that: The logic of detecting whether there is a stain edge in each axis sub-block of the stain candidate area includes: Select traversing the sub-blocks to search each shaft-like sub-block in the stain candidate area; In the process of searching through the sub-blocks, the pixel changes of the part covered by the traversal sub-block in the axis sub-block are obtained by comparing the gray values of adjacent pixels through the threshold value. According to the pixel changes of the part covered by the traversed sub-block in the axis sub-block, it is determined whether there is a stain edge in each axis sub-block of the stain candidate area through threshold comparison.
4. The AI vision system for stain recognition of shaft parts as claimed in claim 3, characterized in that: The logic of merging the axis sub-blocks to obtain the stain area includes: Mark all axis sub-blocks as unvisited, and create a stain area set and a stain edge set; Traversing and searching the axis sub-blocks and the axis sub-blocks adjacent to the axis sub-blocks, and respectively determining the attributes of the axis sub-blocks and the axis sub-blocks adjacent to the axis sub-blocks to update the stain area set and the stain edge set; Repeat the traversal search process to obtain multiple stain area sets and the contour information of the stain edge; The merging of the stain region sets is optimized according to the contour information of the stain edge, and the shape difference and grayscale difference of each stain region set are analyzed to obtain the stain region.
5. The AI vision system for stain recognition of shaft parts as claimed in claim 4, characterized in that: The generation strategy of the shaft parts image includes: Acquire the surface image of the shaft part through the camera, convert the surface image of the shaft part into a grayscale image of the shaft part, and generate a shaft grayscale image; Calculate the average grayscale value of the shaft grayscale image, divide the shaft grayscale image into shaft sub-blocks, and calculate the average grayscale value of each shaft sub-block respectively; Subtract the average gray value of the axis gray image from the average gray value of each axis sub-block to obtain a brightness difference matrix; Perform interpolation processing on the brightness difference matrix to obtain an adjusted brightness difference matrix; And perform contrast enhancement on each axis sub-block to obtain a contrast enhancement matrix; The compensated shaft grayscale image, namely the shaft part image, is calculated by combining the adjusted brightness difference matrix and the contrast enhancement matrix.
6. A shaft parts cleaning device, implemented based on the AI vision system for shaft parts stain recognition according to any one of claims 1 to 5, characterized in that: include: A circular track (1) and an industrial robot (2); The circular track line (1) is used to carry and transport shaft parts (12); the industrial robot (2) is provided with a dry ice nozzle (21) for controlling the dry ice nozzle (21) to clean the shaft parts (12) after receiving a signal from the device.
7. The device according to claim 6, characterized in that: The circular track line (1) comprises a positioning guide rail (11), a shaft-like part (12) and a transmission power source (13); the shaft-like part (12) is connected to the positioning guide rail (11); and the transmission power source (13) is used to control the positioning guide rail (11) to transmit the shaft-like part (12).
8. The device according to claim 7, characterized in that: The industrial robot (2) comprises a dry ice nozzle (21) and a mechanical arm (22); a positioning power source (221) is arranged on the mechanical arm (22); the dry ice nozzle (21) is connected to the positioning power source (221); a rotating motor (222) is also arranged at the connection between the dry ice nozzle (21) and the positioning power source (221); the rotating motor (222) is used to control the rotation of the dry ice nozzle (21).
9. The device according to claim 8, characterized in that: The device signal is received, cleaning parameters of the cleaning device are determined, the cleaning parameters include the dry ice particle spraying amount, spraying pressure, spraying time, rotation angle and movement trajectory of the dry ice nozzle (21), and a cleaning instruction is generated according to the cleaning parameters of the cleaning device.
Citation Information
Patent Citations
In-situ detection method and system for hull laser cleaning based on visual recognition
CN112734720B
Intelligent identification and cleaning method and system for container and medium
CN118967577A
Method and device for detecting part defects
CN110148130A
Surface scratch defect identification method and visual inspection equipment
CN115880248A
Intelligent defect detection method for aero-engine parts based on machine vision
CN117522870A
Cited By
Low-altitude remote sensing image processing method and device, storage medium and computer equipment
CN121032868A
Flexible film residue positioning and removing device based on visual algorithm
CN121551327A
Flexible film residue positioning and removal device based on vision algorithms
CN121551327B