Intelligent quality inspection and process optimization system based on machine vision
By introducing technical means such as light compensation units and image preprocessing into the intelligent quality inspection system, the problem of unstable performance of the system under different lighting conditions is solved, higher detection accuracy and stability are achieved, and the system's intelligence and automation adaptability are enhanced.
Patent Information
- Application Number
- CN202411662716.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-20
- Publication Date
- 2025-02-25
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing intelligent machine vision-based quality inspection system has unstable performance under different lighting conditions, affecting image quality and detection results.
An intelligent quality inspection and process optimization system including image acquisition, light compensation, image preprocessing, feature extraction, feature matching, difference analysis, quality evaluation, process adjustment recommendation and feedback execution units was designed. The system automatically adjusts the light intensity through the light compensation unit to ensure the consistency of image quality, and improves detection accuracy through steps such as image preprocessing, feature extraction and matching.
It improves the detection accuracy and stability of the system under different lighting conditions, reduces manual intervention, and enhances the intelligence and automation adaptability of the system.
Smart Images

Figure CN119515851A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of quality inspection, and in particular relates to an intelligent quality inspection and process optimization system based on machine vision. Background Art
[0002] In modern manufacturing, product quality control is an important part of ensuring production efficiency and customer satisfaction. Traditional manual quality inspection methods are not only time-consuming and labor-intensive, but also easily affected by subjective factors, making it difficult to meet the needs of large-scale production. In recent years, with the development of machine vision technology, intelligent quality inspection systems based on machine vision have gradually become the mainstream choice in the field of industrial quality inspection. Such systems usually include core steps such as image acquisition, image processing, feature extraction, and feature matching, and can automatically complete tasks such as product surface defect detection and dimensional measurement.
[0003] However, existing machine vision-based quality inspection systems often perform poorly when faced with different lighting conditions. Changes in lighting conditions can lead to unstable image quality, which in turn affects subsequent image processing and analysis processes. For example, in strong or weak light environments, images may be overexposed or underexposed, making feature point extraction difficult and reducing the system's detection accuracy and reliability. In addition, due to the lack of an effective lighting compensation mechanism, when lighting conditions in the production environment change, manual intervention is required to adjust equipment parameters, which not only increases the complexity of the operation, but also limits the flexibility and adaptability of the system. Summary of the invention
[0004] The purpose of the present invention is to provide an intelligent quality inspection and process optimization system based on machine vision, aiming to solve the problem of unstable performance of existing intelligent quality inspection systems based on machine vision under different lighting conditions, especially the impact of lighting changes on image quality and detection results.
[0005] To achieve the above purpose, the present invention adopts the following technical solution: an intelligent quality inspection and process optimization system based on machine vision, comprising:
[0006] An image acquisition unit, used to obtain image information of the product to be inspected under different lighting conditions;
[0007] An illumination compensation unit, connected to the image acquisition unit, for adjusting illumination intensity according to image information;
[0008] An image preprocessing unit, connected to the illumination compensation unit, is responsible for removing image noise and enhancing image contrast;
[0009] A feature extraction unit, which is connected to the image preprocessing unit and is used to extract product feature points from the preprocessed image;
[0010] A feature matching unit, connected to the feature extraction unit, for comparing the extracted product feature points with the standard template to find out the differences;
[0011] The difference analysis unit is located after the feature matching unit and is responsible for in-depth analysis of the difference points to determine whether there are quality problems;
[0012] A quality assessment unit, following the difference analysis unit, provides a product quality grade according to the analysis result;
[0013] A process adjustment suggestion unit, connected to the quality assessment unit, proposes specific process improvement measures based on the product quality level;
[0014] The feedback execution unit is used to receive information from the process adjustment suggestion unit, and convert the improvement suggestions into actual operation instructions, which are sent to the production line control system to achieve closed-loop control.
[0015] Preferably, the image acquisition unit comprises:
[0016] The dynamic exposure adjustment submodule is used to automatically adjust the camera exposure time according to the current lighting environment by calculating the exposure value E=I*t, where I represents the light intensity and t is the exposure time;
[0017] The automatic white balance correction submodule is connected to the dynamic exposure adjustment submodule, and uses the collected image data to calculate the average color value C=(R+G+B) / 3, where R, G, and B represent the average values of the red, green, and blue channels, respectively;
[0018] The high dynamic range synthesis submodule, which is immediately followed by the automatic white balance correction submodule, uses multiple images with different exposure settings and uses a synthesis algorithm to:
[0019] S=log(I1)+log(I2)+...+log(In), n represents the number of images, Ii represents the light intensity of the i-th image, and a high dynamic range image is generated.
[0020] Preferably, the illumination compensation unit comprises:
[0021] The image brightness analysis submodule is used to receive the image information from the image acquisition unit and calculate the average brightness of the image L_avg = ΣL(i,j) / N, where L(i,j) represents the brightness value of each pixel (i,j) in the image, and N is the total number of pixels in the image;
[0022] The illumination intensity adjustment submodule is connected to the image brightness analysis submodule, and adjusts the illumination intensity I of the light source according to the calculated average brightness L_avg, using the formula:
[0023] I_new = I_old*(L_target / L_avg), where I_old is the current light intensity and L_target is the target brightness value;
[0024] The feedback correction submodule is located after the light intensity adjustment submodule. It collects images again and recalculates the average brightness L_avg', compares the difference between L_avg' and L_target, and if |L_avg'-L_target|>ε, ε is a preset error threshold, the light intensity adjustment process is performed again until the difference between L_avg' and L_target is less than or equal to ε.
[0025] Preferably, the image preprocessing unit comprises:
[0026] The noise filter submodule is used to receive the image information from the illumination compensation unit and reduce the random noise by applying the median filter method. The calculation method is as follows: for each pixel P(i,j), a window W(i,j) around it is selected, and the window size is (2k+1)×(2k+1), and the median M(i,j) of all pixel values in the window is calculated, and the value of P(i,j) is replaced by M(i,j);
[0027] The contrast enhancement submodule is connected to the noise filtering submodule and uses a histogram equalization method to enhance the image contrast. The calculation formula is: for each gray level g in the original image, the cumulative distribution function CDF(g)=Σ_{i=0}^{g}n(i) / N is calculated, where n(i) is the number of times the gray level i appears, and N is the total number of pixels in the image. Then, the gray value g of each pixel is mapped to a new gray value g'=CDF(g)*(L-1), where L is the maximum gray level of the image.
[0028] The edge sharpening submodule is located after the contrast enhancement submodule and uses the Laplace operator to perform edge detection and sharpening processing on the image. The formula is:
[0029] L(x,y)=f(x+1,y)+f(x-1,y)+f(x,y+1)+f(x,y-1)-4f(x,y), where f(x,y) represents the pixel value at position (x,y) in the original image, L(x,y) represents the change in pixel value after being processed by the Laplace operator, and the final output pixel value is O(x,y)=f(x,y)+α*L(x,y), where α is the sharpening coefficient.
[0030] Preferably, the feature extraction unit comprises:
[0031] Corner detection submodule is used to identify potential corner positions from the preprocessed image by calculating the Harris corner response function R = det(M)-k(trace(M))^2, where M is the structure tensor, det(M) represents the determinant of the matrix M, trace(M) represents the trace of the matrix M, k is an empirical constant, and points with higher corner response values R are regarded as potential corners;
[0032] A feature descriptor generation submodule, connected to the corner detection submodule, constructs local regions around each detected corner point and calculates the gradient direction histograms within these regions to form a feature vector D = [d_1, d_2, ..., d_n], where d_i represents the sum of the gradient strengths in the i-th direction and n is the number of directions;
[0033] The feature point selection submodule is located after the feature descriptor generation submodule. Based on the stability and representativeness of the feature vector D, the most suitable point is selected as the final feature point. The selection process calculates the significance score S = ∑(d_i^2) of each feature point, where i ranges from 1 to n, and selects the point with a higher significance score as the feature point.
[0034] Preferably, the feature matching unit comprises:
[0035] The initial matching submodule is used to preliminarily match the product feature points provided by the feature extraction unit with the pre-stored standard template feature points, and to screen out matching pairs whose distance is less than a set threshold T by calculating the Euclidean distance D = sqrt(Σ(d_i-t_i)^2), where d_i represents the feature vector element of the product feature point and t_i represents the corresponding element of the standard template feature point;
[0036] The matching verification submodule is connected to the initial matching submodule and uses a random sample consistency method to verify the reliability of the matching pair. The specific steps are as follows: randomly select one pair from all matching pairs as the basis, construct a transformation relationship H, and then calculate the reprojection error E=|d'-H*t| of all other matching pairs under the transformation relationship H, where d' is the position of the product feature point after transformation, and t is the position of the standard template feature point. If E is less than the set error threshold E_t, it is considered that the matching pair meets the transformation relationship H. Repeat the above process multiple times and select the transformation relationship with the most support points as the final matching result.
[0037] The difference positioning submodule is located after the matching verification submodule, and calculates the position deviation V=dt between the product feature point and the standard template feature point according to the final matching result, so as to locate the defect or abnormal area of the product.
[0038] Preferably, the difference analysis unit comprises:
[0039] A difference quantization sub-module, which is used to receive the difference point data from the feature matching unit, calculate the deviation degree of each difference point, and adopt the absolute deviation value A = |V|, where V is the position deviation obtained from the feature matching unit, so as to quantify the severity of the difference point;
[0040] A classification decision sub-module, which is connected to the difference quantization sub-module, classifies the difference points as slight, medium or severe deviations according to the absolute deviation value A of the difference points. The classification rules are as follows: if A < A_min, it is classified as a slight deviation; if A_min ≤ A < A_max, it is classified as a medium deviation; if A ≥ A_max, it is classified as a severe deviation, where A_min and A_max are predefined thresholds;
[0041] A quality assessment sub-module, which is located after the classification decision sub-module, synthesizes the classification results of all difference points, and calculates the overall quality score Q = Σ(w_i * c_i) by means of weighted summation, where w_i is the weight of the i-th type of deviation and c_i is the number of this type of deviation, and judges whether there are quality problems in the product through the quality score Q.
[0042] Preferably, the quality assessment unit includes:
[0043] A score summary sub-module, which is used to receive the quality score Q from the difference analysis unit, summarize the quality scores of all difference points, and form the total quality score Q_total of the product = ΣQ_i, where Q_i is the quality score of the i-th difference point;
[0044] A grade division sub-module, which is connected to the score summary sub-module, divides the product into multiple quality grades according to the total quality score Q_total. The specific division rules are as follows: if Q_total < Q_pass, it is judged as a qualified product; if Q_pass ≤ Q_total < Q_alert, it is judged as a product that needs attention; if Q_total ≥ Q_alert, it is judged as a non-conforming product, where Q_pass and Q_alert are predefined quality standard thresholds;
[0045] A report generation sub-module, which is located after the grade division sub-module, automatically generates a quality report based on the quality grade to which the product belongs. The report includes the total quality score Q_total of the product, the quality grade to which it belongs, and the main quality problem points.
[0046] Preferably, the process adjustment suggestion unit includes:
[0047] A grade analysis sub-module, which is used to receive the product quality grade information from the quality assessment unit, and analyze the main factors leading to quality problems for different quality grades;
[0048] A measure generation submodule is connected to the grade analysis submodule and proposes corresponding process improvement measures according to the analysis results;
[0049] The implementation plan submodule is located after the measure generation submodule. Based on the proposed process improvement measures, a detailed implementation plan is formulated. The plan is formulated in accordance with the formula P=S(M, T, R), where P represents the implementation plan, M is the set of improvement measures, T is the schedule, and R is the resource allocation.
[0050] Preferably, the feedback execution unit comprises:
[0051] The instruction conversion submodule is used to receive the improvement measures from the process adjustment suggestion unit and convert the suggestions in text form into operation instructions that can be recognized by the production line control system. The conversion process follows the rule I = T (M), where I represents the operation instruction set, M is the improvement measure set, and T is the mapping function from text to instruction;
[0052] The operation planning submodule is connected to the instruction conversion submodule. According to the generated operation instruction set I and the current operation status of the production line, a detailed operation plan is formulated, including the execution sequence, the required time and the possible impact. The planning process uses the formula P=O(I,S), where P is the operation plan, I is the operation instruction set, and S is the current status of the production line;
[0053] The control signal generation submodule is located after the operation planning submodule, generates a specific control signal C according to the operation plan P, and sends it to the production line control system through the interface. The generation of the control signal follows the formula C=G(P), where G is the conversion function from the plan to the control signal.
[0054] Technical effects and advantages of the present invention: Compared with the prior art, the intelligent quality inspection and process optimization system based on machine vision proposed by the present invention has the following advantages:
[0055] By introducing an illumination compensation unit, the present invention can automatically adjust the illumination intensity under various illumination conditions to ensure that the quality of the acquired image is always in the best state. This improvement not only improves the effect of image preprocessing, but also enhances the accuracy of feature extraction and matching, and ultimately improves the detection accuracy and stability of the entire system. In addition, the addition of the illumination compensation unit reduces the need for manual intervention, making the system more intelligent and automated, and adaptable to a wider range of production environments. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] Figure 1 This is a block diagram of the intelligent quality inspection and process optimization system based on machine vision of the present invention. DETAILED DESCRIPTION
[0057] The following will be combined with the accompanying drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. The specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0058] The present invention provides an intelligent quality inspection and process optimization system based on machine vision, such as Figure 1 As shown, it includes image acquisition, illumination compensation, image preprocessing, feature extraction, feature matching, difference analysis, quality assessment, process adjustment suggestion and feedback execution unit.
[0059] By introducing an illumination compensation unit, the present invention can automatically adjust the illumination intensity under various illumination conditions to ensure that the quality of the acquired image is always in the best state. This improvement not only improves the effect of image preprocessing, but also enhances the accuracy of feature extraction and matching, and ultimately improves the detection accuracy and stability of the entire system. In addition, the addition of the illumination compensation unit reduces the need for manual intervention, making the system more intelligent and automated, and adaptable to a wider range of production environments.
[0060] Exemplarily, the image acquisition unit is used to obtain image information of the product to be inspected under different lighting conditions; the image acquisition unit further includes the following submodules:
[0061] The dynamic exposure adjustment submodule is used to automatically adjust the camera exposure time according to the current lighting environment, by calculating the exposure value E = I*t, where I represents the light intensity and t is the exposure time, to ensure that a clear image can be obtained under various lighting conditions;
[0062] The automatic white balance correction submodule is connected to the dynamic exposure adjustment submodule, and uses the collected image data to calculate the average color value C=(R+G+B) / 3, where R, G, and B represent the average values of the red, green, and blue channels, respectively, so as to adjust the color temperature of the image to make the color more realistic;
[0063] The high dynamic range synthesis submodule is immediately connected to the automatic white balance correction submodule, and uses a plurality of images with different exposure settings to generate a high dynamic range image through a synthesis algorithm S=log(I1)+log(I2)+...+log(In), where n represents the number of images and Ii represents the light intensity of the i-th image, thereby effectively improving the performance of dark and bright details.
[0064] Exemplarily, the illumination compensation unit is connected to the image acquisition unit and is used to adjust the illumination intensity according to the image information to ensure the consistency of image quality; the illumination compensation unit further includes the following submodules:
[0065] The image brightness analysis submodule is used to receive image information from the image acquisition unit and calculate the average brightness of the image L_avg = ΣL(i,j) / N, where L(i,j) represents the brightness value of each pixel (i,j) in the image, and N is the total number of pixels in the image. This step is to evaluate whether the current lighting conditions meet the imaging requirements;
[0066] The illumination intensity adjustment submodule is connected to the image brightness analysis submodule, and adjusts the illumination intensity I of the light source according to the calculated average brightness L_avg, using the formula I_new=I_old*(L_target / L_avg), where I_old is the current illumination intensity and L_target is the target brightness value, to ensure that the illumination conditions are consistent during each imaging;
[0067] The feedback correction submodule is located after the light intensity adjustment submodule. It collects images again and recalculates the average brightness L_avg', compares the difference between L_avg' and L_target, and if |L_avg'-L_target|>ε (ε is a preset error threshold), the light intensity adjustment process is performed again until the difference between L_avg' and L_target is less than or equal to ε, thereby ensuring the accuracy and stability of light compensation.
[0068] Exemplarily, the image preprocessing unit is connected after the illumination compensation unit and is responsible for removing image noise and enhancing image contrast to improve the accuracy of subsequent analysis; the image preprocessing unit further includes the following submodules:
[0069] The noise filter submodule is used to receive the image information from the illumination compensation unit and reduce the random noise by applying the median filter method. The specific calculation method is as follows: for each pixel P(i,j), a window W(i,j) around it is selected, and the window size is (2k+1)×(2k+1), and the median M(i,j) of all pixel values in the window is calculated, and the value of P(i,j) is replaced by M(i,j);
[0070] The contrast enhancement submodule is connected to the noise filtering submodule and uses a histogram equalization method to enhance the image contrast. The calculation formula is: for each gray level g in the original image, the cumulative distribution function CDF(g)=Σ_{i=0}^{g}n(i) / N is calculated, where n(i) is the number of times the gray level i appears, and N is the total number of pixels in the image. Then, the gray value g of each pixel is mapped to a new gray value g'=CDF(g)*(L-1), where L is the maximum gray level of the image.
[0071] The edge sharpening submodule is located after the contrast enhancement submodule and uses the Laplace operator to perform edge detection and sharpening processing on the image. The formula is: L(x,y)=f(x+1,y)+f(x-1,y)+f(x,y+1)+f(x,y-1)-4f(x,y), where f(x,y) represents the pixel value at the position (x,y) in the original image, L(x,y) represents the change in the pixel value after being processed by the Laplace operator, and the final output pixel value is O(x,y)=f(x,y)+α*L(x,y), and α is the sharpening coefficient.
[0072] Exemplarily, the feature extraction unit is connected to the image preprocessing unit and is used to extract product feature points from the preprocessed image; the feature extraction unit further includes the following submodules:
[0073] Corner detection submodule is used to identify potential corner positions from the preprocessed image by calculating the Harris corner response function R = det(M)-k(trace(M))^2, where M is the structure tensor, det(M) represents the determinant of the matrix M, trace(M) represents the trace of the matrix M, k is an empirical constant, and points with higher corner response values R are regarded as potential corners;
[0074] A feature descriptor generation submodule, connected to the corner detection submodule, constructs local regions around each detected corner point and calculates the gradient direction histograms within these regions to form a feature vector D = [d_1, d_2, ..., d_n], where d_i represents the sum of the gradient strengths in the i-th direction and n is the number of directions;
[0075] The feature point selection submodule is located after the feature descriptor generation submodule. It selects the most suitable points as the final feature points based on the stability and representativeness of the feature vector D. The selection process calculates the significance score S = ∑ (d_i^2) of each feature point, i from 1 to n, and selects points with higher significance scores as feature points to ensure that the selected feature points can accurately reflect the characteristics of the product.
[0076] Exemplarily, a feature matching unit is connected to the feature extraction unit for comparing the extracted product feature points with a standard template to find the difference points. The feature matching unit further includes the following sub-modules:
[0077] An initial matching sub-module is used to preliminarily match the product feature points provided by the feature extraction unit with the pre-stored standard template feature points. By calculating the Euclidean distance D = sqrt(Σ(d_i - t_i)^2), where d_i represents the feature vector element of the product feature point and t_i represents the corresponding element of the standard template feature point, the matching pairs with a distance lower than the set threshold T are screened out.
[0078] A matching verification sub-module is connected after the initial matching sub-module and uses the Random Sample Consensus (RANSAC) method to further verify the reliability of the matching pairs. The specific steps are as follows: Randomly select a pair from all the matching pairs as the basis to construct a transformation relationship H, and then calculate the reprojection error E = |d' - H * t| of the remaining all matching pairs under the transformation relationship H, where d' is the position of the product feature point after transformation and t is the position of the standard template feature point. If E is less than the set error threshold E_t, it is considered that the matching pair conforms to the transformation relationship H. Repeat the above process multiple times and select the transformation relationship with the most inliers as the final matching result.
[0079] A difference localization sub-module is located after the matching verification sub-module. According to the finally determined matching result, calculate the position deviation V = d - t between the product feature points and the standard template feature points, so as to accurately locate the defective or abnormal areas of the product.
[0080] Exemplarily, a difference analysis unit is located after the feature matching unit and is responsible for deeply analyzing the difference points to judge whether there are quality problems. The difference analysis unit further includes the following sub-modules:
[0081] A difference quantification sub-module is used to receive the difference point data from the feature matching unit, calculate the deviation degree of each difference point, and use the absolute deviation value A = |V|, where V is the position deviation obtained from the feature matching unit, to quantify the severity of the difference points.
[0082] A classification decision sub-module is connected to the difference quantification sub-module. Classify the difference points as minor, medium or severe deviations according to the absolute deviation value A of the difference points. The classification rules are as follows: If A < A_min, it is classified as a minor deviation; if A_min ≤ A < A_max, it is classified as a medium deviation; if A ≥ A_max, it is classified as a severe deviation, where A_min and A_max are predefined thresholds.
[0083] The quality assessment sub-module, located after the classification decision sub-module, synthesizes the classification results of all difference points, and calculates the overall quality score Q = Σ(w_i * c_i) by means of weighted summation, where w_i is the weight of the i-th type of deviation and c_i is the quantity of this type of deviation. The weight values increase according to the severity of the deviation, that is, the weight of minor deviations is the lowest and the weight of severe deviations is the highest. Whether there are quality problems with the product is judged by the quality score Q.
[0084] Exemplarily, the quality assessment unit, following the difference analysis unit, gives the product quality grade according to the analysis results; the quality assessment unit further includes the following sub-modules:
[0085] The score summary sub-module is used to receive the quality score Q from the difference analysis unit, summarize the quality scores of all difference points, and form the total quality score Q_total of the product = ΣQ_i, where Q_i is the quality score of the i-th difference point;
[0086] The grade division sub-module, connected to the score summary sub-module, divides the product into multiple quality grades according to the total quality score Q_total. The specific division rules are as follows: If Q_total < Q_pass, it is judged as a qualified product; if Q_pass ≤ Q_total < Q_alert, it is judged as a product that needs attention; if Q_total ≥ Q_alert, it is judged as a non-conforming product. Q_pass and Q_alert are pre-set quality standard thresholds;
[0087] The report generation sub-module, located after the grade division sub-module, automatically generates a quality report based on the quality grade to which the product belongs. The report includes the total quality score Q_total of the product, the quality grade to which it belongs, and the main quality problem points, and is provided to the operator for reference so that corresponding measures can be taken in time.
[0088] Exemplarily, the process adjustment suggestion unit, connected after the quality assessment unit, proposes specific process improvement measures based on the product quality grade; the process adjustment suggestion unit further includes the following sub-modules:
[0089] The grade analysis sub-module is used to receive the product quality grade information from the quality assessment unit, and analyze the main factors causing quality problems for different quality grades, such as material defects, insufficient processing accuracy, or equipment aging, etc.;
[0090] The measure generation submodule is connected to the grade analysis submodule, and proposes corresponding process improvement measures based on the analysis results. For example, for material defects, it is recommended to add a raw material inspection process; for insufficient processing accuracy, it is recommended to adjust machine tool parameters or replace tools; for aging equipment, it is recommended to regularly maintain or update equipment. Specific suggestions can be generated through the formula M = F (Q, F), where M represents a set of improvement measures, Q is the product quality grade, and F is a set of factors that cause quality problems;
[0091] The implementation plan submodule is located after the measure generation submodule. Based on the proposed process improvement measures, a detailed implementation plan is formulated, including but not limited to the improvement schedule, responsibility allocation, and expected effect evaluation. The plan is formulated according to the formula P = S (M, T, R), where P represents the implementation plan, M is the set of improvement measures, T is the schedule, and R is the resource allocation, to ensure that each improvement measure can be effectively implemented.
[0092] For example, the feedback execution unit, as the final link, receives information from the process adjustment suggestion unit, converts the improvement suggestions into actual operation instructions, and sends them to the production line control system to achieve closed-loop control. The feedback execution unit further includes the following submodules:
[0093] The instruction conversion submodule is used to receive specific improvement measures from the process adjustment suggestion unit and convert the text-based suggestions into operation instructions that can be recognized by the production line control system. The conversion process follows the rule I = T (M), where I represents the operation instruction set, M is the improvement measure set, and T is the mapping function from text to instruction, ensuring that each suggestion has a corresponding control instruction;
[0094] The operation planning submodule is connected to the instruction conversion submodule. It formulates a detailed operation plan based on the generated operation instruction set I and the current operation status of the production line, including the execution order, required time and possible impact. The planning process uses the formula P=O(I,S), where P is the operation plan, I is the operation instruction set, and S is the current status of the production line, to ensure the safety and efficiency of the operation;
[0095] The control signal generation submodule is located after the operation planning submodule. It generates a specific control signal C according to the operation plan P and sends it to the production line control system through the interface. The generation of the control signal follows the formula C=G(P), where G is the conversion function from the plan to the control signal, ensuring that the control signal can be accurately transmitted to each device on the production line to achieve effective implementation of improvement measures.
[0096] Finally, it should be noted that the above is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, it is still possible for those skilled in the art to modify the technical solutions described in the aforementioned embodiments or to make equivalent substitutions for some of the technical features therein. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. An intelligent quality inspection and process optimization system based on machine vision, characterized in that: include: An image acquisition unit, used to obtain image information of the product to be inspected under different lighting conditions; An illumination compensation unit, connected to the image acquisition unit, for adjusting illumination intensity according to image information; An image preprocessing unit, connected to the illumination compensation unit, is responsible for removing image noise and enhancing image contrast; A feature extraction unit, which is connected to the image preprocessing unit and is used to extract product feature points from the preprocessed image; A feature matching unit, connected to the feature extraction unit, for comparing the extracted product feature points with the standard template to find out the differences; The difference analysis unit is located after the feature matching unit and is responsible for in-depth analysis of the difference points to determine whether there are quality problems; A quality assessment unit, following the difference analysis unit, provides a product quality grade according to the analysis result; A process adjustment suggestion unit, connected to the quality assessment unit, proposes specific process improvement measures based on the product quality level; The feedback execution unit is used to receive information from the process adjustment suggestion unit, and convert the improvement suggestions into actual operation instructions, which are sent to the production line control system to achieve closed-loop control.
2. The intelligent quality inspection and process optimization system based on machine vision according to claim 1, characterized in that: The image acquisition unit comprises: The dynamic exposure adjustment submodule is used to automatically adjust the camera exposure time according to the current lighting environment by calculating the exposure value E=I*t, where I represents the light intensity and t is the exposure time; The automatic white balance correction submodule is connected to the dynamic exposure adjustment submodule, and uses the collected image data to calculate the average color value C=(R+G+B) / 3, where R, G, and B represent the average values of the red, green, and blue channels, respectively; The high dynamic range synthesis submodule, which is immediately followed by the automatic white balance correction submodule, uses multiple images with different exposure settings and uses a synthesis algorithm to: S=log(I1)+log(I2)+...+log(In), where n represents the number of images and Ii represents the illumination intensity of the i-th image, and a high dynamic range image is generated.
3. The intelligent quality inspection and process optimization system based on machine vision according to claim 2, characterized in that: The illumination compensation unit comprises: The image brightness analysis submodule is used to receive the image information from the image acquisition unit and calculate the average brightness of the image L_avg = ΣL(i,j) / N, where L(i,j) represents the brightness value of each pixel (i,j) in the image, and N is the total number of pixels in the image; The illumination intensity adjustment submodule is connected to the image brightness analysis submodule, and adjusts the illumination intensity I of the light source according to the calculated average brightness L_avg, using the formula: I_new=I_old*(L_target / L_avg), where I_old is the current light intensity and L_target is the target brightness value; The feedback correction submodule is located after the light intensity adjustment submodule. It collects images again and recalculates the average brightness L_avg', compares the difference between L_avg' and L_target, and if |L_avg'-L_target|>ε, ε is a preset error threshold, the light intensity adjustment process is performed again until the difference between L_avg' and L_target is less than or equal to ε.
4. The intelligent quality inspection and process optimization system based on machine vision according to claim 3, characterized in that: The image preprocessing unit comprises: The noise filter submodule is used to receive the image information from the illumination compensation unit and reduce the random noise by applying the median filter method. The calculation method is as follows: for each pixel P(i,j), a window W(i,j) around it is selected, and the window size is (2k+1)×(2k+1), and the median M(i,j) of all pixel values in the window is calculated, and the value of P(i,j) is replaced by M(i,j); The contrast enhancement submodule is connected to the noise filtering submodule and uses a histogram equalization method to enhance the image contrast. The calculation formula is: for each gray level g in the original image, the cumulative distribution function CDF(g)=Σ_{i=0}^{g}n(i) / N is calculated, where n(i) is the number of times the gray level i appears, and N is the total number of pixels in the image. Then, the gray value g of each pixel is mapped to a new gray value g'=CDF(g)*(L-1), where L is the maximum gray level of the image. The edge sharpening submodule is located after the contrast enhancement submodule and uses the Laplace operator to perform edge detection and sharpening processing on the image. The formula is: L(x,y)=f(x+1,y)+f(x-1,y)+f(x,y+1)+f(x,y-1)-4f(x,y), where f(x,y) represents the pixel value at position (x,y) in the original image, L(x,y) represents the change in pixel value after being processed by the Laplace operator, and the final output pixel value is O(x,y)=f(x,y)+α*L(x,y), where α is the sharpening coefficient.
5. The intelligent quality inspection and process optimization system based on machine vision according to claim 4, characterized in that: The feature extraction unit comprises: Corner detection submodule is used to identify potential corner positions from the preprocessed image by calculating the Harris corner response function R = det(M)-k(trace(M))^2, where M is the structure tensor, det(M) represents the determinant of the matrix M, trace(M) represents the trace of the matrix M, k is an empirical constant, and points with higher corner response values R are regarded as potential corners; A feature descriptor generation submodule, connected to the corner detection submodule, constructs local regions around each detected corner point and calculates the gradient direction histograms within these regions to form a feature vector D = [d_1, d_2, ..., d_n], where d_i represents the sum of the gradient strengths in the i-th direction and n is the number of directions; The feature point selection sub-module, located after the feature descriptor generation sub-module, selects the most suitable points as the final feature points based on the stability and representativeness of the feature vector D. The selection process calculates the significance score S = ∑(d_i^2) for each feature point, where i ranges from 1 to n, and selects the points with higher significance scores as feature points.
6. The intelligent quality inspection and process optimization system based on machine vision according to claim 5, characterized in that: The feature matching unit includes: The initial matching sub-module is used to preliminarily match the product feature points provided by the feature extraction unit with the pre-stored standard template feature points. By calculating the Euclidean distance D = sqrt(Σ(d_i - t_i)^2), where d_i represents the elements of the feature vector of the product feature point and t_i represents the corresponding elements of the standard template feature point, the matching pairs with distances lower than the set threshold T are screened out; The matching verification sub-module, connected after the initial matching sub-module, uses the random sample consensus method to verify the reliability of the matching pairs. The specific steps are as follows: Randomly select a pair from all the matching pairs as the basis to construct the transformation relationship H, and then calculate the reprojection error E = |d' - H * t| of the remaining all matching pairs under the transformation relationship H, where d' is the position of the product feature point after transformation and t is the position of the standard template feature point. If E is less than the set error threshold E_t, it is considered that this matching pair conforms to the transformation relationship H. Repeat the above process multiple times, and select the transformation relationship with the most support points as the final matching result; The difference localization sub-module, located after the matching verification sub-module, calculates the position deviation V = d - t between the product feature points and the standard template feature points according to the finally determined matching result, so as to locate the defective or abnormal area of the product.
7. The intelligent quality inspection and process optimization system based on machine vision according to claim 6, characterized in that: The difference analysis unit includes: The difference quantification sub-module is used to receive the difference point data from the feature matching unit, calculate the deviation degree of each difference point, and use the absolute deviation value A = |V|, where V is the position deviation obtained from the feature matching unit, to quantify the severity of the difference points; The classification decision sub-module, connected to the difference quantification sub-module, classifies the difference points into minor, medium or severe deviations according to the absolute deviation value A of the difference points. The classification rules are as follows: If A < A_min, it is classified as a minor deviation; if A_min ≤ A < A_max, it is classified as a medium deviation; if A ≥ A_max, it is classified as a severe deviation, where A_min and A_max are predefined thresholds; The quality assessment sub-module, located after the classification decision sub-module, comprehensively considers the classification results of all difference points, and calculates the overall quality score Q = Σ(w_i * c_i) in a weighted summation manner, where w_i is the weight of the i-th type of deviation and c_i is the number of this type of deviation. The quality of the product is judged by the quality score Q.
8. The intelligent quality inspection and process optimization system based on machine vision according to claim 7, characterized in that: The quality assessment unit includes: The score summary sub-module is used to receive the quality score Q from the difference analysis unit, summarize the quality scores of all difference points, and form the total quality score Q_total = ΣQ_i of the product, where Q_i is the quality score of the i-th difference point; The grade division sub-module, connected to the score summary sub-module, divides the products into multiple quality grades according to the total quality score Q_total. The specific division rules are as follows: If Q_total < Q_pass, it is determined as a qualified product; if Q_pass ≤ Q_total < Q_alert, it is determined as a product that needs attention; if Q_total ≥ Q_alert, it is determined as a non-conforming product. Q_pass and Q_alert are pre-set quality standard thresholds. The report generation sub-module, located after the grade division sub-module, automatically generates a quality report based on the quality grade of the product. The report includes the total quality score Q_total of the product, the quality grade it belongs to, and the main quality problem points.
9. The intelligent quality inspection and process optimization system based on machine vision according to claim 8, characterized in that: The process adjustment suggestion unit includes: The grade analysis sub-module, which is used to receive the product quality grade information from the quality assessment unit and analyze the main factors causing quality problems for different quality grades. The measure generation sub-module, connected to the grade analysis sub-module, proposes corresponding process improvement measures according to the analysis results. The implementation plan sub-module, located after the measure generation sub-module, formulates a detailed implementation plan based on the proposed process improvement measures. The formulation of the plan follows the formula P = S(M, T, R), where P represents the implementation plan, M is the set of improvement measures, T is the schedule, and R is the resource allocation.
10. The intelligent quality inspection and process optimization system based on machine vision according to claim 9, characterized in that: The feedback execution unit includes: The instruction conversion sub-module, which is used to receive the improvement measures from the process adjustment suggestion unit and convert the text-based suggestions into operation instructions recognizable by the production line control system. The conversion process follows the rule I = T(M), where I represents the set of operation instructions, M is the set of improvement measures, and T is the mapping function from text to instructions. The operation planning sub-module, connected to the instruction conversion sub-module, formulates a detailed operation plan according to the generated set of operation instructions I, combined with the current operating state of the production line, including the execution sequence, required time, and possible impacts. The planning process uses the formula P = O(I, S), where P is the operation plan, I is the set of operation instructions, and S is the current state of the production line. The control signal generation sub-module, located after the operation planning sub-module, generates a specific control signal C according to the operation plan P and sends it to the production line control system through the interface. The generation of the control signal follows the formula C = G(P), where G is the conversion function from the plan to the control signal.
Citation Information
Patent Citations
Image composition method based on high-dynamic range principle, device and mobile terminal
CN107454340A
Calibration method and device for multispectral camera
CN110166704A
Cable surface defect online detection method based on machine vision
CN111539935A
Light source parameter adjusting method based on artificial intelligence and visual perception
CN113567058A
Vehicle high-precision positioning method based on GPS and common navigation map
CN115717894A
Cited By
Detection method for 3D hard metal processing based on weighted calculation
CN119722665A
PCBA electronic assembly process parameter adjusting system
CN119960413A
High-speed lamination production line product quality detection system based on visual identification
CN120908199A