Aluminum profile extrusion molding monitoring method and system based on machine vision
Through machine vision technology, the finished aluminum profile image is collected from multiple angles, and pixel matching and cluster analysis are used to generate final corrected images, solving the problem of reflective areas affecting quality monitoring, and achieving efficient and accurate defect detection.
Patent Information
- Application Number
- CN202510652842.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-21
- Publication Date
- 2025-08-22
- Estimated Expiration
- 2045-05-21
AI Technical Summary
During the extrusion molding of aluminum profiles, the reflective area affects the quality monitoring accuracy, and the prior art is difficult to remove accurately, resulting in misjudgment of defect detection.
Using a machine vision-based method, by collecting finished images at multiple angles, using pixel matching and clustering analysis, the pixel values with the least light interference are selected, the final corrected image is generated, and the reflective area is removed to achieve accurate defect detection.
The reflective areas in the finished product image are effectively removed, which improves the accuracy and efficiency of defect detection, reduces the amount of calculation, and ensures a complete description of finished product information.
Smart Images

Figure CN120219371B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing, and in particular to a method and system for monitoring aluminum profile extrusion molding based on machine vision. Background Art
[0002] During the extrusion molding process of aluminum profiles, if the control parameters are not set properly, various quality problems may easily occur. For example, improper temperature parameter settings may cause pitting or roughness on the surface of the aluminum profile. These pitting or roughness may affect the appearance and performance of the aluminum profile. Therefore, it is necessary to monitor the quality of the aluminum profile extrusion molding process so that when quality problems occur, the control parameters can be adjusted in time to prevent the quality problems from continuing and causing more losses.
[0003] Finished products obtained by extrusion molding of aluminum profiles generally have a high surface smoothness and a strong metallic luster. Therefore, reflective areas are easily formed on the surface of the finished products obtained by extrusion molding of aluminum profiles. Such reflective areas can affect the accuracy of quality monitoring. For example, the brightness of the pits is relatively high and they have certain texture information. This information has similar characteristics to the reflective areas, making it easy to misjudge the reflective areas as defective areas when extracting defects by color and texture. In order to improve the accuracy of quality monitoring, it is necessary to remove the reflective areas on the surface of the extruded aluminum profiles before quality monitoring. Therefore, how to accurately remove the reflective areas on the surface of the aluminum profiles has become the research focus of this invention.
[0004] The patent document with announcement number CN118122804B discloses a remote monitoring intelligent diagnosis aluminum profile extrusion device and control method. The method in the patent document mainly shows the fault diagnosis process of the aluminum profile extrusion device, and does not involve how to remove the reflective area. Therefore, the method in the patent document cannot solve the technical problem of the present invention. Summary of the Invention
[0005] In order to solve the problem of how to accurately remove the reflective area on the surface of aluminum profiles, the present invention provides a method and system for monitoring aluminum profile extrusion molding based on machine vision.
[0006] In a first aspect, the present invention provides a method for monitoring aluminum profile extrusion molding based on machine vision, which adopts the following technical solutions:
[0007] A machine vision-based aluminum profile extrusion monitoring method includes the following steps:
[0008] Capture images of finished aluminum extrusion products at several angles;
[0009] Take the finished product image at any angle as the reference image, match the finished product images at other angles with the reference image, obtain the pixel value set of each pixel in the reference image based on the pixel matching relationship, and fit the distribution model to the pixel value set; cluster the distribution model to obtain several categories, combine the categories of all pixels in the reference image to obtain several category combinations, and use the median of each category in the category combination as the pixel value of the corresponding pixel in the reference image to obtain an adjusted reference image based on the category combination; calculate the signal description capability , compare the edge pixels in the adjusted reference image with those in the structural design image, set the difference flag value of each edge pixel in the structural design image, and divide the pixels in the adjusted reference image into structural pixels and non-structural pixels according to the difference flag value. S represents the number of edge pixels in the structural design image with a difference flag value of 0. represents the gradient value of the i-th non-structure pixel in the adjusted reference image, N represents the number of non-structure pixels in the adjusted reference image, M represents the signal description ability of the adjusted reference image, and tanh() represents the hyperbolic tangent function; the adjusted reference image with the largest signal description ability is used as the first corrected image;
[0010] The category in the category combination corresponding to the first corrected image is recorded as the benchmark category; clustering processing is performed on the data in the benchmark category to obtain several subcategories, and the subcategories of all pixels in the benchmark image are combined to obtain several subcategory combinations. The median of each subcategory in the subcategory combination is used as the pixel value of the corresponding pixel in the benchmark image to obtain an adjusted benchmark image based on the subcategory combination; the signal description ability is calculated, and the adjusted benchmark image with the maximum signal description ability is used as the second corrected image; and so on, until the signal description ability converges, and the final corrected image is obtained;
[0011] Aluminum profile extrusion forming monitoring is achieved based on the final corrected image.
[0012] The present invention effectively removes the reflective area in the finished product image by selecting the pixel value with the least light interference from the pixel values of multiple angles, thereby providing a basis for subsequent accurate defect detection; further, when selecting the pixel value with the least light interference from the pixel values of multiple angles, the single pixel value is replaced by the category, thereby effectively reducing the number of pixel value combinations and effectively improving the analysis efficiency; further, when selecting the pixel value with the least light interference from the pixel values of multiple angles, the adjusted reference image obtained by each selected pixel value accurately describes the finished product information. The situation is analyzed, thereby accurately evaluating the pixel value selected each time, providing a basis for accurately selecting the pixel value with the least light interference; further, When analyzing whether the adjusted reference image obtained by each selected pixel value accurately describes the finished product information, the number of edge pixels with a difference flag value of 0 is introduced to accurately evaluate the completeness of the structural information that can be extracted by the adjusted reference image. At the same time, the gradient value of non-structural pixels is introduced to accurately evaluate the interference of light on the adjusted reference image, providing a basis for accurately evaluating the ability of the adjusted reference image to describe the finished product information. Furthermore, when selecting the pixel value with the least light interference from the pixel values at multiple angles, a layer-by-layer clustering analysis is performed to gradually narrow the positioning range of the pixel value with the least light interference, thereby selecting the pixel value with the least light interference more quickly and accurately.
[0013] Preferably, obtaining a pixel value set of each pixel in the reference image according to the matching relationship of the pixels and fitting a distribution model to the pixel value set includes:
[0014] Record any pixel in the reference image as the target pixel, obtain images containing the target pixel in the finished images at all other angles and record them as matching images, obtain pixels matching the target pixel in all matching images and record them as matching pixels, and take the set consisting of the target pixel and the pixel values of all matching pixels as the pixel value set of the target pixel;
[0015] The Gaussian model fitted to all pixel values in the pixel value set of the target pixel is recorded as the distribution model of the target pixel.
[0016] The present invention describes the distribution characteristics of pixel values corresponding to pixels at multiple angles by analyzing them, thereby providing a basis for subsequent accurate positioning of pixel values with the least light interference.
[0017] Preferably, combining the categories of all pixels in the reference image to obtain a plurality of category combinations, and using the median of each category in the category combination as the pixel value of the corresponding pixel in the reference image to obtain an adjusted reference image based on the category combination, includes:
[0018] Randomly select a category from all categories of each pixel in the reference image, combine the categories selected by all pixels in the reference image to obtain a category combination, and obtain all category combinations;
[0019] The median of all data of each category is obtained and recorded as the reference data of each category. The reference data of each category in any category combination is used as the pixel value of the corresponding pixel to obtain the adjusted reference image based on the category combination.
[0020] Preferably, comparing and analyzing the edge pixels in the adjusted reference image and the structural design image to set a difference flag value for each edge pixel in the structural design image includes:
[0021] Performing edge detection on the adjusted reference image to obtain an edge image, matching the edge image and the adjusted reference image with the structural design drawing respectively, and adjusting the edge image and the adjusted reference image to images having the same viewing angle and scale as the structural design drawing based on the matching results;
[0022] The edge pixels in the edge image after the viewing angle scale is adjusted are recorded as comparison pixels. The preset window of any edge pixel in the structural design diagram is obtained. It is determined whether there is a comparison pixel in the corresponding area of the edge image in the preset window of each edge pixel. If so, the difference flag value of the edge pixel in the structural design diagram is set to 1, otherwise the difference flag value is set to 0.
[0023] The present invention uses the structural design image as a comparison, accurately sets the difference flag value according to the difference between pixels, and provides a basis for accurately analyzing the information description capability.
[0024] Preferably, the step of dividing the pixels in the adjusted reference image into structural pixels and non-structural pixels according to the difference flag value comprises:
[0025] The pixels in the corresponding area of the preset window of each edge pixel in the adjusted reference image after the viewing angle scale is adjusted are recorded as structural pixels, otherwise they are recorded as non-structural pixels.
[0026] Preferably, the step of obtaining a preset window of any edge pixel in the structural design diagram includes:
[0027] In the structural design diagram, a window with a length of L obtained in a vertical direction of the edge line with the edge pixel as the center is recorded as the window of the edge pixel in the structural design diagram, where L represents a preset size.
[0028] Preferably, the step of: until the signal description capability converges includes:
[0029] The absolute value of the difference between the description capability of each signal and the previous signal description capability is calculated. If the absolute value of the difference is less than a preset difference threshold, the signal description capability is considered to have converged.
[0030] The present invention judges the convergence status by the absolute value of the difference, and the implementation method is relatively simple and has high implementation efficiency.
[0031] Preferably, the aluminum profile extrusion molding monitoring based on the final corrected image includes:
[0032] Performing edge detection on the final corrected image, if an edge pixel in the edge image of the final corrected image is a non-structural pixel, marking the edge pixel as a defective pixel;
[0033] If the number of defective pixels is greater than the preset number, an abnormality warning is issued.
[0034] In a second aspect, the present invention provides an aluminum profile extrusion molding monitoring system based on machine vision, which adopts the following technical solutions:
[0035] The aluminum profile extrusion forming monitoring system based on machine vision includes: a processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, the aluminum profile extrusion forming monitoring method based on machine vision is implemented.
[0036] By adopting the above technical solution, the above-mentioned machine vision-based aluminum profile extrusion molding monitoring method is generated into a computer program and stored in a memory to be loaded and executed by a processor, thereby making a terminal device based on the memory and the processor for easy use.
[0037] The present invention has the following technical effects:
[0038] The present invention effectively removes reflective areas from finished product images by selecting the pixel values with the least light interference from pixel values at multiple angles, providing a basis for subsequent accurate defect detection.
[0039] Furthermore, when selecting the pixel value with the least light interference from the pixel values at multiple angles, the single pixel value is replaced by the category, thereby effectively reducing the number of pixel value combinations and effectively improving the analysis efficiency;
[0040] Furthermore, when selecting the pixel value with the least light interference from the pixel values at multiple angles, the accuracy of the adjusted reference image obtained from each selected pixel value in describing the finished product information is analyzed, thereby accurately evaluating each selected pixel value and providing a basis for accurately selecting the pixel value with the least light interference;
[0041] Furthermore, when analyzing the accuracy of the adjusted reference image obtained from each selected pixel value in describing the finished product information, the number of edge pixels with a difference flag value of 0 is introduced to accurately assess the completeness of the structural information that can be extracted from the adjusted reference image. At the same time, the gradient value of non-structural pixels is also introduced to accurately assess the light interference of the adjusted reference image, providing a basis for accurately evaluating the ability of the adjusted reference image to describe the finished product information.
[0042] Furthermore, when selecting the pixel value with the least light interference from the pixel values at multiple angles, the positioning range of the pixel value with the least light interference is gradually narrowed through layer-by-layer clustering analysis, so that the pixel value with the least light interference can be selected faster and more accurately. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] By reading the detailed description below with reference to the accompanying drawings, the above and other objects, features and advantages of the exemplary embodiments of the present invention will become readily understood. In the accompanying drawings, several embodiments of the present invention are shown in an exemplary and non-limiting manner, and the same or corresponding numbers represent the same or corresponding parts.
[0044] Figure 1 The present invention is a flowchart of a method for monitoring aluminum profile extrusion molding based on machine vision in an embodiment of the present invention. DETAILED DESCRIPTION
[0045] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work shall fall within the scope of protection of the present invention.
[0046] It should be understood that when the terms "first," "second," and the like are used in the claims, description, and drawings of the present invention, they are merely used to distinguish between different objects, rather than to describe a specific order. The terms "comprise" and "comprising" used in the description and claims of the present invention indicate the presence of the described features, integers, steps, operations, elements, and / or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or combinations thereof.
[0047] The embodiment of the present invention discloses a method for monitoring aluminum profile extrusion molding based on machine vision, referring to Figure 1 , including steps S1 to S4:
[0048] S1: Capture images of finished aluminum extrusion products at several angles.
[0049] Specifically, images of the finished product formed by extrusion of the aluminum profile are collected at several angles and recorded as the finished product image at each angle.
[0050] S2: Using a finished product image at any angle as a reference image, matching finished product images at other angles with the reference image, obtaining a set of pixel values for each pixel in the reference image based on the pixel matching relationship, and fitting a distribution model to the pixel value set; clustering the distribution model to obtain several categories, combining the categories of all pixels in the reference image to obtain several category combinations, using the median of each category in the category combination as the pixel value of the corresponding pixel in the reference image to obtain an adjusted reference image based on the category combination; calculating the signal description capability; and using the adjusted reference image with the greatest signal description capability as the first corrected image.
[0051] It should be noted that the relative angle between the camera and the finished product is different, and the light reflected from the finished product into the camera is different. Therefore, the position of the reflective area in the finished product image at different angles is different. In other words, a location on the finished product may appear reflective at some angles but not at others. Therefore, non-reflective pixels can be extracted from the finished product image at some angles. Therefore, the reflective area can be removed based on this.
[0052] It should be further explained that it is still impossible to determine which angle's pixel information should be selected from multiple angles to effectively remove reflective information while better preserving the useful information of the finished product. Therefore, it is necessary to analyze the descriptive ability of the pixel information selected at each angle in order to select better pixel information.
[0053] S20: Using a finished product image at any angle as a reference image, matching finished product images at other angles with the reference image, obtaining a pixel value set of each pixel in the reference image based on the pixel matching relationship, and fitting a distribution model to the pixel value set.
[0054] It should be noted that since one position corresponds to pixel information at multiple angles, if the pixel information at all angles of each position is traversed and analyzed, a large number of combinations will appear, which will greatly increase the amount of calculation. For example, if one position corresponds to pixel values at 36 angles and there are 10,000 positions in total, there will be In order to improve the amount of calculation, we can first roughly classify the pixel information according to the distribution characteristics of the pixel information of all angles at a location, and combine the classification results, which will greatly reduce the number of combinations and thus reduce the amount of calculation. For example, the pixel values of 36 angles at a location are clustered into 3 categories, so there are only This combination method will greatly reduce the amount of calculation. First, obtain the distribution model of pixel values at all angles of a position.
[0055] Preferably, as an example, a finished product image at any angle is used as a reference image, and finished product images at other angles are matched with the reference image. A pixel value set of each pixel in the reference image is obtained based on the matching relationship of the pixels, and a distribution model is fitted to the pixel value set, including:
[0056] The finished image at any angle is used as the reference image, and the finished images at other angles are matched with the reference image. Any pixel in the reference image is recorded as the target pixel. The image containing the target pixel is obtained from the finished images at all other angles and recorded as the matching image. The pixels matching the target pixel in all matching images are recorded as matching pixels. The set consisting of the target pixel and the pixel values of all matching pixels is taken as the pixel value set of the target pixel.
[0057] A Gaussian model is fitted to all pixel values in the pixel value set of the target pixel, which is recorded as the distribution model of the target pixel; in the same way, the distribution model of each pixel in the reference image is obtained.
[0058] S21: Clustering the distribution model to obtain several categories, combining the categories of all pixels in the reference image to obtain several category combinations, and using the median of each category in the category combination as the pixel value of the corresponding pixel in the reference image to obtain an adjusted reference image based on the category combination.
[0059] Preferably, as an example, clustering is performed on the distribution model to obtain several categories, the categories of all pixels in the reference image are combined to obtain several category combinations, and the median of each category in the category combination is used as the pixel value of the corresponding pixel in the reference image to obtain an adjusted reference image based on the category combination, including:
[0060] The distribution model is clustered using the DBSCAN clustering algorithm to obtain several categories;
[0061] Randomly select a category from all categories of each pixel in the reference image, combine the categories selected by all pixels in the reference image to obtain a category combination, and obtain all category combinations in the same way;
[0062] The median of all data of each category is obtained and recorded as the reference data of each category. The reference data of each category in any category combination is used as the pixel value of the corresponding pixel to obtain the adjusted reference image based on the category combination.
[0063] It can be understood that clustering can effectively reduce the number of category combinations and also reduce the number of adjusted reference images, which will effectively improve computational efficiency.
[0064] S22: Computational signal description capability.
[0065] It should be noted that since the defect area is generally small, if there is no light interference, the pixel values at other positions except for the structural information of the finished product will be relatively small. At the same time, if there is no light interference, the structural information can be extracted more completely. Therefore, it can be judged based on this that the extracted pixel information is not affected by light and its ability to describe the finished product information.
[0066] Preferably, as an example, calculating the signal description capability includes:
[0067] Obtain the structural design drawings of the finished product of aluminum extrusion;
[0068] Edge detection is performed on the adjusted reference image to obtain an edge image, and the edge image and the adjusted reference image are matched with the structural design drawing respectively. Based on the matching results, the edge image and the adjusted reference image are adjusted to images with the same perspective and scale as the structural design drawing.
[0069] The edge pixels in the edge image after the view scale adjustment are recorded as comparison pixels, a preset window of any edge pixel in the structural design image is obtained, and it is determined whether there is a comparison pixel in the preset window of each edge pixel in the corresponding area of the edge image. If so, the difference flag value of the edge pixel in the structural design image is set to 1, otherwise the difference flag value is set to 0, and the pixels in the preset window of each edge pixel in the corresponding area of the adjusted reference image after the view scale adjustment are recorded as structural pixels, otherwise they are recorded as non-structural pixels;
[0070] The signal description capability satisfies the relationship:
[0071]
[0072] Among them, S represents the number of edge pixels with a difference flag value of 0 in the structural design diagram, represents the gradient value of the i-th non-structured pixel in the adjusted reference image after the view scale adjustment, N represents the number of non-structured pixels in the adjusted reference image after the view scale adjustment, M represents the signal description ability of the adjusted reference image, and tanh() represents the hyperbolic tangent function.
[0073] It is understandable that the number of edge pixels with a difference flag value of 0 in the structural design image reflects the amount of structural information missing in the adjusted baseline image. The pixel information extracted this time cannot effectively eliminate light interference and has a poor ability to describe the finished product information. It reflects the gradient information of non-structural pixels in the edge image. The larger the value, the more non-structural pixels with larger gradients exist in the edge image. The large gradient value is likely caused by light interference. Therefore, the pixel information extracted this time cannot effectively eliminate light interference, and the ability to describe the finished product information is poor.
[0074] It should be added that the methods for obtaining the preset window include:
[0075] In the structural design diagram, a window of length L is obtained in the perpendicular direction of the edge line with each edge pixel as the center, and is recorded as the window of each edge pixel in the structural design diagram, where L represents a preset size. This embodiment uses a preset size of 5 as an example, and other embodiments may use other values, which are not specifically limited in this embodiment.
[0076] S23: Using the adjusted reference image with the greatest signal description capability as the first corrected image.
[0077] Preferably, as an example, taking the adjusted reference image with the greatest signal description capability as the first corrected image includes:
[0078] An adjusted reference image with the greatest signal description capability is obtained from the adjusted reference images obtained from all category combinations as the first corrected image.
[0079] S3: Record the category in the category combination corresponding to the first corrected image as the benchmark category; cluster the data in the benchmark category to obtain several subcategories, combine the subcategories of all pixels in the benchmark image to obtain several subcategory combinations, and use the median of each subcategory in the subcategory combination as the pixel value of the corresponding pixel in the benchmark image to obtain an adjusted benchmark image based on the subcategory combination; calculate the signal description ability, and use the adjusted benchmark image with the largest signal description ability as the second corrected image; and so on, until the signal description ability converges, and the final corrected image is obtained.
[0080] It should be noted that the above process uses the median of a category to roughly reflect the situation where the category has the best pixel information. This only determines the approximate location of the best pixel information. Next, it is necessary to continue clustering analysis on the pixel values in the category, so as to locate the location of the best pixel information by gradually narrowing the scope.
[0081] S30: Record the category in the category combination corresponding to the first corrected image as the benchmark category; cluster the data in the benchmark category to obtain several subcategories, combine the subcategories of all pixels in the benchmark image to obtain several subcategory combinations, and use the median of each subcategory in the subcategory combination as the pixel value of the corresponding pixel in the benchmark image to obtain an adjusted benchmark image based on the subcategory combination.
[0082] Preferably, as an example, a category in the category combination corresponding to the first corrected image is recorded as a reference category; clustering is performed on the data in the reference category to obtain a plurality of subcategories; the subcategories of all pixels in the reference image are combined to obtain a plurality of subcategory combinations; the median of each subcategory in the subcategory combination is used as the pixel value of the corresponding pixel in the reference image to obtain an adjusted reference image based on the subcategory combination, including:
[0083] The category in the category combination corresponding to the first corrected image is recorded as the benchmark category; the DBSCAN algorithm is used to cluster the data in the benchmark category to obtain several subcategories.
[0084] Randomly select a subcategory from all subcategories of each pixel in the reference image, combine the subcategories selected from all pixels in the reference image to obtain a subcategory combination, and obtain all subcategory combinations in the same way;
[0085] The median of all data of each subcategory is obtained and recorded as the reference data of each subcategory. The reference data of each subcategory in any subcategory combination is used as the pixel value of the corresponding pixel to obtain the adjusted reference image based on the subcategory combination.
[0086] It is understandable that by further classifying the reference categories, the positioning range of the optimal pixel value can be further narrowed, and the positioning range can be narrowed step by step until the optimal pixel value is obtained.
[0087] S31: Calculate the signal description capability, and use the adjusted reference image with the maximum signal description capability as the second corrected image.
[0088] The signal description capability is calculated according to the method in step S22 , and the adjusted reference image with the maximum signal description capability is obtained from the adjusted reference images obtained from all sub-category combinations as the second corrected image.
[0089] S32: This process is deduced in this way until the signal description capability converges, and the final corrected image is obtained.
[0090] Preferably, as an example, the above process is deduced in this way until the signal description capability converges to obtain the final corrected image, including:
[0091] The absolute value of the difference between each signal description capability and the previous signal description capability is calculated. If the absolute value of the difference is less than a preset difference threshold, the signal description capability is considered to have converged. This embodiment uses a preset difference threshold of 0.01 as an example. Other embodiments may use other values and this embodiment does not specifically limit this.
[0092] The corrected image corresponding to the convergence of the signal description capability is taken as the final corrected image.
[0093] S4: Aluminum profile extrusion molding monitoring is achieved based on the final corrected image.
[0094] It should be noted that if the finished product has no defects, the non-structural pixels are relatively smooth. At the same time, the above process also eliminates the unevenness caused by light. Therefore, if the finished product has no defects, there will be no texture at the non-structural pixels in the final corrected image. If there is texture at the non-structural pixels in the final corrected image, it means that there are defects on the finished product, and defect detection can be performed based on this.
[0095] Preferably, as an example, the aluminum profile extrusion molding monitoring is implemented based on the final corrected image, including:
[0096] Performing edge detection on the final corrected image, if an edge pixel in the edge image of the final corrected image is a non-structural pixel, marking the edge pixel as a defective pixel;
[0097] If the number of defective pixels is greater than a preset number, an abnormal warning is issued, so that people can adjust the control parameters in time to prevent improper control parameter settings from causing more defective products. In this embodiment, the preset number is described as 10, and other embodiments may take other values. This embodiment does not impose any specific restrictions.
[0098] An embodiment of the present invention also discloses an aluminum profile extrusion forming monitoring system based on machine vision, including a processor and a memory, wherein the memory stores computer program instructions. When the computer program instructions are executed by the processor, the aluminum profile extrusion forming monitoring method based on machine vision according to the present invention is implemented.
[0099] The above system also includes other components well known to those skilled in the art, such as a communication bus and a communication interface. The configuration and functions of these components are known in the art and will not be described in detail here.
[0100] In the present invention, the aforementioned memory may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. For example, a computer-readable storage medium may be any suitable magnetic storage medium or magneto-optical storage medium, such as resistive random access memory, dynamic random access memory, static random access memory, enhanced dynamic random access memory, high bandwidth memory, hybrid memory cube, etc., or any other medium that can be used to store the required information and can be accessed by an application, module, or both. Any such computer storage medium may be part of, accessible to, or connectable to the device.
[0101] While several embodiments of the present invention have been shown and described herein, it will be apparent to those skilled in the art that such embodiments are provided by way of example only. Numerous modifications, variations, and alternatives will occur to those skilled in the art without departing from the concept and spirit of the present invention. It should be understood that various alternatives to the embodiments of the present invention described herein may be employed in practicing the present invention.
[0102] The above are all preferred embodiments of the present invention, and are not intended to limit the scope of protection of the present invention. Therefore, any equivalent changes made based on the structure, shape, and principle of the present invention should be included in the scope of protection of the present invention.
Claims
1. A machine vision-based aluminum profile extrusion molding monitoring method, characterized in that: Including steps: Capture images of finished aluminum extrusion products at several angles; Using a finished product image at any angle as a reference image, matching finished product images at other angles with the reference image, obtaining a set of pixel values for each pixel in the reference image based on the pixel matching relationship, and fitting a distribution model to the set of pixel values; clustering the distribution model to obtain several categories, combining the categories of all pixels in the reference image to obtain several category combinations, and using the median of each category in the category combination as the pixel value of the corresponding pixel in the reference image to obtain an adjusted reference image based on the category combination; Computational signal description capabilities , the edge image of the adjusted reference image is adjusted to an image with the same perspective and scale as the structural design drawing, and the edge pixels in the edge image after the perspective and scale are adjusted are recorded as comparison pixels. If the preset window of each edge pixel in the structural design drawing does not have a comparison pixel in the corresponding area of the edge image, the difference flag value is set to 0. The pixels in the adjusted reference image are divided into structural pixels and non-structural pixels according to the difference flag value. S represents the number of edge pixels in the structural design drawing with a difference flag value of 0. represents the gradient value of the i-th non-structure pixel in the adjusted reference image, N represents the number of non-structure pixels in the adjusted reference image, M represents the signal description ability of the adjusted reference image, and tanh() represents the hyperbolic tangent function; the adjusted reference image with the largest signal description ability is used as the first corrected image; Recording the category in the category combination corresponding to the first corrected image as the reference category; Clustering the data in the benchmark category to obtain several subcategories, combining the subcategories of all pixels in the benchmark image to obtain several subcategory combinations, and using the median of each subcategory in the subcategory combination as the pixel value of the corresponding pixel in the benchmark image to obtain an adjusted benchmark image based on the subcategory combination; Calculate the signal description capability and use the adjusted reference image with the maximum signal description capability as the second corrected image; and repeat this process until the signal description capability converges to obtain the final corrected image. Aluminum profile extrusion forming monitoring is achieved based on the final corrected image.
2. The method for monitoring aluminum profile extrusion molding based on machine vision according to claim 1, characterized in that: Obtaining a pixel value set of each pixel in the reference image according to the matching relationship of the pixels, and fitting a distribution model to the pixel value set, includes: Record any pixel in the reference image as the target pixel, obtain images containing the target pixel in the finished images at all other angles and record them as matching images, obtain pixels matching the target pixel in all matching images and record them as matching pixels, and take the set consisting of the target pixel and the pixel values of all matching pixels as the pixel value set of the target pixel; The Gaussian model fitted to all pixel values in the pixel value set of the target pixel is recorded as the distribution model of the target pixel.
3. The method for monitoring aluminum profile extrusion molding based on machine vision according to claim 1, characterized in that: Combining the categories of all pixels in the reference image to obtain a plurality of category combinations, and using the median of each category in the category combination as the pixel value of the corresponding pixel in the reference image to obtain an adjusted reference image based on the category combination, includes: Randomly select a category from all categories of each pixel in the reference image, combine the categories selected by all pixels in the reference image to obtain a category combination, and obtain all category combinations; The median of all data of each category is obtained and recorded as the reference data of each category. The reference data of each category in any category combination is used as the pixel value of the corresponding pixel to obtain the adjusted reference image based on the category combination.
4. The method for monitoring aluminum profile extrusion molding based on machine vision according to claim 1, characterized in that: The step of adjusting the edge image of the adjusted reference image to an image having the same viewing angle and scale as the structural design drawing, recording edge pixels in the edge image after the viewing angle and scale are adjusted as comparison pixels, and setting a difference flag value to 0 if a preset window of each edge pixel in the structural design drawing does not contain a comparison pixel in a corresponding area of the edge image, includes: Performing edge detection on the adjusted reference image to obtain an edge image, matching the edge image and the adjusted reference image with the structural design drawing respectively, and adjusting the edge image and the adjusted reference image to images having the same viewing angle and scale as the structural design drawing based on the matching results; The edge pixels in the edge image after the viewing angle scale is adjusted are recorded as comparison pixels. The preset window of any edge pixel in the structural design diagram is obtained. It is determined whether there is a comparison pixel in the corresponding area of the edge image in the preset window of each edge pixel. If so, the difference flag value of the edge pixel in the structural design diagram is set to 1, otherwise the difference flag value is set to 0.
5. The method for monitoring aluminum profile extrusion molding based on machine vision according to claim 4, characterized in that: The step of dividing the pixels in the adjusted reference image into structural pixels and non-structural pixels according to the difference flag value includes: The pixels in the corresponding area of the preset window of each edge pixel in the adjusted reference image after the viewing angle scale is adjusted are recorded as structural pixels, otherwise they are recorded as non-structural pixels.
6. The method for monitoring aluminum profile extrusion molding based on machine vision according to claim 5, characterized in that: The method of obtaining a preset window of any edge pixel in the structural design diagram includes: In the structural design diagram, a window with a length of L obtained in a vertical direction of the edge line with the edge pixel as the center is recorded as the window of the edge pixel in the structural design diagram, where L represents a preset size.
7. The method for monitoring aluminum profile extrusion molding based on machine vision according to claim 1, characterized in that: The step of converging the signal description capability includes: The absolute value of the difference between the description capability of each signal and the previous signal description capability is calculated. If the absolute value of the difference is less than a preset difference threshold, the signal description capability is considered to have converged.
8. The method for monitoring aluminum profile extrusion molding based on machine vision according to claim 5, characterized in that: The method of realizing aluminum profile extrusion forming monitoring based on the final corrected image includes: Performing edge detection on the final corrected image, if an edge pixel in the edge image of the final corrected image is a non-structural pixel, marking the edge pixel as a defective pixel; If the number of defective pixels is greater than the preset number, an abnormality warning is issued.
9. Aluminum profile extrusion molding monitoring system based on machine vision, characterized in that: include: A processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, the machine vision-based aluminum profile extrusion forming monitoring method according to any one of claims 1 to 8 is implemented.
Citation Information
Patent Citations
A remote monitoring intelligent diagnosis aluminum profile extrusion device and control method
CN118122804B
Titanium alloy furniture production quality monitoring system
CN116611748A
Phase correction method and system for structured light stripe contour projection
CN117589087A