Automatic glue coating uniformity detection method based on machine vision
Through machine vision technology, the grayscale image of the shoe surface is chunked and the uniform area of glue is calculated, which solves the problem of the inability to detect the uniformity of glue in the prior art, and realizes the bonding strength and waterproof performance of shoe shoe. promote.
Patent Information
- Application Number
- CN202411528197.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-30
- Publication Date
- 2025-01-10
- Estimated Expiration
- 2044-10-30
AI Technical Summary
The prior art cannot effectively detect the uniformity of the glue applied to the shoe and shoe, which affects the bonding strength and waterproof performance.
Using the automatic glue uniformity detection method based on machine vision, the grayscale image of the shoe surface is obtained, and the initial segmentation threshold and target segmentation threshold of the image block are determined by obtaining the grayscale image on the shoe surface, and the initial segmentation threshold of the image block is determined by using the similarity value and texture feature value. A uniform area to achieve accurate detection of glue uniformity.
It improves the accuracy and efficiency of detecting uniformity of shoe and shoe coating, and ensures the improvement of shoe and shoe bonding strength and waterproof performance.
Smart Images

Figure CN119048504B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of image data processing, and in particular to an automatic gluing uniformity detection method based on machine vision. Background Art
[0002] In the production process of shoes and boots, the surfaces of the shoe and boot parts to be bonded are treated with glue, so that the shoe and boot parts to be bonded are bonded, thereby achieving connection between the shoe and boot parts; for example, glue is applied to the parts to be bonded of the upper, and the sole to be bonded is bonded to the upper coated with glue; when the glue applied to the parts to be bonded is uneven, it will affect the bonding strength between the upper and the sole, and may also form a gap between the upper and the sole, affecting the waterproof performance of the produced shoes and boots.
[0003] In order to detect glue coating during the manufacturing process of shoes and boots, a method for detecting glue coating on soles is provided in related technologies, for example, in a Chinese patent application document with publication number CN113092434A, the method includes: coating the soles with glue added with fluorescent agent; irradiating the soles to be inspected with an ultraviolet light source to obtain an original image; processing the original image according to a preset detection area, and performing feature extraction on the processed original image to obtain glue coating feature information; comparing the glue coating feature information with the preset detection area to obtain a ratio parameter; if the ratio parameter is greater than or equal to a preset threshold value, the glue coating on the current sole is qualified.
[0004] In the related art, only the glue coating area of the sole can be determined, and whether the glue coating process is qualified can be determined based on the glue coating area, but the uniformity of the glue coating cannot be detected. Summary of the invention
[0005] In order to overcome the problem that the uniformity of glue coating cannot be detected in the related art, the present application provides an automatic glue coating uniformity detection method based on machine vision, including: obtaining a grayscale image of the surface to be detected of the shoe or boot that has been glued, and dividing the grayscale image into image blocks to obtain multiple image blocks; using the average grayscale value of the pixels in the image block as the initial segmentation threshold of the image block, and determining the similarity value between the two image blocks before and after the image block is segmented by the initial segmentation threshold; for a target image block among the multiple image blocks, using the difference between the corresponding similarity values of the target image block and other adjacent image blocks as the first parameter value of the target image block, and According to the first parameter value of the target image block, a second parameter value of the target image block is determined, and the second parameter value is negatively correlated with the first parameter value; when the second parameter value of the target image block is greater than a preset parameter threshold, the initial segmentation threshold of the target image block is used as the target segmentation threshold corresponding to the target image block; when the second parameter value of the target image block is less than or equal to the preset parameter threshold, the target segmentation threshold of the target image block is determined according to the initial segmentation thresholds of other image blocks adjacent to the target image block; according to the target segmentation threshold corresponding to the target image block, the uniformly coated glue area in the target image block is determined to obtain the uniformity of the glue coating on the surface to be detected of the shoe.
[0006] In this way, image blocks are obtained by dividing the grayscale image of the surface to be detected of the glue-coated shoes and boots into blocks, and determining the target segmentation threshold corresponding to the image block. The target segmentation threshold is determined based on the similarity value between the two image blocks before and after the image block is segmented by the initial segmentation threshold. The similarity value can characterize the segmentation effect of the initial segmentation threshold on the image block, and the target segmentation threshold is determined based on the corresponding similarity values of other image blocks adjacent to the target image block, so that the uniformly glued area in the target image block can be determined more accurately according to the obtained target segmentation threshold, and the uniformity of glue coating on the shoes and boots can be better detected.
[0007] Optionally, the difference between the corresponding similarity values of the target image block and other adjacent image blocks is obtained in the following manner: , E is the difference between the target image block and other adjacent image blocks in the corresponding similarity values, T is the number of other image blocks adjacent to the target image block, M is the similarity value corresponding to the target image block, is the similarity value corresponding to the tth other image block adjacent to the target image block, To take the absolute value.
[0008] In this way, since the similarity value corresponding to the image block can characterize the segmentation effect of the initial segmentation threshold of the image block on the image block, by comparing the target image block with other adjacent image blocks in the corresponding similarity values, it is possible to compare the segmentation effect of the target image block with the segmentation effects of the adjacent image blocks of the target image block, so that the other image blocks adjacent to the target image block can be used as references for the target image block.
[0009] Optionally, determining the second parameter value of the target image block according to the first parameter value of the target image block includes: , U is the second parameter value of the target image block, exp is an exponential function with a natural constant as the base; Q is the texture feature value of the target image block, which is used to characterize the complexity of the grayscale value of the pixel in the target image block; Z is the third parameter value of the target image block, which is used to characterize the difference between the target image block and other adjacent image blocks in the initial segmentation threshold; E is the first parameter value of the target image block.
[0010] In this way, the second parameter value of the target image block comprehensively considers the texture feature value, the third parameter value and the first parameter value of the target image block, and the texture feature value, the third parameter value and the first parameter value of the target image block can all reflect the probability of uniform glue coating in the target image block. Therefore, a more accurate target segmentation threshold of the target image block can be obtained through the obtained second parameter value, so as to obtain the uniform glue coating area in the target image block.
[0011] Optionally, the third parameter value of the target image block is obtained in the following manner: , Z is the third parameter value of the target image block, T is the number of other image blocks adjacent to the target image block, Y is the initial segmentation threshold of the target image block, is the initial segmentation threshold of the tth image block adjacent to the target image block, To take the absolute value.
[0012] In this way, since the initial segmentation threshold of the image block is equal to the average grayscale value of all pixels in the image block, by comparing the initial segmentation threshold of the target image block with the initial segmentation thresholds of other image blocks adjacent to the target image block, the third parameter value can characterize the degree of difference in grayscale characteristics between the target image block and other adjacent image blocks, which helps to more accurately determine the uniformly coated area in the target image block based on the third parameter value.
[0013] Optionally, the texture feature value of the target image block is obtained by: , Q is the texture feature value of the target image block, C is the extreme difference of the grayscale values of all pixels in the target image block, R is the preset number, is the gray value of the rth pixel in the target image block whose gray value differs the most from the initial segmentation threshold, is the average gray value of the neighboring pixels of the rth pixel whose gray value in the target image block has the largest difference with the initial segmentation threshold, is a preset positive number, To take the absolute value.
[0014] In this way, by referring to the grayscale value of the pixel whose grayscale value in the target image block has the largest difference with the initial segmentation threshold, the texture feature value can reflect the difference in grayscale value between the selected pixel and the neighboring pixel.
[0015] Optionally, determining a target segmentation threshold of the target image block based on initial segmentation thresholds of other image blocks adjacent to the target image block includes: taking image blocks whose corresponding second parameter values among other image blocks adjacent to the target image block are greater than a preset parameter threshold as reference image blocks corresponding to the target image block; and taking an average value of the second parameter values of all reference image blocks corresponding to the target image block as the target segmentation threshold of the target image block.
[0016] Optionally, according to the target segmentation threshold corresponding to the target image block, the uniformly glued area in the target image block is determined, including: determining the target grayscale range according to the target segmentation threshold, the grayscale difference value between the grayscale value within the target grayscale range and the target segmentation threshold is less than a preset difference threshold; and taking the area composed of all pixel points in the target image block whose grayscale values are within the target grayscale range as the uniformly glued area in the target image block.
[0017] Optionally, the uniformity of glue coating on the surface to be inspected of the shoe is obtained in the following manner: determine the area of the uniformly glued region in the target image block, and determine the sum of the areas of the uniformly glued regions of all target image blocks in the grayscale image; and take the ratio between the sum and the area to be glued corresponding to the surface to be inspected of the shoe as the uniformity of glue coating on the surface to be inspected.
[0018] The technical solution provided by the embodiments of the present application may include the following beneficial effects: image blocks are obtained by dividing the grayscale image of the surface to be detected of the glue-coated shoes and boots into blocks, and the target segmentation threshold corresponding to the image block is determined, the target segmentation threshold is determined based on the similarity value between the two image blocks before and after the image block is segmented by the initial segmentation threshold, the similarity value can characterize the segmentation effect of the initial segmentation threshold on the image block, and the target segmentation threshold is determined based on the corresponding similarity values of other image blocks adjacent to the target image block, so that the uniformly glued area in the target image block can be determined more accurately according to the obtained target segmentation threshold, and the uniformity of glue coating on the shoes and boots can be better detected.
[0019] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0021] Figure 1 The present invention is a flow chart of a method for automatic gluing uniformity detection based on machine vision according to an exemplary embodiment. DETAILED DESCRIPTION
[0022] Here, exemplary embodiments are described in detail, and examples thereof are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application.
[0023] First, the application scenario of the embodiment of the present application is briefly introduced. In the application scenario of the present application, glue can be applied to the bonding surface of the shoe parts to be bonded to achieve bonding between different shoe parts.
[0024] In the case where the glue applied to the shoe parts to be bonded is unevenly applied, it will directly affect the bonding strength between the two different shoe parts to be bonded, and the uneven glue application may form a gap between the two different shoe parts to be bonded, for example, a gap may be formed at the bonding surface between the upper and the sole, affecting the waterproof performance of the shoe.
[0025] In order to detect the glue coating on shoes and boots, the related art can only determine the area of glue coating and determine whether the glue coating is qualified based on the glue coating area, but cannot detect the uniformity of glue coating.
[0026] In view of the above technical problems, the present application provides an automatic gluing uniformity detection method based on machine vision. Figure 1 is a flow chart of a method for automatic gluing uniformity detection based on machine vision according to an exemplary embodiment. Figure 1 As shown, the method includes the following steps.
[0027] In step S101, a grayscale image of the surface to be inspected of the shoe or boot that has been glued is obtained, and the grayscale image is divided into image blocks to obtain a plurality of image blocks.
[0028] The grayscale image of the surface to be inspected of the glue-coated shoes and boots can be collected by an image acquisition device. The surface to be inspected can be the surface to be bonded of the shoes and boots. In order to facilitate targeted processing of different areas in the image, the grayscale image can be divided into image blocks to obtain multiple image blocks after division. The size of the image block can be 5×5, 7×7, 9×9, etc.
[0029] Compared with the color of the surface of the shoes and boots themselves, the color of the surface of the shoes and boots that have been coated with glue will change, or the grayscale value of the pixel points at the position where glue is coated in the grayscale image is different from the grayscale value of the pixel points at the position where glue is not coated in the grayscale image due to the refraction of light by the applied glue; or, the different thicknesses of glue applied have different degrees of refraction of light, resulting in different grayscale values of the pixel points at the positions with different glue thicknesses in the grayscale image.
[0030] In order to facilitate the determination of the position of the applied glue in the collected grayscale image, a fluorescent agent may be added to the applied glue, and a grayscale image of the surface to be inspected of the shoe or boot that has been glued under ultraviolet light or other light may be collected to make the position of the glue in the collected grayscale image more obvious, so as to realize the detection of the uniformity of the glue coating on the surface of the shoe or boot that has been glued.
[0031] In step S102, the average grayscale value of the pixels in the image block is used as the initial segmentation threshold of the image block, and the similarity value between two image blocks before and after the image block is segmented by the initial segmentation threshold is determined.
[0032] When the image block is segmented using the initial segmentation threshold of the image block, the pixel points whose grayscale values in the image block before segmentation are close to the initial segmentation threshold, such as the pixel points whose absolute value of the difference between the grayscale value and the initial segmentation threshold is less than the preset difference threshold, are retained in the image block after segmentation; while the pixel points whose grayscale values in the image block before segmentation are greatly different from the initial segmentation threshold, such as the pixel points whose absolute value of the difference between the grayscale value and the initial segmentation threshold is greater than or equal to the preset difference threshold, the grayscale value of the corresponding position in the image block after segmentation is 0.
[0033] When the glue is evenly applied at the position corresponding to the image block on the surface of the shoe, the grayscale values of different positions with even glue application in the image block are consistent, more pixels in the image block before segmentation are retained in the image block after segmentation, and the image block obtained after segmentation is more similar to the image block before segmentation.
[0034] When the glue coating at the position corresponding to the image block on the surface of the shoe is uneven, the difference between the grayscale values of different positions with uniform glue coating in the grayscale image is relatively large, and a smaller number of pixels in the image block before segmentation are retained in the image block after segmentation, and the similarity between the image block obtained after segmentation and the image block before segmentation is lower.
[0035] The similarity value between the two image blocks before and after the image blocks are segmented by the initial segmentation threshold may refer to the structural similarity index and cosine similarity between the two image blocks before and after the segmentation.
[0036] In step S103, for a target image block among the multiple image blocks, a difference value between the corresponding similarity values of the target image block and other adjacent image blocks is used as a first parameter value of the target image block, and a second parameter of the target image block is determined based on the first parameter value of the target image block.
[0037] The second parameter value is negatively correlated with the first parameter value; the first parameter value is used to characterize the degree of difference between the corresponding similarity values of the target image block and other adjacent image blocks, and the target image block may be any one of the multiple image blocks.
[0038] The difference degree value between the corresponding similarity values of the target image block and other adjacent image blocks may be equal to the absolute value of the difference between the corresponding similarity values of the target image block and other adjacent image blocks.
[0039] The greater the difference in the similarity values between the target image block and other adjacent image blocks, the greater the difference in the segmentation effect obtained by the initial segmentation threshold corresponding to the target image block and other adjacent image blocks. The initial segmentation threshold corresponding to the target image block has a higher probability of failing to effectively separate the unevenly coated areas and the evenly coated areas in the image block. The second parameter value corresponding to the target image block can be set to a smaller value.
[0040] On the contrary, the smaller the difference in the similarity values between the target image block and other adjacent image blocks, the smaller the difference in the segmentation effect obtained by the initial segmentation threshold corresponding to the target image block and other adjacent image blocks, and the initial segmentation threshold corresponding to the target image block has a higher probability of effectively separating the unevenly coated areas and the evenly coated areas in the image block, and the second parameter value corresponding to the target image block can be set to a higher value.
[0041] In one embodiment, the difference between the corresponding similarity values of the target image block and other adjacent image blocks is obtained in the following manner: , E is the difference between the target image block and other adjacent image blocks in the corresponding similarity values, T is the number of other image blocks adjacent to the target image block, M is the similarity value corresponding to the target image block, is the similarity value corresponding to the tth other image block adjacent to the target image block, To take the absolute value.
[0042] In this way, since the similarity value corresponding to the image block can characterize the segmentation effect of the initial segmentation threshold of the image block on the image block, by comparing the target image block with other adjacent image blocks in the corresponding similarity values, it is possible to compare the segmentation effect of the target image block with the segmentation effects of the adjacent image blocks of the target image block, so that the other image blocks adjacent to the target image block can be used as references for the target image block.
[0043] In one embodiment, determining the second parameter value of the target image block according to the first parameter value of the target image block includes: , U is the second parameter value of the target image block, exp is an exponential function with a natural constant as the base; Q is the texture feature value of the target image block, which is used to characterize the complexity of the grayscale value of the pixel in the target image block; Z is the third parameter value of the target image block, which is used to characterize the difference between the target image block and other adjacent image blocks in the initial segmentation threshold; E is the first parameter value of the target image block.
[0044] The texture feature values of the target image block are used to characterize the complexity of the grayscale values of the pixels in the target image block. The higher the complexity of the grayscale values of the pixels in the target image block, the greater the probability that the target image block contains noise pixels; or, due to the different degrees of reflection of light at different positions when the glue is unevenly applied, the complexity of the grayscale values in the image block with uneven glue is higher. Therefore, the higher the complexity of the grayscale values of the pixels in the target image block, the higher the probability of uneven glue application in the target image block, or the lower the probability of uniform glue application in the target image block.
[0045] The third parameter value of the target image block is used to characterize the degree of difference between the target image block and other adjacent image blocks in the initial segmentation threshold. Since the initial segmentation threshold corresponding to the image block is equal to the average grayscale value of all pixels in the image block, the greater the difference between the target image block and other adjacent image blocks in the initial segmentation threshold, the greater the difference in the average grayscale value between the target image block and other adjacent image blocks, and the higher the probability of uneven glue coating in the target image block, or the lower the probability of uniform glue coating in the target image block.
[0046] The first parameter value of the target image block is equal to the difference between the target image block and other adjacent image blocks in the corresponding similarity values. The larger the first parameter value of the target image block is, the lower the probability that the initial segmentation threshold corresponding to the target image block has a good segmentation effect. Setting a smaller second parameter value for the target image block helps to better determine the uniformly coated area in the target image.
[0047] In this way, the second parameter value of the target image block comprehensively considers the texture feature value, the third parameter value and the first parameter value of the target image block, and the texture feature value, the third parameter value and the first parameter value of the target image block can all reflect the probability of uniform glue coating in the target image block. Therefore, a more accurate target segmentation threshold of the target image block can be obtained through the obtained second parameter value, so as to obtain the uniform glue coating area in the target image block.
[0048] In one embodiment, the third parameter value of the target image block is obtained in the following manner: , Z is the third parameter value of the target image block, T is the number of other image blocks adjacent to the target image block, Y is the initial segmentation threshold of the target image block, is the initial segmentation threshold of the tth image block adjacent to the target image block, To take the absolute value.
[0049] On the surface of the shoe after glue coating, the glue coating thickness at different positions in the uniformly glued area is consistent, so that the grayscale values of the pixels in the uniformly glued area in the grayscale image have high consistency, and also have high consistency with the grayscale values of the pixels in other uniformly glued areas.
[0050] In this way, since the initial segmentation threshold of the image block is equal to the average grayscale value of all pixels in the image block, by comparing the initial segmentation threshold of the target image block with the initial segmentation thresholds of other image blocks adjacent to the target image block, the third parameter value can characterize the degree of difference in grayscale characteristics between the target image block and other adjacent image blocks, which helps to more accurately determine the uniformly coated area in the target image block based on the third parameter value.
[0051] In one embodiment, the texture feature value of the target image block is obtained in the following manner: , Q is the texture feature value of the target image block, C is the extreme difference of the grayscale values of all pixels in the target image block, R is the preset number, is the gray value of the rth pixel in the target image block whose gray value differs the most from the initial segmentation threshold, is the average gray value of the neighboring pixels of the rth pixel whose gray value in the target image block has the largest difference with the initial segmentation threshold, is a preset positive number, To take the absolute value.
[0052] The range of the grayscale values of all pixels in the target image block is equal to the difference between the maximum grayscale value and the minimum grayscale value of all pixels in the target image block; the degree of difference in the grayscale values of the pixels in the target image block can be represented by the range of the grayscale values of all pixels in the target image block.
[0053] In the image block corresponding to the area where the glue is evenly applied on the shoes and boots, since the degree of light reflection at different positions where the glue is evenly applied is highly consistent, the grayscale values of different pixels in the image block are relatively close, and the range of the grayscale values of all pixels in the image block is small. Therefore, the smaller the range of the grayscale values of all pixels in the target image block, the greater the probability of uniform glue application in the target image block, or the greater the degree of uniform glue application in the target image block.
[0054] On the contrary, the greater the range of the grayscale values of all pixels in the target image block, the higher the difference in the grayscale values of the pixels in the target image block, the higher the texture complexity of the target image block, and the lower the probability of uniform glue coating in the target image block.
[0055] When determining the texture feature value of the target image block, since the selected pixel points are the multiple pixel points in the target image block whose grayscale values have the largest difference with the initial segmentation threshold, these multiple pixel points with the largest difference with the initial segmentation threshold can better reflect the complexity of the grayscale values of the pixel points in the target image block.
[0056] In this way, by referring to the grayscale value of the pixel whose grayscale value in the target image block has the largest difference with the initial segmentation threshold, the texture feature value can reflect the difference in grayscale value between the selected pixel and the neighboring pixel.
[0057] The preset number R may be determined according to the total number of pixels in the target image block. For example, the preset number is a positive integer between 15% and 25% of the total number of pixels in the target image block.
[0058] The presence of a preset positive number in the calculation formula of the texture feature value of the target image block can ensure that all items involved in the multiplication operation in the texture feature value can play a role, and the preset positive number can be 0.01, 0.02, 0.03 and other positive numbers.
[0059] In step S104, when the second parameter value of the target image block is greater than the preset parameter threshold, the initial segmentation threshold of the target image block is used as the target segmentation threshold corresponding to the target image block; when the second parameter value of the target image block is less than or equal to the preset parameter threshold, the target segmentation threshold of the target image block is determined according to the initial segmentation thresholds of other image blocks adjacent to the target image block.
[0060] Since the second parameter value of the target image block is negatively correlated with the first parameter value of the target image block, the first parameter can characterize the difference degree between the target image block and other adjacent image blocks between the corresponding similarity values, and the second parameter value of the target image block also combines the texture feature value of the target image block and the third parameter value of the target image block, so that the second parameter value of the target image block can simultaneously reflect the difference degree between other adjacent image blocks and the texture complexity of the target image block itself.
[0061] When the second parameter value of the target image block is greater than the preset parameter threshold, the difference in the corresponding similarity value between the target image block and other adjacent image blocks is small, the initial segmentation threshold corresponding to the target image block has a good segmentation effect on the target image block, and the complexity of the grayscale value of the pixel points in the target image block is low. The initial segmentation threshold of the target image block can be directly used as the target segmentation threshold of the target image block, so as to obtain a uniformly coated area for segmentation.
[0062] When the second parameter value of the target image block is less than or equal to the preset parameter threshold, it means that the target image block and other adjacent image blocks have a large difference in the corresponding similarity values, and the initial segmentation threshold corresponding to the target image block has a poor segmentation effect on the target image block. The initial segmentation threshold of other image blocks adjacent to the target image block can be used as a basis for determining the target segmentation threshold of the target image block to determine the target segmentation threshold of the target image block.
[0063] For example, the average value of the initial segmentation thresholds of other image blocks adjacent to the target image block may be used as the target segmentation threshold of the target image block.
[0064] In one embodiment, a target segmentation threshold of a target image block is determined based on initial segmentation thresholds of other image blocks adjacent to the target image block, including: using image blocks whose corresponding second parameter values among other image blocks adjacent to the target image block are greater than a preset parameter threshold as reference image blocks corresponding to the target image block; and using an average value of the second parameter values of all reference image blocks corresponding to the target image block as the target segmentation threshold of the target image block.
[0065] Other image blocks adjacent to the target image block can provide a good reference for determining the uniformly glued area of the target image block; compared with all image blocks adjacent to the target image block, the image blocks whose corresponding second parameter values in other image blocks adjacent to the target image block are greater than the preset parameter threshold. Since the corresponding second parameter values are greater than the preset parameter threshold, the initial segmentation thresholds corresponding to these other image blocks have a better segmentation effect, and the uniformly glued parts on the surfaces of the shoes and boots that have been glued have similar grayscale features, so that the image blocks whose corresponding second parameter values in other image blocks adjacent to the target image block are greater than the preset parameter threshold have a good reference value for determining the target segmentation threshold of the target image block.
[0066] In this way, by taking the average value of the second parameter values of all reference image blocks corresponding to the target image block as the target segmentation threshold of the target image block, image blocks whose corresponding second parameter values in other image blocks adjacent to the target image block are greater than the preset parameter threshold can be taken as references, thereby making the target segmentation threshold corresponding to the target image block more accurate.
[0067] In step S105, the glue coating uniformity area in the target image block is determined according to the target segmentation threshold corresponding to the target image block, so as to obtain the glue coating uniformity of the surface to be detected of the shoe.
[0068] When determining the target segmentation threshold corresponding to the target image block, if there is an area with uneven glue coating in the target image block, since the degree of light reflection in the uneven glue coating area is different from that in the evenly glue coating area, the uneven glue coating area is manifested as a pixel point in the target image block with a large difference in grayscale value from the target segmentation threshold corresponding to the target image block.
[0069] For the area with uniform glue coating in the target image block, since the degree of light reflection at different positions in the area with uniform glue coating is consistent, the grayscale value of the pixel in the area with uniform glue coating in the target image block is slightly different from the target segmentation threshold corresponding to the target image block.
[0070] In one embodiment, a uniformly glued area in a target image block is determined according to a target segmentation threshold corresponding to the target image block, including: determining a target grayscale range according to the target segmentation threshold, wherein a grayscale difference value between a grayscale value within the target grayscale range and the target segmentation threshold is less than a preset difference threshold; and taking an area composed of all pixel points in the target image block whose grayscale values are within the target grayscale range as the uniformly glued area in the target image block.
[0071] For example, when the target segmentation threshold corresponding to the target image block is 20, the target grayscale range may be [17, 23], and the preset difference threshold may be between 2 and 5, or may be determined according to actual needs.
[0072] When the grayscale value in the target image block is within the target grayscale range, it means that the difference between the grayscale value of the pixel and the target segmentation threshold corresponding to the target image block is less than the preset difference threshold. Since the grayscale values of pixels at different positions in the uniformly coated area are highly consistent, the probability that the pixel is located in the uniformly coated area is higher.
[0073] In this way, the area composed of all pixels whose grayscale values in the target image block are within the target grayscale range is used as the uniformly glued area in the target image block, which can realize the acquisition of the uniformly glued area in the target image library, so as to determine the uniformity of glue coating on the surface of the shoe after glue coating.
[0074] In one embodiment, the uniformity of glue coating on the surface to be inspected of the shoe is obtained in the following manner: determining the area of the uniformly glued region in the target image block, and determining the sum of the areas of the uniformly glued regions of all target image blocks in the grayscale image; and taking the ratio between the sum and the area to be glued corresponding to the surface to be inspected of the shoe as the uniformity of glue coating on the surface to be inspected.
[0075] Compared with testing the gluing quality of shoes and boots only by the gluing area, by determining the area of the uniformly glued region, the gluing quality of shoes and boots can be better tested, so as to improve the quality of the produced shoes and boots.
[0076] A grayscale image may include multiple target image blocks containing uniformly coated glue areas. The total uniformly coated glue area can be obtained by summing up the areas of the uniformly coated glue areas of all target image blocks. When gluing shoes, a corresponding area to be glued is usually specified. For example, an electronic device for gluing shoes glues the shoes according to the set area to be glued. The ratio of the sum to the area to be glued corresponding to the surface to be detected of the shoe can achieve the acquisition of the uniformity of the glue coating on the surface to be detected.
[0077] In this way, the ratio between the sum of the areas of the uniformly glued regions of all target image blocks in the grayscale image and the area to be glued corresponding to the surface to be detected of the shoes and boots is taken as the glue uniformity of the surface to be detected, so as to realize the detection of the glue uniformity of the shoes and boots that have been glued.
[0078] By using the automatic gluing uniformity detection method based on machine vision provided in the embodiment of the present application, the grayscale image of the surface to be detected of the glued shoes is divided into blocks to obtain image blocks, and the target segmentation threshold corresponding to the image blocks is determined. The target segmentation threshold is determined based on the similarity value between the two image blocks before and after the image blocks are segmented by the initial segmentation threshold. The similarity value can characterize the segmentation effect of the initial segmentation threshold on the image blocks, and the target segmentation threshold is determined based on the corresponding similarity values of other image blocks adjacent to the target image block, so that the uniformly glued area in the target image block can be more accurately determined according to the obtained target segmentation threshold, and the uniformity of gluing of shoes can be better detected.
[0079] It should be understood that the features of some embodiments of the various applications described herein may be combined with each other unless specifically stated otherwise.
[0080] Although terms such as "first", "second", and "third" may be used herein to describe various components, parts, regions, layers, or sections, these components, parts, regions, layers, or sections are not limited to these terms. Instead, these terms are only used to distinguish one component, part, region, layer, or section from another component, part, region, layer, or section. Therefore, without departing from the teachings of the examples described herein, the first component, part, region, layer, or section mentioned in the examples may also be referred to as the second component, part, region, layer, or section.
[0081] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description herein, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.
[0082] In addition, the word "exemplary" is used herein to mean serving as an example, instance, or diagram. Any aspect or design described herein as "exemplary" is not necessarily to be understood as being advantageous over other aspects or designs. Instead, the use of the word exemplary is intended to present concepts in a concrete manner. As used herein, the term "or" is intended to mean an inclusive "or" rather than an exclusive "or".
[0083] Likewise, although the present application has been shown and described with respect to one or more implementations, equivalent variations and modifications will occur to those skilled in the art upon reading and understanding this specification and the accompanying drawings. With particular regard to the various functions performed by the components (e.g., elements, resources, etc.) described above, unless otherwise noted, the terms used to describe such components are intended to correspond to any component (functionally equivalent) that performs the specific functions of the described components, even if not structurally equivalent to the disclosed structures.
[0084] Additionally, while particular features of the present application may have been disclosed with respect to only one of several implementations, such features may be combined with one or more other features of other implementations as may be desired and advantageous for any given or particular application.
[0085] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary technical means in the art that are not disclosed in the present application, and the specification and embodiments are only considered as exemplary.
[0086] It should be understood that the present application is not limited to the exact construction that has been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof.
Claims
1. An automatic gluing uniformity detection method based on machine vision, characterized in that: include: Acquire a grayscale image of the surface to be inspected of the shoe or boot that has been glued, and divide the grayscale image into image blocks to obtain a plurality of image blocks; The average gray value of the pixels in the image block is used as the initial segmentation threshold of the image block, and the similarity value between the two image blocks before and after the image block is segmented by the initial segmentation threshold is determined; For a target image block among the multiple image blocks, taking a difference value between the target image block and other adjacent image blocks at corresponding similarity values as a first parameter value of the target image block, and determining a second parameter value of the target image block according to the first parameter value of the target image block; The second parameter value is negatively correlated with the first parameter value; When the second parameter value of the target image block is greater than the preset parameter threshold, the initial segmentation threshold of the target image block is used as the target segmentation threshold corresponding to the target image block; when the second parameter value of the target image block is less than or equal to the preset parameter threshold, the target segmentation threshold of the target image block is determined according to the initial segmentation thresholds of other image blocks adjacent to the target image block; Determine the glue-coating uniform area in the target image block according to the target segmentation threshold value corresponding to the target image block, so as to obtain the glue-coating uniformity of the surface to be detected of the shoe; Where: The second parameter value of the target image block , exp is an exponential function with a natural constant as the base; Q is the texture feature value of the target image block, which is used to characterize the complexity of the grayscale value of the pixel in the target image block; Z is the third parameter value of the target image block, which is used to characterize the difference between the target image block and other adjacent image blocks in the initial segmentation threshold; E is the first parameter value of the target image block; The third parameter value of the target image block , T is the number of other image blocks adjacent to the target image block, Y is the initial segmentation threshold of the target image block, is the initial segmentation threshold of the tth image block adjacent to the target image block, To take the absolute value; Texture feature value of the target image block , C is the extreme difference of the grayscale values of all pixels in the target image block, R is the preset number, is the gray value of the rth pixel in the target image block whose gray value differs the most from the initial segmentation threshold, is the average gray value of the neighboring pixels of the rth pixel whose gray value in the target image block has the largest difference with the initial segmentation threshold, is a preset positive number; According to the target segmentation threshold corresponding to the target image block, the uniformly glued area in the target image block is determined, including: determining the target grayscale range according to the target segmentation threshold, the grayscale difference value between the grayscale value in the target grayscale range and the target segmentation threshold is less than a preset difference threshold; and taking the area composed of all pixel points in the target image block whose grayscale values are within the target grayscale range as the uniformly glued area in the target image block.
2. The automatic gluing uniformity detection method based on machine vision according to claim 1 is characterized in that: The difference between the target image block and other adjacent image blocks in the corresponding similarity values is obtained in the following way: , E is the difference between the target image block and other adjacent image blocks in the corresponding similarity values, T is the number of other image blocks adjacent to the target image block, M is the similarity value corresponding to the target image block, is the similarity value corresponding to the tth other image block adjacent to the target image block, To take the absolute value.
3. The automatic gluing uniformity detection method based on machine vision according to claim 1 is characterized in that: Determining a target segmentation threshold of the target image block according to initial segmentation thresholds of other image blocks adjacent to the target image block includes: Using image blocks whose corresponding second parameter values are greater than a preset parameter threshold value among other image blocks adjacent to the target image block as reference image blocks corresponding to the target image block; An average value of the second parameter values of all reference image blocks corresponding to the target image block is used as the target segmentation threshold of the target image block.
4. The automatic gluing uniformity detection method based on machine vision according to claim 1 is characterized in that: The uniformity of the glue coating on the surface to be tested of the shoe is obtained by: Determine the area of the uniformly coated region in the target image block, and determine the sum of the areas of the uniformly coated regions of all target image blocks in the grayscale image; The ratio between the sum and the area to be coated with glue corresponding to the surface to be tested of the shoe is taken as the uniformity of the glue coating on the surface to be tested.
Citation Information
Patent Citations
Image processing method and device, electronic equipment and readable storage medium
CN108681994A
Sole gluing detection method, device and system, electronic device and storage medium
CN113092434A