A method and device for detecting the size of a coating die lip and a computer device
By using a CCD camera platform for real-time acquisition and autofocus technology, combined with a linear detection algorithm, the size of the coating die lip can be efficiently and accurately detected, solving the problems of insufficient detection efficiency and accuracy in existing technologies.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHENZHEN CHUANSI TECH CO LTD
- Filing Date
- 2023-02-08
- Publication Date
- 2026-06-26
Smart Images

Figure CN116336942B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of coating machine equipment technology, specifically to a method, apparatus, and computer equipment for detecting the lip size of a coating die. Background Technology
[0002] The coating die head is the core component of the coating machine. It achieves slit extrusion through the die head, and slit extrusion coating is a process in the lithium battery manufacturing process. Its working principle is to extrude the slurry through the slit of the die head at a certain flow rate and transfer it to the surface of the moving substrate. The width and consistency of the lip determine the accuracy and stability of the coating equipment.
[0003] Currently, most lip size inspections are conducted manually. This involves manually moving a CCD camera to select a limited number of inspection points on the lip of the coating die. The effectiveness of this inspection varies from person to person, and often requires the expertise of a specialist to determine product quality. Furthermore, the inspection results are only valid for a limited number of selected points, limiting the scope of inspection. Therefore, manual inspection is inefficient. Summary of the Invention
[0004] Therefore, the technical problem to be solved by the present invention is to overcome the low detection efficiency of lip size in the prior art, thereby providing a method, device and computer equipment for detecting the lip size of a coating die.
[0005] According to a first aspect, embodiments of the present invention provide a method for detecting the lip size of a coating die, comprising the following steps:
[0006] Real-time acquisition of lip and mouth images at various moving positions of the CCD camera platform;
[0007] Based on the moving step size of the CCD camera's Z-axis, the Z-axis position of the CCD camera is moved step by step to calculate the gradient value of the lip and mouth image at each moving position.
[0008] From the gradient values of the lip and mouth images at each moving position, determine the maximum gradient value that satisfies the preset accuracy, and focus the lip and mouth images at each moving position based on the Z-axis position corresponding to the maximum gradient value.
[0009] Pixel features are extracted from the lip and mouth images at each of the focused moving positions, and the lip and mouth edges are marked in the lip and mouth images at each of the moving positions based on the pixel features;
[0010] Based on a preset detection algorithm, the lip region within the lip edge is gradually detected to obtain a width size sequence set. The mean and variance of the width size sequence set are calculated to detect whether the lip size in the lip image at each moving position meets the requirements.
[0011] In one implementation, the step size based on the CCD camera's Z-axis movement, progressively moving the CCD camera's Z-axis position to calculate the gradient value of the lip and mouth image at each moved position, includes:
[0012] Determine the first preset step size of the moving CCD camera along the Z-axis;
[0013] Obtain the current Z-axis coordinates of the CCD camera;
[0014] Based on the first preset step size and the current coordinates, the current position of the CCD camera on the Z-axis is gradually moved to the first target position;
[0015] Gradually capture images of the lips and mouth corresponding to the first target location;
[0016] Based on each movement position and the first target position, the gradient value of the lip and mouth image corresponding to the first target position is calculated step by step;
[0017] The maximum gradient value is determined from the gradient values of the lip image corresponding to the first target position calculated step by step.
[0018] In one embodiment, the step-by-step movement of the CCD camera's Z-axis position based on the CCD camera's Z-axis movement step size to calculate the gradient value of the lip and mouth image at each movement position further includes:
[0019] The second preset step size is obtained by reducing the first preset step size by a preset ratio;
[0020] The Z-axis position corresponding to the maximum gradient value is taken as the starting position for Z-axis movement;
[0021] Based on the second preset step size and the starting position of the Z-axis movement, the starting position is gradually moved to the second target position;
[0022] Gradually capture images of the lips and mouth corresponding to the second target location;
[0023] Based on each movement position and the second target position, the gradient value of the lip and mouth image corresponding to the second target position is calculated step by step;
[0024] The maximum gradient value is determined from the gradient values of the lip image corresponding to the second target position.
[0025] In one embodiment, determining the maximum gradient value that satisfies a preset precision from the gradient values of the lip and mouth images at each moving position, and focusing the lip and mouth images at each moving position based on the Z-axis position corresponding to the maximum gradient value, includes:
[0026] Based on the maximum gradient value among the gradient values of the lip and mouth images corresponding to the first target position; or, based on the maximum gradient value among the gradient values of the lip and mouth images corresponding to the second target position; focus the lip and mouth images at each moving position.
[0027] In one embodiment, extracting pixel features from the lip and mouth images at each focused moving position, and calibrating the lip and mouth edges in the lip and mouth images at each moving position based on the pixel features, includes:
[0028] Determine the movement deviation position for each of the moving positions;
[0029] Each of the moving positions is taken as the first position, and the moving deviation position is taken as the second position;
[0030] Capture the lip and mouth image corresponding to the first position, and extract the first pixel feature;
[0031] Capture the lip image corresponding to the second position and extract the second pixel features;
[0032] Calculate the pixel calibration value based on the first position, the first pixel feature, the second position, and the second pixel feature;
[0033] Based on the pixel calibration values, the lip and mouth edges are calibrated in the lip and mouth images at each moving position.
[0034] In one implementation, a width dimension sequence set is obtained by progressively probing the lip region within the lip edge based on a preset detection algorithm, and the mean and variance of the width dimension sequence set are calculated to detect whether the lip dimensions in the lip images at each moving position meet the requirements, including:
[0035] Determine the target width dimension sequence set of lip images at each moving position of the CCD camera platform;
[0036] The lip and mouth images of the CCD camera platform at each moving position are preprocessed;
[0037] Using a straight-line detection method, the preprocessed lip and mouth images of the CCD camera platform at each moving position are detected sequentially according to the elements in the target width size sequence set. The elements corresponding to the successfully detected lip and mouth images of the CCD camera platform at each moving position are marked to form the actual width size sequence set.
[0038] After removing the maximum and minimum elements from the actual width size sequence set, calculate the mean of the remaining elements in the actual width size sequence set;
[0039] Based on the mean, calculate the variance of the actual width dimension sequence set;
[0040] Based on the mean and the variance, it is determined whether the lip and mouth dimensions in the lip and mouth images at each moving position meet the requirements.
[0041] In one implementation, the lip and mouth dimensions in the lip and mouth images at each moving position are organized into a sequence set, stored in a document, and the mean, maximum element, and minimum element of the sequence set are displayed.
[0042] According to a second aspect, embodiments of the present invention also provide a lip size detection device for a coating die, comprising the following modules:
[0043] The lip and mouth image acquisition module is used to acquire lip and mouth images in real time at various moving positions of the CCD camera platform;
[0044] The gradient value calculation module is used to gradually move the Z-axis position of the CCD camera based on the moving step size of the CCD camera's Z-axis, so as to calculate the gradient value of the lip image at each moving position.
[0045] The lip and mouth image focusing module is used to determine the maximum gradient value that meets the preset accuracy from the gradient values of the lip and mouth images at each moving position, and to focus the lip and mouth images at each moving position based on the Z-axis position corresponding to the maximum gradient value.
[0046] The lip and mouth edge calibration module is used to extract pixel features from the lip and mouth images at each moving position after focusing, and to calibrate the lip and mouth edges in the lip and mouth images at each moving position based on the pixel features;
[0047] The lip and mouth size detection module is used to progressively detect the lip and mouth region within the lip and mouth edge based on a preset detection algorithm to obtain a width size sequence set, and calculate the mean and variance of the width size sequence set to detect whether the lip and mouth size in the lip and mouth image at each moving position meets the requirements.
[0048] According to a third aspect, embodiments of the present invention also provide a computer-readable storage medium storing computer instructions for causing the computer to perform the lip size detection method for the coating die head as described in the first aspect or any embodiment of the first aspect.
[0049] According to a fourth aspect of the present invention, a computer device is also provided, comprising: a memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the computer instructions to perform the lip size detection method of the coating die head described in the first aspect or any embodiment of the first aspect.
[0050] The technical solution of this invention has the following advantages:
[0051] This invention discloses a method, apparatus, and computer equipment for detecting the lip size of a coating die. The method involves acquiring and preprocessing lip images from a CCD camera platform at various moving positions. Then, the lip images are precisely captured using autofocus. Next, the edges of the lip are obtained using edge calibration, and the edge positions are obtained using line detection. Finally, the mean and variance of the lip region are calculated to determine whether the lip size in the images at each moving position meets the requirements. The generated detection data files are archived and stored. This invention can detect the consistency of the die lip using machine vision, avoiding the misjudgment rate of manual inspection. It can also quickly detect large areas of test points, thus rapidly determining whether the lip size of the coating die is qualified. This significantly improves detection efficiency and accuracy, enhancing the promotion and application of lip size detection for coating dies. Attached Figure Description
[0052] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0053] Figure 1 A flowchart illustrating a specific example of a method for detecting the lip size of a coating die head in an embodiment of the present invention;
[0054] Figure 2 A flowchart illustrating another specific example of the lip size detection method for the coating die head in this embodiment of the invention;
[0055] Figure 3 A flowchart illustrating another specific example of the lip size detection method for the coating die head in this embodiment of the invention;
[0056] Figure 4 A flowchart illustrating another specific example of the lip size detection method for the coating die head in this embodiment of the invention;
[0057] Figure 5 This is a structural block diagram of the lip size detection device for the coating die head in an embodiment of the present invention;
[0058] Figure 6 This is a schematic diagram of the hardware structure of a computer device in an embodiment of the present invention. Detailed Implementation
[0059] The technical solution of the present invention will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0060] In the description of this invention, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are used only for the convenience of describing the invention and for simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.
[0061] In the description of this invention, it should be noted that, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; they can also refer to the internal connection of two components; and they can refer to a wireless connection or a wired connection. Those skilled in the art can understand the specific meaning of the above terms in this invention based on the specific circumstances.
[0062] Furthermore, the technical features involved in the different embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0063] This invention provides a method for detecting the lip size of a coating die, such as... Figure 1 As shown, it includes the following steps:
[0064] Step S11: Real-time acquisition of lip and mouth images at various moving positions of the CCD camera platform.
[0065] In a specific example, each movement position is a known position to be detected. For example: each movement position is P[P1,P2,…,P…]. n Mobile CCD camera platform to P1, P2...P n Real-time acquisition of lip and mouth images and formation of a continuous video stream are achieved for P1, P2...P n The recording of lip images at each moving position is achieved by moving the CCD camera platform at a constant speed to record the lip of the mold head in real time. The lip images mentioned above include the lip area of the coating mold head.
[0066] Step S12: Based on the moving step size of the CCD camera's Z-axis, gradually move the Z-axis position of the CCD camera to calculate the gradient value of the lip image at each moving position.
[0067] Gradually move the Z-axis position of the CCD camera to achieve automatic Z-axis focusing.
[0068] In one specific implementation, such as Figure 2 As shown, step S12 above involves gradually moving the CCD camera's Z-axis position based on the CCD camera's Z-axis movement step size to calculate the gradient value of the lip image at each moving position, including:
[0069] Step S21: Determine the first preset step size of the moving CCD camera's Z-axis.
[0070] For example: the first preset step size is step a Indicates, step a =, the first preset step size can be flexibly set as needed. For example: if a = 0.1, then the first preset step size is step. a =0.1.
[0071] Step S22: Obtain the current coordinates of the CCD camera's Z-axis.
[0072] For example: The current coordinates of the CCD camera's Z-axis are f0 = (x, y, z0).
[0073] Step S23: Based on the first preset step size and the current coordinates, gradually move the current position of the CCD camera Z-axis to the first target position.
[0074] For example: The first step of Z-axis movement is represented by step1, and the corresponding first target position is f1 = (x, y, z1), z1 = z0 + a. For example: The second step of Z-axis movement is represented by step2, and the corresponding first target position is f2 = (x, y, z2), z2 = z0 + 2a. For example: The third step of Z-axis movement is represented by step3, and the corresponding first target position is f2 = (x, y, z3), z3 = z0 + 3a.
[0075] Step S24: Gradually capture the lip and mouth images corresponding to the first target position.
[0076] For example: the first step of Z-axis movement is represented by step1, and the corresponding first target position is f1 = (x, y, z1), z1 = z0 + a. The image of the lips and mouth corresponding to this first target position is captured as T1. For example: the second step of Z-axis movement is represented by step2, and the corresponding first target position is f2 = (x, y, z2), z2 = z0 + 2a. The image of the lips and mouth corresponding to this first target position is captured as T2. For example: the second step of Z-axis movement is represented by step3, and the corresponding first target position is f3 = (x, y, z3), z3 = z0 + 3a. The image of the lips and mouth corresponding to this first target position is captured as T3.
[0077] Step S25: Based on each moving position and the first target position, calculate the gradient value of the lip image corresponding to the first target position step by step.
[0078] Step S26: Determine the maximum gradient value from the gradient values of the lip image corresponding to the first target position calculated step by step.
[0079] In a specific example, the gradient values of the lip and mouth images T1, T2, and T3 corresponding to the first target position are calculated step by step. From the gradient values of the lip and mouth images corresponding to the first target position calculated step by step, the maximum gradient value is determined by the following formula:
[0080] max S zi =F(z) i );
[0081]
[0082] Among them, F(z) i Let f(x,y) be the gradient value of the lip image corresponding to the first target position, and let f(x,y) be the two-dimensional coordinates of the first target position in the plane. zi This is the maximum gradient value.
[0083] Specifically, when the CCD camera platform moves to position P1, the Z-axis moves in step 1. Based on the first target position f1 = (x, y, z1), an image is extracted from the lip and mouth image at position P1, and the corresponding gradient value is calculated using the above formula, denoted as Z(z1, F(z1)). When the CCD camera platform moves to position P1, the Z-axis moves in step 2. Based on the first target position f2 = (x, y, z2), another image is extracted from the lip and mouth image at position P1, and the corresponding gradient value is calculated using the above formula, denoted as Z(z2, F(z2)). When the CCD camera platform moves to position P1, the Z-axis moves in step 3. Based on the first target position f3 = (x, y, z3), another image is extracted from the lip and mouth image at position P1, and the corresponding gradient value is calculated using the above formula, denoted as Z(z3, F(z3)). Select the largest F(z1,F(z1)), Z(z2,F(z2)), and Z(z3,F(z3)) from Z(z1,F(z1)), Z(z2,F(z2)), and Z(z3,F(z3)). i The gradient value corresponding to ).
[0084] Similarly, when the CCD camera platform moves to positions P2 and P3, the maximum gradient values corresponding to positions P2 and P3 are determined in the same way as described above. By executing steps S21-S26, in order to enhance the focusing accuracy of the lip and mouth images at each moving position of the CCD camera platform, the purpose of accurately detecting the measurement size of the lip and mouth images can be achieved.
[0085] In another specific implementation, such as Figure 3 As shown, step S12 above, which involves gradually moving the CCD camera's Z-axis position based on the CCD camera's Z-axis movement step size to calculate the gradient value of the lip image at each moving position, also includes:
[0086] Step S31: Reduce the first preset step size according to the preset ratio to obtain the second preset step size.
[0087] Specifically, the preset ratio can be flexibly set as needed. For example, the preset ratio can be represented by c, which can be 1 / 2 or 1 / 10; for example, the second preset step size can be represented by step. b Indicates, step b =step a / c; when c = 1 / 2, step b =step a / 2, and step a If the value is 0.1, then step b =0.1 / 2=0.05.
[0088] Step S32: Take the Z-axis position corresponding to the maximum gradient value as the starting position for Z-axis movement.
[0089] For example: through step S26 above, the maximum gradient value is determined as the second step of the Z-axis movement, step2, and the first target position is f2 = (x, y, z2). At this time, the coordinates of f2 are taken as the starting position f of the Z-axis movement in this embodiment. 10 .
[0090] Step S33: Based on the second preset step size and the starting position of the Z-axis movement, gradually move the starting position to the second target position.
[0091] For example: the first step of Z-axis movement is called step. 11 This indicates that the corresponding second target position is f. 11 = (x, y, z) 11 ),z 11 =z 10 + / 2, the image of the lips and mouth corresponding to the location of the second target is captured as T. 11 For example: the second step of Z-axis movement uses step. 12 This indicates that the corresponding second target position is f. 12 = (x, y, z) 12 ),z 12 =z 10 +, the image of the lips and mouth corresponding to the location of the second target is T. 12 For example: the second step of Z-axis movement uses step. 13 This indicates that the corresponding second target position is f. 13 = (x, y, z) 13 ),z 13 =z 10 +3 / 2, the image of the lips and mouth corresponding to the location of the second target is captured as T. 13 .
[0092] Step S34: Gradually capture images of the lips and mouth corresponding to the second target position.
[0093] For example: the first step of Z-axis movement is called step. 11 This indicates that the corresponding second target position is f. 11 =(x,y,z1),z 11 =z 10 + / 2, the image of the lips and mouth corresponding to the location of the second target is captured as T. 11 For example: the second step of Z-axis movement uses step. 12 This indicates that the corresponding second target position is f. 12 = (x, y, z) 12 ),z 12 =z 10 +, the image of the lips and mouth corresponding to the location of the second target is T. 12For example, the second step of Z-axis movement is represented by step3, and the corresponding second target position is f. 13 = (x, y, z) 13 ),z 13 =z 10 +3 / 2, the image of the lips and mouth corresponding to the location of the second target is captured as T. 13 .
[0094] Step S35: Based on each moving position and the second target position, calculate the gradient value of the lip image corresponding to the second target position step by step.
[0095] Step S36: Determine the maximum gradient value from the gradient values of the lip image corresponding to the second target position.
[0096] The maximum gradient value in this embodiment is calculated step by step, similar to step S26 described above. Specifically, when the CCD camera platform moves to position P1, the Z-axis moves in the second step. 11 Based on the second target position f 11 = (x, y, z) 11 Extract an image from the lip image at position P1, and calculate the corresponding gradient value using the formula above, denoted as Z(z). 11 ,F(z 11 When the CCD camera platform moves to position P1, the Z-axis movement begins in the second step. 12 Based on the second target position f 12 = (x, y, z) 12 Extract another image from the lip image at position P1, and calculate the corresponding gradient value using the formula above, denoted as Z(z). 12 ,F(z 12 When the CCD camera platform moves to position P1, the third step of the Z-axis movement begins. 13 Based on the second target position f 13 = (x, y, z) 13 Extract another image from the lip image at position P1, and calculate the corresponding gradient value using the formula above, denoted as Z(z). 13 ,F(z 13 From Z(z) 11 ,F(z 11 )), Z(z 12 ,F(z 12 )), Z(z 13 ,F(z 13 Select the largest F(z) from )) ii The gradient value corresponding to ).
[0097] Similarly, when the CCD camera platform moves to positions P2 and P3, the maximum gradient values corresponding to positions P2 and P3 are determined in the same way as described above. By executing steps S31-S36, based on steps S21-S26, the focusing accuracy of the lip and mouth images at each moving position of the CCD camera platform is further enhanced, achieving the goal of detecting the measurement size of the lip and mouth images with greater precision.
[0098] Step S13: Determine the maximum gradient value that meets the preset accuracy from the gradient values of the lip and mouth images at each moving position, and focus the lip and mouth images at each moving position based on the Z-axis position corresponding to the maximum gradient value.
[0099] In one specific implementation, step S13 above, which involves determining the maximum gradient value that satisfies a preset precision from the gradient values of the lip and mouth images at each moving position, and focusing the lip and mouth images at each moving position based on the Z-axis position corresponding to the maximum gradient value, includes:
[0100] Focus on the lip and mouth images at each moving position based on the maximum gradient value among the gradient values of the lip and mouth images corresponding to the first target position; or, based on the maximum gradient value among the gradient values of the lip and mouth images corresponding to the second target position.
[0101] Specifically, by executing the above steps S21-S26, and / or steps S21-S26 and S31-S36, the minimum precision (the precision that makes the image clear enough) is satisfied to achieve automatic focusing of the lip and mouth image at each moving position, thereby achieving the purpose of accurately detecting the lip and mouth size of the lip and mouth image.
[0102] Step S14: Extract pixel features from the lip and mouth images at each moving position after focusing, and mark the lip and mouth edges in the lip and mouth images at each moving position based on the pixel features.
[0103] Specifically, the pixel feature is the pixel position of the lip image at each moving position.
[0104] In one specific implementation, such as Figure 4 As shown, step S14 above, which extracts pixel features from the lip and mouth images at each moving position after focusing, and marks the lip and mouth edges in the lip and mouth images at each moving position based on the pixel features, includes:
[0105] Step S41: Determine the movement deviation position of each moving position.
[0106] For example: if each movement position is P1, its movement deviation position is P. 11 For example: if the moving position is P2, its moving deviation position is P. 21For example: if the moving position is P3, its moving deviation position is P. 31 .
[0107] Step S42: Take each moving position as the first position and the moving deviation position as the second position.
[0108] For example: Taking P1 as the first position, P... 11 As the second position; for example: taking P2 as the first position, and P 21 As the second position; for example: taking P3 as the first position, P 31 As the second position.
[0109] Step S43: Capture the lip image corresponding to the first position and extract the first pixel feature.
[0110] For example, when the CCD camera platform moves to position P1, the Z-axis moves by one step (step1). Based on the first target position f1 = (x, y, z1), an image is extracted from the lip image at position P1, and the first pixel feature C1(m1, n1) is extracted from this image. The extraction of the first pixel features at positions P2 and P3 is similar and will not be described in detail here.
[0111] Step S44: Capture the lip image corresponding to the second position and extract the second pixel features.
[0112] For example: displacement deviation position P 11 At (x1+, y1, z1), capture the corresponding lip and mouth image, and extract the second pixel feature C2(m2, n2). Capturing the position of the shift between P2 and P3, and extracting the corresponding second pixel feature, is similar and will not be elaborated further here.
[0113] Step S45: Calculate the pixel calibration value based on the first position, the first pixel feature, the second position, and the second pixel feature.
[0114] In one specific implementation, the pixel calibration value is calculated using the following formula:
[0115]
[0116] Among them, R xy The pixel calibration value, that is, the ratio of pixels to millimeters, P1 and P2 11 The difference between P1 and C2 is in millimeters, and the difference between V1 and C2 is also in millimeters. Using the above formula P1, P 11 The mapping relationship between V1 and V2 is necessary for successfully calibrating the lip edge.
[0117] Step S46: Based on pixel calibration values, calibrate the lip and mouth edges in the lip and mouth images at each moving position.
[0118] Performing steps S41-S46 above is also for the purpose of accurately detecting the lip size in the lip image at each moving position.
[0119] Step S15: Based on the preset detection algorithm, gradually detect the lip and mouth region within the lip and mouth edge to obtain a width size sequence set, and calculate the mean and variance of the width size sequence set to detect whether the lip and mouth size in the lip and mouth image at each moving position meets the requirements.
[0120] In one specific implementation, such as Figure 4 As shown, step S15 above involves progressively detecting the lip and mouth region within the lip and mouth edge using a preset detection algorithm to obtain a width size sequence set, and calculating the mean and variance of the width size sequence set to check whether the lip and mouth size in the lip and mouth image at each moving position meets the requirements, including:
[0121] Step S41: Determine the target width dimension sequence set of the lip image at each moving position of the CCD camera platform.
[0122] For example: For a moving position P1, extract an image from the lip and mouth image at position P1, and set the target width dimension to be measured for this image to be [a1, a2, ..., a n ], which is the target width dimension sequence set mentioned above.
[0123] Step S42: Preprocess the lip images of the CCD camera platform at each moving position.
[0124] Step S43: Using a straight-line detection method, the preprocessed lip images of the CCD camera platform at each moving position are detected one by one according to the elements in the target width size sequence set, and the elements corresponding to the successfully detected lip images of the CCD camera platform at each moving position are marked to form the actual width size sequence set.
[0125] Step S44: After removing the maximum and minimum elements from the actual width size sequence set, calculate the mean of the remaining elements in the actual width size sequence set.
[0126] Specifically, for example: for a moving position P1, an image is extracted from the lip and mouth image at position P1 to obtain a region. Lateral translation detection is used for threshold segmentation, and the first size is calculated using binarization and line detection techniques. If the calculation fails, it is ignored; if the calculation succeeds, the value is recorded as 'a'. i Thus, the actual width dimension sequence set [a1, a2, ..., a1] at position P1 is obtained. n Remove the maximum and minimum values from the list.
[0127] Step S45: Calculate the variance of the actual width dimension sequence set based on the mean.
[0128] For example: for the moving position P1, its actual width dimension sequence set is [a1, a2, ..., a n The mean after removing the maximum and minimum values is β, and the variance is γ. Similarly, the movement of positions P2 and P3 is similar.
[0129] Step S46: Based on the mean and variance, detect whether the lip and mouth size in the lip and mouth images at each moving position meets the requirements.
[0130] Specifically, the known movement positions to be detected are P[P1,P2,…,P…]. n The set of lip and mouth dimensions to be measured in the corresponding lip and mouth image is W[W1,W2,…,W]. n For example: the width to be measured at position P1 is W1; the width to be measured at position P2 is W2; the width to be measured at position P3 is W3; P n The width dimension to be measured corresponding to the position is W. n Based on the mean and variance obtained in step S45 above, the width dimensions W1, W2, and W3 at positions P1, P2, and P3 are measured respectively. n The width dimension W to be measured corresponding to the position n Does it meet the requirements?
[0131] In one specific implementation, the lip and mouth dimensions in the lip and mouth images at each moving position are compiled into a sequence set, stored in a document, and the mean, maximum element, and minimum element of the sequence set are displayed.
[0132] For example: Given that the movement positions to be detected are P[P1,P2,…,P…] n The set of lip and mouth dimensions to be measured in the corresponding lip and mouth image is W[W1,W2,…,W]. n The mean of this sequence set is δ, the maximum element is θ, and the minimum element is θ. Store it as a document for easy viewing and storage.
[0133] In another specific implementation, after detecting the lip and mouth size in the lip and mouth images at each moving position, the CCD camera platform is promptly moved back to the initial position, and the real-time acquired lip and mouth images at each moving position are recorded and stored.
[0134] Therefore, the lip size detection method of the coating die head in the embodiments of the present invention, by performing the above-described implementation method, eliminates the need for manual inspection of the lip size of the coating die head, and can quickly detect a large area of test points, thereby quickly determining whether the lip size of the coating die head is qualified, significantly improving the detection efficiency and also having high detection accuracy, which can enhance the promotion and application of lip size detection of coating dies.
[0135] Based on the same concept, embodiments of the present invention also provide a lip size detection device for a coating die, such as... Figure 5 As shown, it includes the following modules:
[0136] The lip and mouth image acquisition module 51 is used to acquire lip and mouth images of the CCD camera platform at various moving positions in real time.
[0137] The gradient value calculation module 52 is used to gradually move the Z-axis position of the CCD camera based on the moving step size of the CCD camera's Z-axis in order to calculate the gradient value of the lip image at each moving position.
[0138] The lip and mouth image focusing module 53 is used to determine the maximum gradient value that meets the preset accuracy from the gradient values of the lip and mouth images at each moving position, and to focus the lip and mouth images at each moving position based on the Z-axis position corresponding to the maximum gradient value.
[0139] The lip and mouth edge calibration module 54 is used to extract pixel features from the lip and mouth images at each moving position after focusing, and to calibrate the lip and mouth edges in the lip and mouth images at each moving position based on the pixel features.
[0140] The lip size detection module 55 is used to progressively detect the lip area within the lip edge based on a preset detection algorithm to obtain a width size sequence set, and calculate the mean and variance of the width size sequence set to detect whether the lip size in the lip image at each moving position meets the requirements.
[0141] In one specific implementation, the gradient value calculation module 52 includes:
[0142] The first step length determination submodule determines the first preset step length of the moving CCD camera's Z-axis;
[0143] The current coordinate acquisition submodule is used to obtain the current coordinates of the CCD camera along the Z-axis.
[0144] The first position determination submodule is used to gradually move the current position of the CCD camera Z-axis to the first target position based on the first preset step size and the current coordinates.
[0145] The first shooting submodule is used to gradually capture lip and mouth images corresponding to the first target position;
[0146] The gradient value first calculation submodule is used to calculate the gradient value of the lip image corresponding to the first target position step by step based on each movement position and the first target position;
[0147] The maximum gradient value determination submodule is used to determine the maximum gradient value from the gradient values of the lip image corresponding to the first target position calculated step by step.
[0148] In another specific embodiment, the gradient value calculation module 52 further includes:
[0149] The second step length determination submodule is used to reduce the first preset step length by a preset ratio to obtain the second preset step length;
[0150] The starting position determination submodule is used to take the Z-axis position corresponding to the maximum gradient value as the starting position for Z-axis movement;
[0151] The second position determination submodule is used to gradually move the starting position to the second target position based on the second preset step size and the starting position of the Z-axis movement;
[0152] The second shooting submodule is used to gradually capture lip and mouth images corresponding to the second target position;
[0153] The first gradient value calculation submodule is used to calculate the gradient value of the lip image corresponding to the second target position step by step based on each movement position and the second target position.
[0154] The second maximum gradient value determination submodule is used to determine the maximum gradient value from the gradient values of the lip image corresponding to the second target position.
[0155] In one specific implementation, the lip and mouth image focusing module 53 includes:
[0156] The focusing submodule is used to focus the lip and mouth images at each moving position based on the maximum gradient value among the gradient values of the lip and mouth images corresponding to the first target position; or, based on the maximum gradient value among the gradient values of the lip and mouth images corresponding to the second target position.
[0157] In one specific embodiment, the lip edge calibration module 54 includes:
[0158] The first position determination submodule is used to determine the movement deviation position of each moving position.
[0159] The second position determination submodule is used to take each movement position as the first position and the movement deviation position as the second position.
[0160] The first feature pixel extraction submodule is used to capture the lip image corresponding to the first position and extract the first pixel feature.
[0161] The second feature pixel extraction submodule is used to capture the lip image corresponding to the second position and extract the second pixel feature.
[0162] The pixel calibration value calculation submodule is used to calculate the pixel calibration value based on the first position, the first pixel feature, the second position, and the second pixel feature.
[0163] The lip edge calibration submodule is used to calibrate the lip edge in the lip image at each moving position based on pixel calibration values.
[0164] In one specific embodiment, the lip size detection module 55 includes:
[0165] The width dimension determination submodule is used to determine the target width dimension sequence set of the lip image at each moving position of the CCD camera platform;
[0166] The preprocessing submodule is used to preprocess the lip images of the CCD camera platform at various moving positions;
[0167] The width dimension detection submodule is used to detect the lip and mouth images of the preprocessed CCD camera platform at each moving position by sequentially detecting the elements in the target width dimension sequence set using a straight line detection method, and to mark the elements corresponding to the successfully detected lip and mouth images of the CCD camera platform at each moving position to form the actual width dimension sequence set.
[0168] The width dimension mean calculation submodule is used to calculate the mean of the remaining elements in the actual width dimension sequence set after removing the maximum and minimum elements;
[0169] The width dimension variance calculation submodule is used to calculate the variance of the actual width dimension sequence set based on the mean.
[0170] The lip and mouth size detection submodule is used to detect whether the lip and mouth size in the lip and mouth images at each moving position meets the requirements based on the mean and variance.
[0171] In one specific embodiment, the lip size detection device of the coating die head in this embodiment of the invention further includes: a display module, used to store the lip size in the lip image at each moving position as a sequence set in a document, and to display the mean, maximum element and minimum element of the sequence set.
[0172] The functions of each module and sub-module of the coating die lip size detection device in this embodiment of the invention have been described in the above method and will not be repeated here.
[0173] Therefore, the coating die lip size detection device in this embodiment of the invention, by performing the above-described implementation method, eliminates the need for manual inspection of the coating die lip size, and can quickly inspect large areas of test points, thereby quickly determining whether the coating die lip size is qualified, significantly improving inspection efficiency and accuracy, and promoting the widespread application of coating die lip size detection.
[0174] Based on the same concept, embodiments of the present invention also provide a computer device, such as... Figure 6 As shown, the computer device may include a processor 61 and a memory 62, wherein the processor 61 and the memory 62 may be connected via a bus or other means. Figure 6 Taking the example of a connection between China and Israel via a bus.
[0175] Processor 61 can be a central processing unit (CPU). Processor 61 can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or combinations of the above types of chips.
[0176] The memory 62, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs, non-transitory computer-executable programs, and modules. The processor 61 executes various functional applications and data processing by running the non-transitory software programs, instructions, and modules stored in the memory 62, thereby implementing the lip size detection method of the coating die head in the above method embodiment.
[0177] The memory 62 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created by the processor 61, etc. Furthermore, the memory 62 may include high-speed random access memory and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, the memory 62 may optionally include memory remotely located relative to the processor 61, and these remote memories may be connected to the processor 61 via a network. Examples of such networks include, but are not limited to, power grids, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0178] The one or more modules are stored in the memory 62, and when executed by the processor 61, they perform the lip size detection method of the coating die head as shown in the embodiment of the attached figure.
[0179] The specific details of the above-mentioned electronic device can be understood by referring to the relevant descriptions and effects in the embodiments shown in the accompanying drawings, and will not be repeated here.
[0180] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), random access memory (RAM), flash memory, hard disk drive (HDD), or solid-state drive (SSD), etc.; the storage medium can also include combinations of the above types of memory.
[0181] Obviously, the above embodiments are merely illustrative examples for clear explanation and are not intended to limit the implementation. Those skilled in the art will recognize that other variations or modifications can be made based on the above description. It is neither necessary nor possible to exhaustively list all possible implementations here. However, obvious variations or modifications derived therefrom are still within the scope of protection of this invention.
Claims
1. A method for detecting the lip size of a coating die, characterized in that, Includes the following steps: Real-time acquisition of lip and mouth images at various moving positions of the CCD camera platform; Based on the moving step size of the CCD camera's Z-axis, the Z-axis position of the CCD camera is moved step by step to calculate the gradient value of the lip and mouth image at each moving position. From the gradient values of the lip and mouth images at each moving position, determine the maximum gradient value that satisfies the preset accuracy, and focus the lip and mouth images at each moving position based on the Z-axis position corresponding to the maximum gradient value. Pixel features are extracted from the lip and mouth images at each of the focused moving positions, and the lip and mouth edges are marked in the lip and mouth images at each of the moving positions based on the pixel features; Based on a preset detection algorithm, the lip and mouth region within the lip and mouth edge is gradually detected to obtain a width size sequence set. The mean and variance of the width size sequence set are calculated to detect whether the lip and mouth size in the lip and mouth image at each moving position meets the requirements. The process of extracting pixel features from the lip and mouth images at each focused moving position, and calibrating the lip and mouth edges in the lip and mouth images at each moving position based on the pixel features, includes: Determine the movement deviation position for each of the moving positions; Each of the moving positions is taken as the first position, and the moving deviation position is taken as the second position; Capture the lip and mouth image corresponding to the first position, and extract the first pixel feature; Capture the lip image corresponding to the second position and extract the second pixel features; Calculate the pixel calibration value based on the first position, the first pixel feature, the second position, and the second pixel feature; Based on the pixel calibration values, the lip and mouth edges are calibrated in the lip and mouth images at each of the moving positions; Pixel calibration values are calculated using the following formula: ; in, For pixel calibration values, For the first position, For the second position, The first pixel feature, The second pixel feature; Based on a preset detection algorithm, the lip and mouth region within the lip and mouth edge is progressively detected to obtain a width size sequence set. The mean and variance of the width size sequence set are calculated to determine whether the lip and mouth size in the lip and mouth images at each moving position meets the requirements, including: Determine the target width dimension sequence set of lip images at each moving position of the CCD camera platform; The lip and mouth images of the CCD camera platform at each moving position are preprocessed; Using a straight-line detection method, the preprocessed lip and mouth images of the CCD camera platform at each moving position are detected sequentially according to the elements in the target width size sequence set. The elements corresponding to the successfully detected lip and mouth images of the CCD camera platform at each moving position are marked to form the actual width size sequence set. After removing the maximum and minimum elements from the actual width size sequence set, calculate the mean of the remaining elements in the actual width size sequence set; Based on the mean, calculate the variance of the actual width dimension sequence set; Based on the mean and the variance, it is determined whether the lip and mouth size in the lip and mouth images at each moving position meets the requirements; The lip and mouth dimensions in the lip and mouth images at each moving position are compiled into a sequence set and stored in a document. The mean, maximum element, and minimum element of the actual width dimension sequence set are displayed.
2. The method for detecting the lip size of the coating die head according to claim 1, characterized in that, The step size based on the Z-axis of the CCD camera is used to gradually move the Z-axis position of the CCD camera to calculate the gradient value of the lip and mouth image at each moving position, including: Determine the first preset step size of the moving CCD camera along the Z-axis; Obtain the current Z-axis coordinates of the CCD camera; Based on the first preset step size and the current coordinates, the current position of the CCD camera on the Z-axis is gradually moved to the first target position; Gradually capture images of the lips and mouth corresponding to the first target location; Based on each movement position and the first target position, the gradient value of the lip and mouth image corresponding to the first target position is calculated step by step; The maximum gradient value is determined from the gradient values of the lip image corresponding to the first target position calculated step by step.
3. The method for detecting the lip size of the coating die head according to claim 2, characterized in that, The method of gradually moving the Z-axis position of the CCD camera based on the Z-axis movement step size to calculate the gradient value of the lip and mouth image at each moving position also includes: The second preset step size is obtained by reducing the first preset step size by a preset ratio; The Z-axis position corresponding to the maximum gradient value is taken as the starting position for Z-axis movement; Based on the second preset step size and the starting position of the Z-axis movement, the starting position is gradually moved to the second target position; Gradually capture images of the lips and mouth corresponding to the second target location; Based on each movement position and the second target position, the gradient value of the lip and mouth image corresponding to the second target position is calculated step by step; The maximum gradient value is determined from the gradient values of the lip image corresponding to the second target position.
4. The method for detecting the lip size of the coating die head according to claim 2 or 3, characterized in that, From the gradient values of the lip and mouth images at each moving position, determine the maximum gradient value that satisfies the preset accuracy, and focus the lip and mouth images at each moving position based on the Z-axis position corresponding to the maximum gradient value, including: Focus the lip and mouth images at each moving position based on the maximum gradient value among the gradient values of the lip and mouth images corresponding to the first target position; or, based on the maximum gradient value among the gradient values of the lip and mouth images corresponding to the second target position.
5. A device for detecting the lip size of a coating die, characterized in that, Includes the following modules: The lip and mouth image acquisition module is used to acquire lip and mouth images in real time at various moving positions of the CCD camera platform; The gradient value calculation module is used to gradually move the Z-axis position of the CCD camera based on the moving step size of the CCD camera's Z-axis, so as to calculate the gradient value of the lip image at each moving position. The lip and mouth image focusing module is used to determine the maximum gradient value that meets the preset accuracy from the gradient values of the lip and mouth images at each moving position, and to focus the lip and mouth images at each moving position based on the Z-axis position corresponding to the maximum gradient value. The lip and mouth edge calibration module is used to extract pixel features from the lip and mouth images at each moving position after focusing, and to calibrate the lip and mouth edges in the lip and mouth images at each moving position based on the pixel features; The lip and mouth size detection module is used to progressively detect the lip and mouth region within the lip and mouth edge based on a preset detection algorithm to obtain a width size sequence set, and calculate the mean and variance of the width size sequence set to detect whether the lip and mouth size in the lip and mouth image at each moving position meets the requirements. The lip edge calibration module includes: The first position determination submodule is used to determine the movement deviation position of each movement position; The second position determination submodule is used to take each movement position as the first position and the movement deviation position as the second position. The first feature pixel extraction submodule is used to capture the lip image corresponding to the first position and extract the first pixel feature; The second feature pixel extraction submodule is used to capture the lip image corresponding to the second position and extract the second pixel features; The pixel calibration value calculation submodule is used to calculate the pixel calibration value based on the first position, the first pixel feature, the second position, and the second pixel feature. The lip and mouth edge calibration submodule is used to calibrate the lip and mouth edges in the lip and mouth images at various moving positions based on pixel calibration values; Pixel calibration values are calculated using the following formula: ; in, For pixel calibration values, For the first position, For the second position, The first pixel feature, The second pixel feature; The lip size detection module includes: The width dimension determination submodule is used to determine the target width dimension sequence set of the lip image at each moving position of the CCD camera platform; The preprocessing submodule is used to preprocess the lip images of the CCD camera platform at various moving positions; The width dimension detection submodule is used to detect the lip and mouth images of the preprocessed CCD camera platform at each moving position by sequentially detecting the elements in the target width dimension sequence set using a straight line detection method, and to mark the elements corresponding to the successfully detected lip and mouth images of the CCD camera platform at each moving position to form the actual width dimension sequence set. The width dimension mean calculation submodule is used to calculate the mean of the remaining elements in the actual width dimension sequence set after removing the maximum and minimum elements; The width dimension variance calculation submodule is used to calculate the variance of the actual width dimension sequence set based on the mean. The lip and mouth size detection submodule is used to detect whether the lip and mouth size in the lip and mouth images at each moving position meets the requirements based on the mean and variance. The display module is used to store a sequence set of lip and mouth dimensions from the lip and mouth images at each moving position in a document, and to display the mean, maximum element, and minimum element of the actual width dimension sequence set.
6. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing a computer to perform the lip size detection method for the coating die head according to any one of claims 1 to 4.
7. A computer device, characterized in that, include: The system includes a memory and a processor, which are interconnected. The memory stores computer instructions, and the processor executes the computer instructions to perform the lip size detection method for the coating die head according to any one of claims 1 to 4.
Citation Information
Patent Citations
Workpiece dimension measuring method and device based on machine vision
CN105865344A
Automatic focusing method and device, electronic equipment and storage medium
CN115567778A