Image boundary recognition method for gravure coating

By introducing preset distance and effect evaluation models in image processing, adjusting the parameters of image boundary recognition, the problem of boundary extraction instability caused by too small grayscale difference between gravure and coating is solved, and higher recognition accuracy is achieved.

CN118052836BActive Publication Date: 2024-12-13TIMACO (BEIJING) IND TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202410097452.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-01-24
Publication Date
2024-12-13
Estimated Expiration
2044-01-24

AI Technical Summary

Technical Problem

In the prior art, due to the color difference of the material, the grayscale difference between the gravure and the coating is too small, resulting in unstable image boundary extraction, which makes it difficult to meet customer needs.

Method used

By introducing preset distances, training images are collected, and the effect evaluation model is constructed, and the preset distance is adjusted to expand the grayscale difference between gravure and coating, thereby improving the accuracy of image boundary recognition.

Benefits of technology

It effectively improves the accuracy of image boundary recognition, reduces size fluctuations, and meets customer needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118052836B_ABST
    Figure CN118052836B_ABST
Patent Text Reader

Abstract

The present invention provides a method for image boundary recognition of gravure coating, which relates to the field of image processing technology, including projecting a training image obtained by a linear camera in a measurement area to obtain gray value data; introducing a preset distance to select a target measurement position, and analyzing and comparing the grayscale of the training image based on the gray value data to obtain a training linear effect; constructing an effect evaluation model to determine the optimal preset distance for training linear effect evaluation; combining the optimal preset distance, performing image processing on the image to be processed taken by the camera to obtain boundary position information and realize boundary recognition. The training image is obtained by pre-feeding acquisition; the image boundary recognition is performed using the preset distance, and after the model is constructed to evaluate the image boundary recognition effect, the preset distance is adjusted based on the evaluation result and used as the optimal preset distance for subsequent image processing, thereby expanding the grayscale difference between the gravure and the coating, and effectively improving the accuracy of image boundary recognition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of image processing, and in particular to a method for recognizing image boundaries in gravure coating. Background Art

[0002] At present, due to the influence of material color difference, during the coating extraction process, the grayscale of the pole piece is usually 255, the coating grayscale is about 50, and the gravure grayscale is about 45. The difference between the gravure grayscale and the coating grayscale is only about 5. The grayscale difference is too small, resulting in unstable extraction boundaries, which is extremely prone to size fluctuations and difficult to meet customer needs.

[0003] Therefore, the present invention provides a method for identifying the boundary of a gravure coating image, which is used to introduce a preset distance L for image processing, thereby expanding the grayscale difference between the gravure and the coating, and facilitating boundary extraction. Summary of the invention

[0004] The present invention provides an image boundary recognition method for gravure coating, which is used to obtain a training image through pre-feeding acquisition; a preset distance is used for image boundary recognition, and a model is constructed to evaluate the image boundary recognition effect, and then the preset distance is adjusted based on the evaluation result and used as the optimal preset distance for subsequent image processing, thereby effectively improving the accuracy of image boundary recognition.

[0005] The present invention provides a method for identifying image boundaries of gravure coating, comprising:

[0006] Step 1: Use a linear camera installed at a specified position to shoot the pre-feed material to obtain a training image;

[0007] Step 2: Obtain and project the training image in the measurement area to obtain gray value data;

[0008] Step 3: introducing a preset distance to select a target measurement position, and performing grayscale analysis and comparison on the training image based on the grayscale value data to obtain a training linear effect;

[0009] Step 4: By combining the training images, an effect evaluation model is constructed to evaluate the training linear effect and determine the optimal preset distance;

[0010] Step 5: Based on the optimal preset distance, image processing is performed on the image to be processed taken by the camera to obtain boundary position information and realize boundary recognition.

[0011] Preferably, the designated position refers to the top of the machine roller, is perpendicular to the linear light source and is located on both sides of the preset collection point.

[0012] Preferably, acquiring and projecting a training image within the measurement area to obtain grayscale value data includes:

[0013] The shooting area is determined based on the shooting range of the linear camera, and the area of ​​the target area is obtained in combination with the pre-feeding information;

[0014] Determine the length and width of the measurement area according to the first area ratio of the target area to the shooting area, and then divide the measurement area by taking the center of the shooting area as the measurement center to obtain the measurement area;

[0015] The target area is calculated as follows:

[0016] ; In the formula, It is expressed as the target area; It is expressed as the effective ratio of pre-feed imaging; Expressed as uniform feed rate; It represents the shooting time interval of the i-th camera; It is indicated as the shooting area; Indicates possible invalid scales captured by the camera;

[0017] The training image in the measurement area is projected longitudinally to obtain an average grayscale value, which is output as grayscale value data.

[0018] Preferably, a preset distance is introduced to select a target measurement position, and grayscale analysis and comparison are performed on the training image based on the grayscale value data to obtain a training linear effect, including:

[0019] Select an initial position start from the measurement area, and select target measurement positions start+L and start-L according to a preset distance L;

[0020] Based on the gray value data, the gray values ​​of the target measurement positions start+L and start-L are compared to obtain a first comparison result;

[0021] Analyze the first comparison result to determine the change direction information of the current pixel position;

[0022] Obtaining the change direction information of each position point, and comparing and analyzing the change direction information of the previous point and the next point to obtain a first analysis result;

[0023] Perform edge calculation based on the first analysis result to obtain a first edge line;

[0024] Calculate the grayscale difference between the starting point of the current first edge line and the ending point of the previous first edge line. If the difference is less than the preset difference, merge the two and output them as the current first edge line and number them in sequence.

[0025] If the difference is not less than the preset difference, the current first edge line is numbered in sequence;

[0026] After processing all first edge lines, the starting point and the end point of the first edge line are obtained, the average value is taken and integrated to obtain the position array of the boundary;

[0027] Based on the acquired boundary position array, the area recognition information of the gravure and coating is obtained, and then output as a training linear effect.

[0028] Preferably, analyzing the first comparison result to determine the change direction information of the current pixel position includes:

[0029] According to the first comparison result, if the grayscale value of the target measurement position start+L is greater than the grayscale value of start-L, and the grayscale value difference between the two is greater than the preset difference threshold, it is determined that the current pixel position is in a whitening trend;

[0030] At this time, the position information of the current pixel position is marked as 255;

[0031] If the grayscale value difference between the two is not greater than the preset difference threshold, it is determined that the current pixel position has not changed;

[0032] At this time, the position information of the current pixel position is marked as 128;

[0033] If the grayscale value of the target measurement position start+L is not greater than the grayscale value of start-L, and the grayscale value difference between the two is greater than the preset difference threshold, it is determined that the current pixel position is darkening;

[0034] At this time, the position information of the current pixel position is marked as 0;

[0035] If the grayscale value difference between the two is not greater than the preset difference threshold, it is determined that the current pixel position has not changed;

[0036] At this time, the position information of the current pixel position is marked as 128.

[0037] Preferably, by combining the training images, an effect evaluation model is constructed to evaluate the training linear effect and determine the optimal preset distance, including:

[0038] Acquire actual boundary data of the training image, perform error analysis based on the training linear effect to obtain error data, and then construct an error curve;

[0039] Select the error evaluation index, and use the error data and error curve characteristics as input to train the model to obtain the effect evaluation model;

[0040] Using the effect evaluation model to obtain a boundary recognition evaluation coefficient of the training image;

[0041] The calculation formula of the boundary recognition evaluation coefficient is as follows:

[0042] ; Where P represents the boundary recognition evaluation coefficient; It is expressed as the average error value, where n represents the total number of error data; It is expressed as the number of error data that are opposite to the overall bias in the direction of the boundary position identified in training and the direction of the actual boundary position of the training image; It is expressed as the average value of the error data of the boundary position direction identified during training and the actual boundary position direction of the training image, which is opposite to the overall deviation; It is expressed as the influence weight on boundary recognition evaluation based on error sensitivity; It is expressed as the influence weight of error mutation on boundary recognition evaluation; It is represented as the error data corresponding to the g-th inflection point in the error curve; m is represented as the total number of inflection points in the error curve; Expressed as the slope of the error curve;

[0043] Determine the target correction function based on the boundary recognition evaluation coefficient, and then optimize the parameters in the target correction function to obtain the optimal parameters;

[0044] The optimal parameters are used to obtain the best correction parameters to adjust the preset distance L, and the best preset distance K=YL is obtained, wherein Y represents the target correction parameter.

[0045] Preferably, the target correction function is determined based on the boundary recognition evaluation index, and then the parameters in the target correction function are optimized to obtain the optimal parameters, including:

[0046] Establishing a target correction function based on the boundary recognition evaluation index and the first area ratio;

[0047] The calculation formula of the target correction function is as follows:

[0048] In the formula, It is represented as the target correction function; P is represented as the boundary recognition evaluation index; It is expressed as the total number of pixels in the concave recognition area in the training linear effect; It is expressed as the total number of pixels in the actual area of ​​the gravure; It is expressed as the first influencing parameter on target correction based on pixel error sensitivity; It is expressed as the first area ratio; Expressed as area ratio correction parameter; Represented as the loss factor for calculating the objective function;

[0049] Configure the initial conditions in the target optimization algorithm and set the end conditions of population iteration;

[0050] Generate population particles and initialize the population;

[0051] Randomly generate a initial parameter combinations in the initial definition domain, and use the objective correction function formula to obtain the initial value;

[0052] Acquire the possibility probability of the initial parameter combination based on the initial value, and select the initial parameter combination whose possibility probability is closest to the preset possibility probability as the key parameter combination;

[0053] If there is only a single key parameter combination, multi-dimensional sampling is performed on the key parameter combination to obtain a new parameter combination;

[0054] Otherwise, select the key parameter combination with large weights for multi-dimensional sampling to obtain a new parameter combination;

[0055] Using the objective correction function formula, obtain new values ​​of the new parameter combination;

[0056] After sorting the initial parameter combinations and the new parameter combinations from small to large according to the initial values ​​and the new solution values, the first a parameter combinations are extracted as the optimal parameter combinations for a new round of iteration until the population iteration end condition is met, and the current optimal solution, i.e., the optimal parameter combination, is output.

[0057] Preferably, in combination with the optimal preset distance, image processing is performed on the image to be processed taken by the camera to obtain boundary position information and realize boundary recognition, including:

[0058] Based on the initial position start and the optimal preset distance K, the target measurement positions start+K and start-K are selected;

[0059] Project the coating image captured by the linear camera in the measurement area to obtain the current gray value data;

[0060] Comparing the grayscale values ​​of the target measurement positions start+K and start-K to determine the change direction information of the coating image;

[0061] Based on the comparative analysis of the change direction information of the previous and next points, edge calculation is performed to obtain the current edge line;

[0062] After the current edge lines are merged and numbered to obtain numbered target edge lines, the starting point and the end point of the target edge lines are averaged and integrated to obtain a boundary position array, which is output as boundary position information to achieve boundary recognition.

[0063] Compared with the prior art, the beneficial effects of this application are as follows:

[0064] The training image is obtained through pre-feed acquisition; the image boundary is recognized using a preset distance, and a model is built to evaluate the image boundary recognition effect. Based on the evaluation result, the preset distance is adjusted and used as the optimal preset distance for subsequent image processing, thereby expanding the grayscale difference between the gravure and the coating, and effectively improving the accuracy of image boundary recognition.

[0065] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention can be realized and obtained by the structures particularly pointed out in the written description and the accompanying drawings.

[0066] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0067] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:

[0068] Figure 1 The figure is a flow chart of a method for identifying image boundaries of gravure coating in an embodiment of the present invention. DETAILED DESCRIPTION

[0069] The preferred embodiments of the present invention are described below in conjunction with the accompanying drawings. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present invention, and are not used to limit the present invention.

[0070] The embodiment of the present invention provides a method for identifying image boundaries of gravure coating, such as Figure 1 As shown, including:

[0071] Step 1: Use a linear camera installed at a specified position to shoot the pre-feed material to obtain a training image;

[0072] Step 2: Obtain and project the training image in the measurement area to obtain gray value data;

[0073] Step 3: introducing a preset distance to select a target measurement position, and performing grayscale analysis and comparison on the training image based on the grayscale value data to obtain a training linear effect;

[0074] Step 4: By combining the training images, an effect evaluation model is constructed to evaluate the training linear effect and determine the optimal preset distance;

[0075] Step 5: Based on the optimal preset distance, image processing is performed on the image to be processed taken by the linear camera to obtain boundary position information and realize boundary recognition.

[0076] In this embodiment, the designated position refers to the top of the machine roller, which is perpendicular to the linear light source and located on both sides of the preset collection point; the linear camera has a higher scanning frequency and resolution, and is usually selected based on the width, detection accuracy requirements and object movement speed; pre-feeding refers to the preset process of material for gravure coating; the training image refers to the image obtained by the linear camera taking pictures of the pre-feed.

[0077] In this embodiment, the measurement area refers to the effective measurement area obtained by drawing the camera shooting area; the gray value data is the average gray value data obtained by projecting the training image in the measurement area, which provides a data basis for identifying the boundary; the training linear effect refers to the position array of the boundary and the area identification information of the gravure and the coating, wherein the area identification information of the gravure includes the pixel position of the gravure, the change direction information and the gray value data; the area identification information of the coating includes the pixel position of the coating, the change direction information and the gray value data.

[0078] In this embodiment, the effect evaluation model is used to evaluate the effect of the image boundary recognition results; the optimal preset distance is the distance obtained after correcting the preset distance and optimizing the parameters, which is used for the highest image boundary recognition effect; the image to be processed refers to the image used for image boundary recognition; the boundary position information refers to the boundary position array.

[0079] The beneficial effects of the above technical solution are: obtaining a training image through pre-feed collection; using a preset distance for image boundary recognition, and building a model to evaluate the image boundary recognition effect, adjusting the preset distance based on the evaluation result and using it as the optimal preset distance for subsequent image processing, thereby expanding the grayscale difference between the gravure and the coating, and effectively improving the accuracy of image boundary recognition.

[0080] The embodiment of the present invention provides a method for image boundary recognition of gravure coating, which acquires and projects a training image in a measurement area to obtain gray value data, including:

[0081] The shooting area is determined based on the shooting range of the linear camera, and the area of ​​the target area is obtained in combination with the pre-feeding information;

[0082] Determine the length and width of the measurement area according to the first area ratio of the target area to the shooting area, and then divide the measurement area by taking the center of the shooting area as the measurement center to obtain the measurement area;

[0083] The target area is calculated as follows:

[0084] ; In the formula, It is expressed as the target area; It is expressed as the effective ratio of pre-feed imaging; Expressed as uniform feed rate; It represents the shooting time interval of the i-th camera; It is indicated as the shooting area; Indicates possible invalid scales captured by the camera;

[0085] The training image in the measurement area is projected longitudinally to obtain an average grayscale value, which is output as grayscale value data.

[0086] In this embodiment, the linear camera has a higher scanning frequency and resolution, and is usually selected based on the width, detection accuracy requirements, and object movement speed; the pre-feed information refers to the preset parameters of the material for the gravure coating process, such as feed speed and feed time.

[0087] In this embodiment, the area of ​​the target area is an effective measurement area calculated based on the shooting area and the pre-feeding information; the measurement area is an area divided by the length and width determined based on the first area ratio with the center of the shooting area as the measurement center, and the first area ratio refers to the ratio of the area of ​​the target area to the area of ​​the shooting area; the gray value data is the average gray value data obtained by projecting the training image in the measurement area, providing a data basis for identifying boundaries.

[0088] The beneficial effect of the above technical solution is: by drawing the measurement area based on the camera's shooting area and combining the pre-feed information as the effective area for subsequent image processing, the interference of external factors is effectively reduced, thereby ensuring the accuracy and authenticity of the grayscale value data extracted from the image.

[0089] The embodiment of the present invention provides an image boundary recognition method for gravure coating, which introduces a preset distance to select a target measurement position, and performs grayscale analysis and comparison on a training image based on the grayscale value data to obtain a training linear effect, including:

[0090] Select an initial position start from the measurement area, and select target measurement positions start+L and start-L according to a preset distance L;

[0091] Based on the gray value data, the gray values ​​of the target measurement positions start+L and start-L are compared to obtain a first comparison result;

[0092] Analyze the first comparison result to determine the change direction information of the current pixel position;

[0093] Obtaining the change direction information of each position point, and comparing and analyzing the change direction information of the previous point and the next point to obtain a first analysis result;

[0094] Perform edge calculation based on the first analysis result to obtain a first edge line;

[0095] Calculate the grayscale difference between the starting point of the current first edge line and the ending point of the previous first edge line. If the difference is less than the preset difference, merge the two and output them as the current first edge line and number them in sequence.

[0096] If the difference is not less than the preset difference, the current first edge line is numbered in sequence;

[0097] After processing all first edge lines, the starting point and the end point of the first edge line are obtained, the average value is taken and integrated to obtain the position array of the boundary;

[0098] Based on the acquired boundary position array, the area recognition information of the gravure and coating is obtained, and then output as a training linear effect.

[0099] In this embodiment, the preset distance L is set in advance; the first comparison result refers to the grayscale value comparison result of the target measurement position start+L and start-L; the change direction information includes whitening, darkening and no change; the first analysis result refers to the analysis result of whether the change direction information is consistent; the first edge line is obtained based on the position of the edge obtained by edge calculation of the first analysis result; the preset difference is determined in advance.

[0100] In this embodiment, for example, there are first side lines a1 and a2, wherein the grayscale difference between the end point of the first side line a1 and the starting point of the first side line a2 is less than a preset difference, and at this time, the first side line a2 is merged with the first side line a1 and then output as the first side line and numbered in sequence; the area identification information of the gravure includes the pixel position, change direction information and grayscale value data of the gravure; the area identification information of the coating includes the pixel position, change direction information and grayscale value data of the coating; the training linear effect refers to the position array of the boundary and the area identification information of the gravure and the coating.

[0101] The beneficial effect of the above technical solution is: by using the grayscale value data of the target measurement position selected based on the preset distance L for comparative analysis, the training linear effect can be obtained by finding the direction of image change, finding edges, comparing edges and determining the final boundary position, which provides data support for the evaluation of image boundary recognition effects and indirectly lays the foundation for adjusting the preset distance.

[0102] An embodiment of the present invention provides a method for identifying image boundaries of gravure coating, which analyzes the first comparison result to determine the change direction information of the current pixel position, including:

[0103] According to the first comparison result, if the grayscale value of the target measurement position start+L is greater than the grayscale value of start-L, and the grayscale value difference between the two is greater than the preset difference threshold, it is determined that the current pixel position is in a whitening trend;

[0104] At this time, the position information of the current pixel position is marked as 255;

[0105] If the grayscale value difference between the two is not greater than the preset difference threshold, it is determined that the current pixel position has not changed;

[0106] At this time, the position information of the current pixel position is marked as 128;

[0107] If the grayscale value of the target measurement position start+L is not greater than the grayscale value of start-L, and the grayscale value difference between the two is greater than the preset difference threshold, it is determined that the current pixel position is darkening;

[0108] At this time, the position information of the current pixel position is marked as 0;

[0109] If the grayscale value difference between the two is not greater than the preset difference threshold, it is determined that the current pixel position has not changed;

[0110] At this time, the position information of the current pixel position is marked as 128.

[0111] In this embodiment, the first comparison result refers to the gray value comparison result of the target measurement positions start+L and start-L; the preset difference threshold is determined in advance.

[0112] In this embodiment, for example, there is a target measurement position start+ 、start- , where start+ The gray value is greater than start- , and the grayscale value difference between the two is less than the preset difference threshold, it is determined that the current pixel position has not changed, and the position information of the current pixel position is marked as 128.

[0113] In this embodiment, for example, there is a target measurement position start+ 、start- , where start+ The gray value is less than start- and the grayscale value difference between the two is greater than the preset difference threshold, it is determined that the current pixel position is darkening, and the position information of the current pixel position is marked as 0.

[0114] The beneficial effect of the above technical solution is: by analyzing and comparing the gray value difference between the target measurement positions start+L and start-L according to the preset difference threshold, the image change direction information is determined to provide data basis for subsequent edge finding processing.

[0115] The embodiment of the present invention provides a method for recognizing image boundaries of gravure coating, which combines training images to construct an effect evaluation model to evaluate the training linear effect and determine the optimal preset distance, including:

[0116] Acquire actual boundary data of the training image, perform error analysis based on the training linear effect to obtain error data, and then construct an error curve;

[0117] Select the error evaluation index, and use the error data and error curve characteristics as input to train the model to obtain the effect evaluation model;

[0118] Using the effect evaluation model to obtain a boundary recognition evaluation coefficient of the training image;

[0119] The calculation formula of the boundary recognition evaluation coefficient is as follows:

[0120] ; Where P represents the boundary recognition evaluation coefficient; It is expressed as the average error value, where n represents the total number of error data; It is expressed as the number of error data that are opposite to the overall bias in the direction of the boundary position identified in training and the direction of the actual boundary position of the training image; It is expressed as the average value of the error data of the boundary position direction identified during training and the actual boundary position direction of the training image, which is opposite to the overall deviation; It is expressed as the influence weight on boundary recognition evaluation based on error sensitivity; It is expressed as the influence weight of error mutation on boundary recognition evaluation; It is represented as the error data corresponding to the g-th inflection point in the error curve; m is represented as the total number of inflection points in the error curve; Expressed as the slope of the error curve;

[0121] Determine the target correction function based on the boundary recognition evaluation coefficient, and then optimize the parameters in the target correction function to obtain the optimal parameters;

[0122] The optimal parameters are used to obtain the best correction parameters to adjust the preset distance L, and the best preset distance K=YL is obtained, wherein Y represents the target correction parameter.

[0123] In this embodiment, the actual boundary data refers to the actual boundary position array of the training image; the training linear effect refers to the boundary position array and the area identification information of the gravure and the coating; the error data refers to the difference data between the actual boundary position array and the boundary position array in the training linear effect; the error curve is a curve constructed with the error data as the Y-axis and the actual boundary pixel position point as the X-axis, which is used to intuitively describe the boundary recognition error effect of the training image.

[0124] In this embodiment, the error evaluation index is used to measure the degree of boundary recognition error of the training image, including the total number of error data, the average error value, etc.; the error curve characteristics are used to describe the changes in the error data, such as the rising and falling trends, the maximum or minimum values, the slope of the curve, etc.; the effect evaluation model is a model obtained by training error data and analyzing the error curve characteristics, and is used to evaluate the effect of the boundary recognition results of the image; the boundary recognition evaluation coefficient is used to indicate the accuracy of the boundary recognition of the image.

[0125] In this embodiment, the target correction function is a function constructed based on the boundary recognition evaluation index, which is used to correct the preset distance l to improve the accuracy of image boundary recognition; the optimal parameter is obtained by optimizing the parameters in the target correction function; the best correction parameter refers to the parameter for adjusting the preset distance calculated after optimizing the parameters in the target correction function.

[0126] The beneficial effects of the above technical solution are: by constructing an effect evaluation model, the boundary recognition effect of the training image is evaluated to obtain the corresponding boundary recognition evaluation index, thereby establishing a target correction function; after optimizing the parameters in the target correction function, the optimal correction parameters are obtained to adjust the preset distance L, and the optimal preset distance can be effectively obtained.

[0127] The embodiment of the present invention provides a method for image boundary recognition of gravure coating, which determines a target correction function based on a boundary recognition evaluation index, and then optimizes the parameters in the target correction function to obtain the optimal parameters, including:

[0128] Establishing a target correction function based on the boundary recognition evaluation index and the first area ratio;

[0129] The calculation formula of the target correction function is as follows:

[0130] In the formula, It is represented as the target correction function; P is represented as the boundary recognition evaluation index; It is expressed as the total number of pixels in the concave recognition area in the training linear effect; It is expressed as the total number of pixels in the actual area of ​​the gravure; It is expressed as the first influencing parameter on target correction based on pixel error sensitivity; It is expressed as the first area ratio; Expressed as area ratio correction parameter; Represented as the loss factor for calculating the objective function;

[0131] Configure the initial conditions in the target optimization algorithm and set the end conditions of population iteration;

[0132] Generate population particles and initialize the population;

[0133] Randomly generate a initial parameter combinations in the initial definition domain, and use the objective correction function formula to obtain the initial value;

[0134] Acquire the possibility probability of the initial parameter combination based on the initial value, and select the initial parameter combination whose possibility probability is closest to the preset possibility probability as the key parameter combination;

[0135] If there is only a single key parameter combination, multi-dimensional sampling is performed on the key parameter combination to obtain a new parameter combination;

[0136] Otherwise, select the key parameter combination with large weights for multi-dimensional sampling to obtain a new parameter combination;

[0137] Using the objective correction function formula, obtain new values ​​of the new parameter combination;

[0138] After sorting the initial parameter combinations and the new parameter combinations from small to large according to the initial values ​​and the new solution values, the first a parameter combinations are extracted as the optimal parameter combinations for a new round of iteration until the population iteration end condition is met, and the current optimal solution, i.e., the optimal parameter combination, is output.

[0139] In this embodiment, the boundary recognition evaluation coefficient is used to indicate the accuracy of the boundary recognition of the image; the first area ratio refers to the ratio of the target area area to the shooting area area; the target correction function is used to correct the preset distance L to improve the accuracy of the image boundary recognition.

[0140] In this embodiment, the target optimization algorithm refers to a population optimization algorithm; the initial conditions include the initial population number, the reinforcement factor, the domain, and the number of iterations; the population iteration end condition refers to the completion of the number of iterations or the target correction function value tending to a stable state; population initialization refers to initializing the particle position and speed; the initial parameter combination is composed of the initialized first influencing parameter and the area ratio correction parameter.

[0141] In this embodiment, the initial value is the function value calculated by substituting the initial parameter combination into the target correction function; the possibility probability refers to the probability that the initial parameter combination may be selected as the final parameter; the preset possibility probability is determined in advance; the key parameter combination is the initial parameter combination whose possibility probability is closest to the preset possibility probability, which is used for subsequent multi-dimensional sampling to obtain a new parameter combination, wherein the new parameter combination is a parameter combination obtained after multi-dimensional sampling of the key parameter combination using a weighted Gaussian kernel function.

[0142] In this embodiment, the new value refers to the function value obtained by substituting the new parameter combination into the target correction function calculation; the optimal parameter combination refers to the first a parameter combinations extracted after sorting the initial parameter combination and the new parameter combination from small to large; the current optimal solution refers to the solution obtained when the population iteration end condition is met, that is, the optimal parameter combination.

[0143] The beneficial effects of the above technical solution are: by establishing a target correction function based on the boundary recognition evaluation index; introducing a population optimization algorithm to optimize the parameters in the target correction function to obtain the optimal correction parameters, which are used to optimally adjust the preset distance L to obtain the optimal preset distance.

[0144] The embodiment of the present invention provides a method for recognizing image boundaries of gravure coating, which processes the image to be processed taken by the camera in combination with the optimal preset distance to obtain boundary position information and realize boundary recognition, including:

[0145] Based on the initial position start and the optimal preset distance K, the target measurement positions start+K and start-K are selected;

[0146] Project the coating image captured by the linear camera in the measurement area to obtain the current gray value data;

[0147] Comparing the grayscale values ​​of the target measurement positions start+K and start-K to determine the change direction information of the coating image;

[0148] Based on the comparative analysis of the change direction information of the previous and next points, edge calculation is performed to obtain the current edge line;

[0149] After the current edge lines are merged and numbered to obtain numbered target edge lines, the starting point and the end point of the target edge lines are averaged and integrated to obtain a boundary position array, which is output as boundary position information to achieve boundary recognition.

[0150] In this embodiment, the initial position start is a preset position within the measurement area; the optimal preset distance K is obtained by adjusting the preset distance L using the target correction function; the current grayscale value data refers to the average grayscale value obtained after projecting the image to be processed taken by the linear camera; the change direction information includes whitening, darkening and no change; the current edge line refers to the position of the edge obtained by edge calculation based on the comparative analysis of the change direction information of the front and rear points; the target edge line is the final result obtained after merging and numbering all current edge lines.

[0151] The beneficial effect of the above technical solution is: by introducing the optimal preset distance to process and analyze the image to be processed taken by the camera in the measurement area, the grayscale difference between the gravure and the coating is enlarged, and the accuracy of image boundary recognition is effectively improved.

[0152] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.

Claims

1. A method for identifying image boundaries of gravure coating, characterized in that: include: Step 1: Use a linear camera installed at a specified position to shoot the pre-feed material to obtain a training image; Step 2: Obtain the training image in the measurement area and project it to obtain gray value data; Step 3: introducing a preset distance to select a target measurement position, and performing grayscale analysis and comparison on the training image based on the grayscale value data to obtain a training linear effect; Step 4: By combining the training images, an effect evaluation model is constructed to evaluate the training linear effect and determine the optimal preset distance; Step 5: Based on the optimal preset distance, image processing is performed on the image to be processed taken by the camera to obtain boundary position information and realize boundary recognition; Wherein, step 3 comprises: Select an initial position start from the measurement area, and select target measurement positions start+L and start-L according to a preset distance L; Based on the gray value data, the gray values ​​of the target measurement positions start+L and start-L are compared to obtain a first comparison result; Analyze the first comparison result to determine the change direction information of the current pixel position; Obtaining the change direction information of each position point, and comparing and analyzing the change direction information of the previous point and the next point to obtain a first analysis result; Perform edge calculation based on the first analysis result to obtain a first edge line; Calculate the grayscale difference between the starting point of the current first edge line and the ending point of the previous first edge line. If the difference is less than the preset difference, merge the two and output them as the current first edge line and number them in sequence. If the difference is not less than the preset difference, the current first edge line is numbered in sequence; After processing all first edge lines, the starting point and the end point of the first edge line are obtained, the average value is taken and integrated to obtain the position array of the boundary; Based on the acquired boundary position array, the area recognition information of the gravure and coating is obtained, and then output as a training linear effect.

2. The image boundary recognition method for gravure coating according to claim 1, characterized in that: The designated position refers to the top of the machine roller, which is perpendicular to the linear light source and located on both sides of the preset collection point.

3. The image boundary recognition method for gravure coating according to claim 1, characterized in that: Obtain the training image in the measurement area and project it to obtain grayscale value data, including: The shooting area is determined based on the shooting range of the linear camera, and the area of ​​the target area is obtained in combination with the pre-feeding information; Determine the length and width of the measurement area according to the first area ratio of the target area to the shooting area, and then divide the measurement area by taking the center of the shooting area as the measurement center to obtain the measurement area; The target area is calculated as follows: ; In the formula, It is expressed as the target area; It is expressed as the effective ratio of pre-feed imaging; Expressed as uniform feed rate; It represents the shooting time interval of the i-th camera; It is indicated as the shooting area; Indicates possible invalid scales captured by the camera; The training image in the measurement area is projected longitudinally to obtain an average grayscale value, which is output as grayscale value data.

4. The image boundary recognition method for gravure coating according to claim 1, characterized in that: Analyzing the first comparison result to determine the change direction information of the current pixel position includes: According to the first comparison result, if the grayscale value of the target measurement position start+L is greater than the grayscale value of start-L, and the grayscale value difference between the two is greater than the preset difference threshold, it is determined that the current pixel position is in a whitening trend; At this time, the position information of the current pixel position is marked as 255; If the grayscale value difference between the two is not greater than the preset difference threshold, it is determined that the current pixel position has not changed; At this time, the position information of the current pixel position is marked as 128; If the grayscale value of the target measurement position start+L is not greater than the grayscale value of start-L, and the grayscale value difference between the two is greater than the preset difference threshold, it is determined that the current pixel position is darkening; At this time, the position information of the current pixel position is marked as 0; If the grayscale value difference between the two is not greater than the preset difference threshold, it is determined that the current pixel position has not changed; At this time, the position information of the current pixel position is marked as 128.

5. The image boundary recognition method for gravure coating according to claim 1, characterized in that: By combining the training images, an effect evaluation model is constructed to evaluate the training linear effect and determine the optimal preset distance, including: Acquire actual boundary data of the training image, perform error analysis based on the training linear effect to obtain error data, and then construct an error curve; Select the error evaluation index, and use the error data and error curve characteristics as input to train the model to obtain the effect evaluation model; Using the effect evaluation model to obtain a boundary recognition evaluation coefficient of the training image; The calculation formula of the boundary recognition evaluation coefficient is as follows: ; Where P represents the boundary recognition evaluation coefficient; It is expressed as the average error value, where n represents the total number of error data; It is expressed as the number of error data that are opposite to the overall bias in the direction of the boundary position identified in training and the direction of the actual boundary position of the training image; It is expressed as the average value of the error data of the boundary position direction identified during training and the actual boundary position direction of the training image, which is opposite to the overall deviation; It is expressed as the influence weight on boundary recognition evaluation based on error sensitivity; It is expressed as the influence weight of error mutation on boundary recognition evaluation; It is represented as the error data corresponding to the g-th inflection point in the error curve; m is represented as the total number of inflection points in the error curve; Expressed as the slope of the error curve; Determine the target correction function based on the boundary recognition evaluation coefficient, and then optimize the parameters in the target correction function to obtain the optimal parameters; The optimal parameters are used to obtain the best correction parameters to adjust the preset distance L, and the best preset distance K=YL is obtained, wherein Y represents the target correction parameter.

6. The image boundary recognition method for gravure coating according to claim 5, characterized in that: The target correction function is determined based on the boundary recognition evaluation coefficient, and then the parameters in the target correction function are optimized to obtain the optimal parameters, including: Establishing a target correction function based on the boundary recognition evaluation coefficient and the first area ratio; The calculation formula of the target correction function is as follows: In the formula, It is represented as the target correction function; P is represented as the boundary recognition evaluation coefficient; It is expressed as the total number of pixels in the concave recognition area in the training linear effect; It is expressed as the total number of pixels in the actual area of ​​the gravure; It is expressed as the first influencing parameter on target correction based on pixel error sensitivity; It is expressed as the first area ratio; Expressed as area ratio correction parameter; Represented as the loss factor for calculating the objective function; Configure the initial conditions in the target optimization algorithm and set the end conditions of population iteration; Generate population particles and initialize the population; Randomly generate a initial parameter combinations in the initial definition domain, and use the objective correction function formula to obtain the initial value; Acquire the possibility probability of the initial parameter combination based on the initial value, and select the initial parameter combination whose possibility probability is closest to the preset possibility probability as the key parameter combination; If there is only a single key parameter combination, multi-dimensional sampling is performed on the key parameter combination to obtain a new parameter combination; Otherwise, select the key parameter combination with large weights for multi-dimensional sampling to obtain a new parameter combination; Using the objective correction function formula, obtain new values ​​of the new parameter combination; After sorting the initial parameter combinations and the new parameter combinations from small to large according to the initial values ​​and the new solution values, the first a parameter combinations are extracted as the optimal parameter combinations for a new round of iteration until the population iteration end condition is met, and the current optimal solution, i.e., the optimal parameter combination, is output.

7. The image boundary recognition method for gravure coating according to claim 1, characterized in that: In combination with the optimal preset distance, image processing is performed on the image to be processed taken by the camera to obtain boundary position information and realize boundary recognition, including: Based on the initial position start and the optimal preset distance K, the target measurement positions start+K and start-K are selected; Project the coating image captured by the linear camera in the measurement area to obtain the current gray value data; Comparing the grayscale values ​​of the target measurement positions start+K and start-K to determine the change direction information of the coating image; Based on the comparative analysis of the change direction information of the previous and next points, edge calculation is performed to obtain the current edge line; After the current edge lines are merged and numbered to obtain numbered target edge lines, the starting point and the end point of the target edge lines are averaged and integrated to obtain a boundary position array, which is output as boundary position information to achieve boundary recognition.

Citation Information

Patent Citations

  • High-precision rapid graph detection and identification method

    CN112819772A

  • Farmland and tractor track boundary line extraction method and system

    CN116091951A

  • Device for processing a workpiece used in laser welding comprises a lens, an optical measuring system, a signal processing unit and a control unit

    DE102007027377A1

  • Device and method for detecting traveling path boundary

    JP2005165875A

  • Gravure coating apparatus

    JP2011206700A