A method and system for detecting the uniformity of polyurethane pillow core casting.
By analyzing the edge pixels and bubble connected regions of the polyurethane pillow core grayscale image, the bubble edge probability and the degree of non-uniformity change are calculated, which solves the problem of large error in the casting detection results in the existing technology and realizes more accurate casting uniformity detection.
Patent Information
- Application Number
- CN202410929719.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-11
- Publication Date
- 2025-12-02
- Estimated Expiration
- 2044-07-11
AI Technical Summary
Existing methods for testing the uniformity of polyurethane pillow core casting cannot accurately identify new air bubbles and expanding air bubbles during the foaming process, resulting in large errors in the casting test results.
By acquiring a sequence of grayscale images of polyurethane pillow cores, analyzing the gradient magnitude and grayscale value of edge pixels, calculating the probability of bubble edges, filtering out bubble edge pixels and forming bubble connected regions, and combining the degree of non-uniformity and the degree of change, calculating the final uniformity to obtain accurate casting detection results.
This improves the accuracy of polyurethane pillow core casting uniformity testing, more accurately reflects the bubble situation during the casting process, reduces errors, and provides more reliable test results.
Smart Images

Figure CN118470018B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image data processing technology, and specifically to a method and system for detecting the uniformity of polyurethane pillow core casting. Background Technology
[0002] Polyurethane pillow core casting is a manufacturing process that uses polyurethane material as filling for pillows. Polyurethane is a synthetic material with excellent properties such as shock absorption, wear resistance, and high-temperature resistance, and is therefore widely used in the manufacture of various furniture and decorative materials. However, uneven casting during the production process can affect product quality, so it is necessary to test the uniformity of polyurethane pillow core casting.
[0003] Existing problem: During the casting process, the uniformity of polyurethane pillow core casting can be observed based on the morphology of bubbles on the polyurethane surface. However, in reality, new bubbles may be generated during the foaming process, and some bubbles may become smooth due to expansion. It is not comprehensive to evaluate the current polyurethane casting status solely based on the morphology of bubbles in the initial image, which will lead to errors in the final casting inspection results. Summary of the Invention
[0004] This invention provides a method and system for detecting the uniformity of polyurethane pillow core casting, in order to solve existing problems.
[0005] The present invention provides a method and system for detecting the uniformity of polyurethane pillow core casting, which adopts the following technical solution:
[0006] One embodiment of the present invention provides a method for detecting the uniformity of polyurethane pillow core casting, the method comprising the following steps:
[0007] Obtain the grayscale image sequence of the polyurethane pillow core;
[0008] In the polyurethane pillow core grayscale image sequence, obtain several edge pixels, the gradient magnitude of each edge pixel, and several edge lines formed by the edge pixels in each polyurethane pillow core grayscale image.
[0009] Based on the gradient magnitude and grayscale value of each edge pixel in each polyurethane pillow core grayscale image, the bubble edge probability of each edge pixel in each polyurethane pillow core grayscale image is obtained; based on the bubble edge probability of each edge pixel in each polyurethane pillow core grayscale image, several bubble edge pixels are selected from the edge pixels in each polyurethane pillow core grayscale image; based on all the bubble edge pixels in each polyurethane pillow core grayscale image, several bubble connected components of each polyurethane pillow core grayscale image are obtained;
[0010] The first polyurethane pillow core grayscale image in the polyurethane pillow core grayscale image sequence is denoted as the initial polyurethane pillow core grayscale image. The initial non-uniformity of the initial polyurethane pillow core grayscale image is obtained based on the number of pixels in each bubble connected region of the initial polyurethane pillow core grayscale image and the bubble edge probability of all bubble edge points.
[0011] The degree of unevenness in each polyurethane pillow core grayscale image is obtained by considering the number of pixels in each bubble connected region and the grayscale value of all pixels in each image.
[0012] Based on the degree of non-uniformity in each polyurethane pillow core grayscale image and the initial degree of non-uniformity in the initial polyurethane pillow core grayscale image, the final uniformity of the polyurethane pillow core casting is obtained; based on the final uniformity of the polyurethane pillow core casting, the final test result of the polyurethane pillow core casting is obtained.
[0013] Furthermore, the specific calculation formula for obtaining the bubble edge probability of each edge pixel in each polyurethane pillow core grayscale image based on the gradient magnitude and grayscale value of each edge pixel is as follows:
[0014]
[0015] in, Indicates the first The first grayscale image of Zhang polyurethane pillow core Bubble edge probability of each edge pixel; Indicates the first The first grayscale image of a polyurethane pillow core Gradient magnitude of each edge pixel; Indicates the first The first grayscale image of Zhang polyurethane pillow core The maximum gradient magnitude of all edge pixels on the edge line where the edge pixel is located; Indicates the first In the grayscale image of Zhang polyurethane pillow core, and the first The first edge pixel is adjacent to the first... The grayscale value of each pixel; Indicates the first The first grayscale image of Zhang polyurethane pillow core The grayscale value of each edge pixel; Indicates the first The first grayscale image of Zhang polyurethane pillow core The number of pixels adjacent to each edge pixel; express Belongs to the interval [1, All within the time frame The maximum value; This represents the linear normalization function.
[0016] Furthermore, the specific steps for selecting a number of bubble edge pixels from the edge pixels in each polyurethane pillow core grayscale image based on the bubble edge probability of each edge pixel are as follows:
[0017] When the The first grayscale image of Zhang polyurethane pillow core The probability of a bubble edge at each edge pixel is greater than [value missing]. At that time, the first The first grayscale image of Zhang polyurethane pillow core The nth edge pixel, denoted as the nth edge pixel. The pixels representing the edges of air bubbles in a grayscale image of a polyurethane pillow core; among them... It is a preset probability threshold.
[0018] Furthermore, the specific formula for calculating the initial non-uniformity of the initial polyurethane pillow core grayscale image based on the number of pixels in each bubble connected region and the bubble edge probability of all bubble edge points is as follows:
[0019]
[0020] in, This indicates the initial non-uniformity of the initial polyurethane pillow core grayscale image; The first grayscale image of the initial polyurethane pillow core represents the... The length of the minimum bounding rectangle of a bubble connected region; The first grayscale image of the initial polyurethane pillow core represents the... The width of the minimum bounding rectangle of each bubble connected region; This represents the number of all bubble edge pixels in the initial polyurethane pillow core grayscale image; This represents the total number of pixels in the initial grayscale image of the polyurethane pillow core; This represents the number of bubble connected components in the initial polyurethane pillow core grayscale image; The first grayscale image of the initial polyurethane pillow core represents the... The probability of the bubble edge at each bubble edge pixel.
[0021] Furthermore, the specific steps for obtaining the degree of non-uniformity in each polyurethane pillow core grayscale image based on the number of pixels in each bubble connected region and the grayscale values of all pixels are as follows:
[0022] The first The minimum distance between the centroids of any two connected bubble regions in the grayscale image of the polyurethane pillow core is denoted as the i-th value. Minimum centroid distance of a grayscale image of a polyurethane pillow core;
[0023] According to the The minimum centroid distance, the number of pixels in each bubble connected region, and the grayscale values of all pixels in the grayscale image of the polyurethane pillow core are used to obtain the first... The degree of unevenness in the grayscale image of the polyurethane pillow core.
[0024] Furthermore, the statement based on the first The minimum centroid distance, the number of pixels in each bubble connected region, and the grayscale values of all pixels in the grayscale image of the polyurethane pillow core are used to obtain the first... The specific formula for calculating the degree of non-uniformity in the grayscale image of a polyurethane pillow core is as follows:
[0025]
[0026] in, Indicates the first The degree of unevenness in the grayscale image of the polyurethane pillow core; No. The number of bubble connected components in a grayscale image of a polyurethane pillow core. Indicates the first The first grayscale image of Zhang polyurethane pillow core The average grayscale value of all pixels in the connected region of each bubble; Indicates the first The first grayscale image of Zhang polyurethane pillow core The area of each bubble connected region; Indicates the first The square of the minimum centroid distance in the grayscale image of a polyurethane pillow core; Indicates the first The number of all bubble edge pixels in the grayscale image of the polyurethane pillow core; Indicates the first The number of all pixels in the grayscale image of the polyurethane pillow core.
[0027] Furthermore, the specific steps for obtaining the final uniformity of the polyurethane pillow core casting based on the degree of non-uniformity of each polyurethane pillow core grayscale image and the initial non-uniformity of the initial polyurethane pillow core grayscale image are as follows:
[0028] The first The degree of unevenness in the grayscale image of the polyurethane pillow core is related to the first The absolute value of the difference in the degree of non-uniformity of the grayscale image of the polyurethane pillow core is denoted as the first value. The degree of uneven variation in the difference values of the grayscale image of the polyurethane pillow core;
[0029] The final uniformity of the polyurethane pillow core casting is obtained based on the degree of unevenness in the difference between each polyurethane pillow core grayscale image and the initial unevenness of the initial polyurethane pillow core grayscale image.
[0030] Furthermore, the specific calculation formula for obtaining the final uniformity of the polyurethane pillow core casting based on the degree of unevenness in the difference between each polyurethane pillow core grayscale image and the initial unevenness of the initial polyurethane pillow core grayscale image is as follows:
[0031]
[0032] in, This indicates the final uniformity of the polyurethane pillow core casting. This indicates the initial non-uniformity of the initial polyurethane pillow core grayscale image; This indicates the number of grayscale images of the polyurethane pillow core; Indicates the first The degree of uneven variation in the difference values of the grayscale image of the polyurethane pillow core; This represents the hyperbolic tangent function.
[0033] Furthermore, the specific steps for obtaining the final test result of the polyurethane pillow core casting based on the final uniformity of the casting are as follows:
[0034] When the final uniformity of the polyurethane pillow core casting is greater than At that time, it was determined that the polyurethane pillow core was poured evenly; among them, It is a preset threshold.
[0035] The present invention also proposes a polyurethane pillow core casting uniformity detection system, including a memory, a processor, and a computer program stored in the memory and executable on the processor. The processor executes the computer program stored in the memory to implement the steps of the aforementioned polyurethane pillow core casting uniformity detection method.
[0036] The beneficial effects of the technical solution of the present invention are:
[0037] A sequence of grayscale images of polyurethane pillow cores is obtained. Within this sequence, several edge pixels, the gradient magnitude of each edge pixel, and several edge lines formed by these pixels are acquired for each image. Based on the gradient magnitude and grayscale value of each edge pixel in each image, the bubble edge probability is calculated, ensuring that the selected edge pixels are indeed bubble edge pixels. Based on the bubble edge probability of each edge pixel in each image, several bubble edge pixels are selected from the edge pixels in each image, resulting in a more accurate determination of the bubble connected components. Based on all bubble edge pixels in each polyurethane pillow core grayscale image, several bubble connected regions are obtained for each image. The first polyurethane pillow core grayscale image in the sequence is designated as the initial image. The initial non-uniformity of the initial image is determined by the number of pixels in each bubble connected region and the bubble edge probability of all bubble edge points, providing a more accurate reflection of the bubble situation. The degree of non-uniformity variation in each image is then determined based on the number of pixels in each bubble connected region and the grayscale value of all pixels, further reflecting the bubble situation during the foaming process. Finally, the final uniformity of the polyurethane pillow core casting is determined based on the final uniformity, accurately reflecting the casting process. The final detection result of the polyurethane pillow core casting is then obtained based on the final uniformity of the casting. This invention obtains more accurate uniformity detection results by analyzing the morphology of bubbles in the initial image and the morphology of bubbles during the foaming process. Attached Figure Description
[0038] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0039] Figure 1 This is a flowchart of the steps in the method for detecting the uniformity of polyurethane pillow core casting according to the present invention.
[0040] Figure 2 This is a schematic diagram of the first grayscale image of the polyurethane pillow core provided in this embodiment;
[0041] Figure 3This is a schematic diagram of the second grayscale image of the polyurethane pillow core provided in this embodiment;
[0042] Figure 4 This is a schematic diagram of the third grayscale image of the polyurethane pillow core provided in this embodiment;
[0043] Figure 5 This is a schematic diagram of edge detection for the first grayscale image of the polyurethane pillow core provided in this embodiment;
[0044] Figure 6 This is a schematic diagram of edge detection for the second grayscale image of the polyurethane pillow core provided in this embodiment;
[0045] Figure 7 This is a schematic diagram of edge detection for the third grayscale image of the polyurethane pillow core provided in this embodiment. Detailed Implementation
[0046] To further illustrate the technical means and effects adopted by the present invention to achieve its intended purpose, the following, in conjunction with the accompanying drawings and preferred embodiments, details the specific implementation, structure, features, and effects of a polyurethane pillow core casting uniformity detection method and system proposed according to the present invention. In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. Furthermore, specific features, structures, or characteristics in one or more embodiments can be combined in any suitable form.
[0047] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.
[0048] The following description, in conjunction with the accompanying drawings, details the specific scheme of the polyurethane pillow core casting uniformity detection method and system provided by the present invention.
[0049] Please see Figure 1 The diagram illustrates a flowchart of a method for detecting the uniformity of polyurethane pillow core casting according to an embodiment of the present invention. The method includes the following steps:
[0050] Step S001: Obtain the grayscale image sequence of the polyurethane pillow core.
[0051] Using industrial cameras fixed on the production line, to The polyurethane pillow core image sequence is obtained by taking pictures of the pouring area at intervals of seconds, and each polyurethane pillow core image in the sequence is converted into a grayscale image to obtain a polyurethane pillow core grayscale image sequence. Figure 2 This is a schematic diagram of the first grayscale image of the polyurethane pillow core provided in this embodiment. Figure 3 This is a schematic diagram of the second grayscale image of the polyurethane pillow core provided in this embodiment. Figure 4This is a schematic diagram of the third grayscale image of the polyurethane pillow core provided in this embodiment; wherein The preset time interval threshold is 0.3 seconds, which will be used as an example for the description.
[0052] Step S002: In the polyurethane pillow core grayscale image sequence, obtain several edge pixels, the gradient magnitude of each edge pixel, and several edge lines formed by the edge pixels in each polyurethane pillow core grayscale image.
[0053] In the polyurethane pillow core grayscale image sequence, the Canny operator is used to perform edge detection on each polyurethane pillow core grayscale image based on the grayscale value of the pixels in each image, resulting in several edge pixels, the gradient magnitude of each edge pixel, and several edge lines formed by the edge pixels. Figure 5 This is a schematic diagram of edge detection for the first grayscale image of the polyurethane pillow core provided in this embodiment. Figure 6 This is a schematic diagram of edge detection for the second grayscale image of the polyurethane pillow core provided in this embodiment. Figure 7 This is a schematic diagram of edge detection for the third grayscale image of the polyurethane pillow core provided in this embodiment.
[0054] Step S003: Based on the gradient magnitude and grayscale value of each edge pixel in each polyurethane pillow core grayscale image, obtain the bubble edge probability of each edge pixel in each polyurethane pillow core grayscale image; based on the bubble edge probability of each edge pixel in each polyurethane pillow core grayscale image, select several bubble edge pixels from the edge pixels in each polyurethane pillow core grayscale image; based on all bubble edge pixels in each polyurethane pillow core grayscale image, obtain several bubble connected components in each polyurethane pillow core grayscale image.
[0055] It should be noted that during the polyurethane casting process, if the casting is uneven, air bubbles will be generated on the surface of the polyurethane. Therefore, the casting status of the polyurethane can be reflected by observing the air bubbles on the surface of the polyurethane. Furthermore, by observing the grayscale image of the polyurethane pillow core, it can be seen that the grayscale values of the edge pixels in the bubble area are lower, and the grayscale values of the edge pixels change more significantly.
[0056] Then the first The first grayscale image of Zhang polyurethane pillow core The formula for calculating the bubble edge probability of each edge pixel is:
[0057]
[0058] in, Indicates the first The first grayscale image of Zhang polyurethane pillow core Bubble edge probability of each edge pixel; Indicates the first The first grayscale image of Zhang polyurethane pillow core Gradient magnitude of each edge pixel; Indicates the first The first grayscale image of Zhang polyurethane pillow core The maximum gradient magnitude of all edge pixels on the edge line where the edge pixel is located; Indicates the first In the grayscale image of Zhang polyurethane pillow core, and the first The first edge pixel is adjacent to the first... The grayscale value of each pixel; Indicates the first The first grayscale image of Zhang polyurethane pillow core The grayscale value of each edge pixel; Indicates the first The first grayscale image of Zhang polyurethane pillow core The number of pixels adjacent to each edge pixel; express Belongs to the interval [1, All within the time frame The maximum value; This represents the linear normalization function.
[0059] It should be noted that: The larger the value, the more... The first grayscale image of Zhang polyurethane pillow core The higher the probability of a bubble edge at the nth edge pixel, the greater the probability of an edge pixel; when the nth edge pixel... The lower the gray value of each edge pixel, the better. The smaller the value, the better. The larger the value, the more... The first grayscale image of Zhang polyurethane pillow core The higher the probability of a bubble edge for each edge pixel, the greater the probability of an edge bubble.
[0060] It should be further noted that: when the first The first grayscale image of Zhang polyurethane pillow core When the number of edge pixels on the edge line where the edge pixel is located is only one, then the first edge pixel will be... The first grayscale image of Zhang polyurethane pillow core The gradient magnitude of the i-th edge pixel is used as the i-th edge pixel. The first grayscale image of Zhang polyurethane pillow core The maximum gradient magnitude of all edge pixels on the edge line where the edge pixel is located.
[0061] Through the above process, the first... The first grayscale image of Zhang polyurethane pillow core Bubble edge probability of each edge pixel;
[0062] The bubble edge probability of each edge pixel in each grayscale image of a polyurethane pillow core is obtained by performing the above process on each edge pixel.
[0063] When the The first grayscale image of Zhang polyurethane pillow core The probability of a bubble edge at each edge pixel is greater than [value missing]. At that time, the first The first grayscale image of Zhang polyurethane pillow core The nth edge pixel, denoted as the nth edge pixel. The pixels representing the edges of bubbles in a grayscale image of a polyurethane pillow core. It is a preset probability threshold; in this embodiment, the preset probability threshold is... The value is 0.8, and we will use this as an example for explanation.
[0064] Following the above process, several bubble edge pixels are obtained for each polyurethane pillow core grayscale image.
[0065] Based on all bubble edge pixels in each polyurethane pillow core grayscale image, a connected component labeling algorithm is used to extract connected components for each polyurethane pillow core grayscale image, resulting in several bubble connected components in each polyurethane pillow core grayscale image; the connected component labeling algorithm is a well-known technique, and the specific method will not be described here.
[0066] Step S004: The first polyurethane pillow core grayscale image in the polyurethane pillow core grayscale image sequence is denoted as the initial polyurethane pillow core grayscale image; the initial non-uniformity of the initial polyurethane pillow core grayscale image is obtained based on the number of pixels in each bubble connected region of the initial polyurethane pillow core grayscale image and the bubble edge probability of all bubble edge points.
[0067] It should be noted that the first grayscale image of the polyurethane pillow core represents the state of the raw material just poured into the mold before foaming. If the pouring is uniform, there should be no air bubbles in the first grayscale image of the polyurethane pillow core. The more uneven the pouring, the more pixels there are at the edge of the air bubbles. The greater the sum of the probability of the air bubbles at the edge of all the pixels at the edge of the air bubbles, the larger the area formed by the connection of all the pixels at the edge of the air bubbles.
[0068] In a sequence of grayscale images of polyurethane pillow cores, contour detection technology is used to calculate the minimum bounding rectangle of each bubble connected region in each grayscale image of the polyurethane pillow core, thereby obtaining the minimum bounding rectangle of each bubble connected region in each grayscale image of the polyurethane pillow core. Contour detection technology is a well-known technique, and its specific method will not be described here.
[0069] The first grayscale image of the polyurethane pillow core is denoted as the initial grayscale image of the polyurethane pillow core.
[0070] The specific formula for calculating the initial non-uniformity of the initial polyurethane pillow core grayscale image is as follows:
[0071]
[0072] in, This indicates the initial non-uniformity of the initial polyurethane pillow core grayscale image; The first grayscale image of the initial polyurethane pillow core represents the... The length of the minimum bounding rectangle of a bubble connected region; The first grayscale image of the initial polyurethane pillow core represents the... The width of the minimum bounding rectangle of each bubble connected region; This represents the number of all bubble edge pixels in the initial polyurethane pillow core grayscale image; This represents the total number of pixels in the initial grayscale image of the polyurethane pillow core; This represents the number of bubble connected components in the initial polyurethane pillow core grayscale image; The first grayscale image of the initial polyurethane pillow core represents the... The probability of the bubble edge at each bubble edge pixel.
[0073] It should be noted that: The larger the value, the larger the sum of the areas of the smallest bounding rectangles outside the connected regions of all bubbles, indicating a greater initial non-uniformity in the initial polyurethane pillow core grayscale image; the more pixels at the bubble edges, the greater the initial non-uniformity. The larger it is, the more... The larger the value, the greater the initial non-uniformity of the initial polyurethane pillow core grayscale image; the higher the bubble edge probability of the bubble edge pixels, the better. The larger the value, the greater the initial non-uniformity of the initial polyurethane pillow core grayscale image.
[0074] Through the above process, the initial non-uniformity of the initial polyurethane pillow core grayscale image was obtained.
[0075] Step S005: Based on the number of pixels in each bubble connected region of each polyurethane pillow core grayscale image and the grayscale value of all pixels, obtain the degree of non-uniformity of each polyurethane pillow core grayscale image.
[0076] It should be noted that when the pouring is uneven, as the polyurethane foams, the bubbles gradually expand, and the area of the bubble connected regions increases. However, as the area of the bubble connected regions increases, the impact of illumination on the recognition of the bubble connected regions gradually increases due to the unevenness of the bubble connected regions. The greater the change in area, the greater the degree of unevenness of the polyurethane. Furthermore, during the foaming process, the distance between all bubble edge pixels in the grayscale image of the polyurethane pillow core increases, and as the bubble connected regions merge with the expansion, the centroids of each region become more sparse, resulting in a greater change in the degree of unevenness of the polyurethane.
[0077] With the first Taking the grayscale image of a polyurethane pillow core as an example, the first... The minimum distance between the centroids of any two connected bubble regions in the grayscale image of the polyurethane pillow core is denoted as the i-th value. Minimum centroid distance of a grayscale image of a polyurethane pillow core.
[0078] Then the first The formula for calculating the degree of non-uniformity in the grayscale image of a polyurethane pillow core is as follows:
[0079]
[0080] in, Indicates the first The degree of unevenness in the grayscale image of the polyurethane pillow core; No. The number of bubble connected components in a grayscale image of a polyurethane pillow core. Indicates the first The first grayscale image of Zhang polyurethane pillow core The average grayscale value of all pixels in the connected region of each bubble; Indicates the first The first grayscale image of Zhang polyurethane pillow core The area of each bubble connected region; Indicates the first The square of the minimum centroid distance in the grayscale image of a polyurethane pillow core; Indicates the first The number of all bubble edge pixels in the grayscale image of the polyurethane pillow core; Indicates the first The number of all pixels in the grayscale image of the polyurethane pillow core.
[0081] It should be noted that: when the first The larger the area of the connected regions of bubbles in the grayscale image of a polyurethane pillow core, the better. The larger the value, the better. The higher the degree of unevenness in the grayscale image of the polyurethane pillow core, the better. The more pixels at the edge of the bubbles in a grayscale image of a polyurethane pillow core, the better. The larger the value, the greater the proportion of pixels at the edge of the bubble in the image. The larger the value, the greater the influence of the bubble; therefore, the current bubble... The unevenness of the images The higher.
[0082] It should be further explained that during the calculation of the bubble connected region area, some bubble connected regions have higher gray values due to the influence of illumination, which resembles the background area. In order to minimize the interference of the background area edge on the calculation of the bubble connected region area without ignoring this part of the bubble connected region, the average gray value of all pixels in the bubble connected region is converted into a coefficient of the bubble connected region area, thereby reducing the influence of the background area with lighter gray values on the calculation of the bubble connected region area.
[0083] Through the above process, we obtain the first... The degree of unevenness in the grayscale image of the polyurethane pillow core.
[0084] The grayscale image of each polyurethane pillow core is processed according to the above process to obtain the degree of unevenness of the grayscale image of each polyurethane pillow core.
[0085] Step S006: Based on the degree of non-uniformity of each polyurethane pillow core grayscale image and the initial non-uniformity of the initial polyurethane pillow core grayscale image, obtain the final uniformity of the polyurethane pillow core casting; based on the final uniformity of the polyurethane pillow core casting, obtain the final test result of the polyurethane pillow core casting.
[0086] It should be noted that the final uniformity of the polyurethane pillow core casting is obtained by combining the difference in the degree of non-uniformity between two adjacent grayscale images of the polyurethane pillow core with the initial degree of non-uniformity of the initial polyurethane pillow core grayscale image. Finally, the final test result of the polyurethane pillow core casting is obtained.
[0087] With the first Taking the grayscale image of a polyurethane pillow core as an example, the first... The degree of unevenness in the grayscale image of the polyurethane pillow core is related to the first The absolute value of the difference in the degree of non-uniformity of the grayscale image of the polyurethane pillow core is denoted as the first value. The degree of uneven variation in the difference of grayscale images of polyurethane pillow cores.
[0088] It should be noted that the degree of uneven variation in the difference of the last polyurethane pillow core grayscale image is not calculated.
[0089] The specific formula for calculating the final uniformity of polyurethane pillow core casting is as follows:
[0090]
[0091] in, This indicates the final uniformity of the polyurethane pillow core casting. This indicates the initial non-uniformity of the initial polyurethane pillow core grayscale image; This indicates the number of grayscale images of the polyurethane pillow core; Indicates the first The degree of uneven variation in the difference values of the grayscale image of the polyurethane pillow core; This represents the hyperbolic tangent function.
[0092] It should be noted that: The larger the value, the smaller the change in polyurethane during the expansion process, and the more uniform the polyurethane casting. The smaller the value, the greater the initial non-uniformity of the initial polyurethane pillow core grayscale image, indicating that the polyurethane casting is more uneven.
[0093] Through the above process, the final uniformity of the polyurethane pillow core casting was obtained.
[0094] When the final uniformity of the polyurethane pillow core casting is greater than At that time, it was determined that the polyurethane pillow core was poured evenly. Among them, It is a preset level threshold; in this embodiment, the preset level threshold is... The value is 0.9, and we will use this as an example for explanation.
[0095] Through the above process, the final test results of the polyurethane pillow core casting were obtained.
[0096] This invention is now complete.
[0097] In summary, in this embodiment of the invention, a sequence of grayscale images of polyurethane pillow cores is obtained. Edge pixels, gradient magnitudes, and edge lines are extracted from the grayscale images of the polyurethane pillow cores. By analyzing the gradient magnitudes and grayscale values of the edge pixels, the probability of bubble edges is determined, and bubble edge pixels are selected to form bubble connected components. The initial non-uniformity of the first polyurethane pillow core grayscale image is calculated. The degree of non-uniformity variation is calculated using the number of bubble connected component pixels and grayscale values in each polyurethane pillow core grayscale image. Combining the initial non-uniformity and the degree of non-uniformity variation in each polyurethane pillow core grayscale image, the uniformity of polyurethane pillow core casting is calculated, and the final detection result is obtained. This invention obtains more accurate uniformity detection results by analyzing the morphology of bubbles in the initial image and the morphology of bubbles during the foaming process.
[0098] The present invention also provides a polyurethane pillow core casting uniformity detection system, including a memory, a processor, and a computer program stored in the memory and executable on the processor. The processor executes the computer program stored in the memory to implement the steps of the aforementioned polyurethane pillow core casting uniformity detection method.
[0099] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for detecting the uniformity of polyurethane pillow core casting, characterized in that, The method includes the following steps: Obtain the grayscale image sequence of the polyurethane pillow core; In the polyurethane pillow core grayscale image sequence, obtain several edge pixels, the gradient magnitude of each edge pixel, and several edge lines formed by the edge pixels in each polyurethane pillow core grayscale image. Based on the gradient magnitude and grayscale value of each edge pixel in each polyurethane pillow core grayscale image, the bubble edge probability of each edge pixel in each polyurethane pillow core grayscale image is obtained; based on the bubble edge probability of each edge pixel in each polyurethane pillow core grayscale image, several bubble edge pixels are selected from the edge pixels in each polyurethane pillow core grayscale image; based on all the bubble edge pixels in each polyurethane pillow core grayscale image, several bubble connected components of each polyurethane pillow core grayscale image are obtained; The first polyurethane pillow core grayscale image in the polyurethane pillow core grayscale image sequence is denoted as the initial polyurethane pillow core grayscale image. The initial non-uniformity of the initial polyurethane pillow core grayscale image is obtained based on the number of pixels in each bubble connected region of the initial polyurethane pillow core grayscale image and the bubble edge probability of all bubble edge points. The degree of unevenness in each polyurethane pillow core grayscale image is obtained by considering the number of pixels in each bubble connected region and the grayscale value of all pixels in each image. Based on the degree of non-uniformity in each polyurethane pillow core grayscale image and the initial non-uniformity in the initial polyurethane pillow core grayscale image, the final uniformity of the polyurethane pillow core casting is obtained; based on the final uniformity of the polyurethane pillow core casting, the final test result of the polyurethane pillow core casting is obtained. The specific formula for calculating the initial non-uniformity of the obtained initial polyurethane pillow core grayscale image is as follows: in, This indicates the initial non-uniformity of the initial polyurethane pillow core grayscale image; The first grayscale image of the initial polyurethane pillow core represents the... The length of the minimum bounding rectangle of a bubble connected region; The first grayscale image of the initial polyurethane pillow core represents the... The width of the minimum bounding rectangle of each bubble connected region; This represents the number of all bubble edge pixels in the initial polyurethane pillow core grayscale image; This represents the total number of pixels in the initial grayscale image of the polyurethane pillow core; This represents the number of bubble connected components in the initial polyurethane pillow core grayscale image; The first grayscale image of the initial polyurethane pillow core represents the... The probability of bubble edge at each bubble edge pixel; The specific steps for obtaining the degree of non-uniformity variation in each polyurethane pillow core grayscale image are as follows: The first The minimum distance between the centroids of any two connected bubble regions in the grayscale image of the polyurethane pillow core is denoted as the i-th value. Minimum centroid distance of a grayscale image of a polyurethane pillow core; According to the The minimum centroid distance, the number of pixels in each bubble connected region, and the grayscale values of all pixels in the grayscale image of the polyurethane pillow core are used to obtain the first... The degree of unevenness in the grayscale image of the polyurethane pillow core; the obtained first The specific formula for calculating the degree of non-uniformity in the grayscale image of a polyurethane pillow core is as follows: in, Indicates the first The degree of unevenness in the grayscale image of the polyurethane pillow core; No. The number of bubble connected components in a grayscale image of a polyurethane pillow core. Indicates the first The first grayscale image of Zhang polyurethane pillow core The average grayscale value of all pixels in the connected region of each bubble; Indicates the first The first grayscale image of Zhang polyurethane pillow core The area of each bubble connected region; Indicates the first The square of the minimum centroid distance in the grayscale image of a polyurethane pillow core; Indicates the first The number of all bubble edge pixels in the grayscale image of the polyurethane pillow core; Indicates the first The number of all pixels in the grayscale image of the polyurethane pillow core; The specific steps involved in achieving the final uniformity of the polyurethane pillow core casting are as follows: The first The degree of unevenness in the grayscale image of the polyurethane pillow core is related to the first The absolute value of the difference in the degree of non-uniformity of the grayscale image of the polyurethane pillow core is denoted as the first value. The degree of uneven variation in the difference values of the grayscale image of the polyurethane pillow core; The final uniformity of the polyurethane pillow core casting is obtained based on the degree of unevenness in the difference between each polyurethane pillow core grayscale image and the initial unevenness of the initial polyurethane pillow core grayscale image; the specific calculation formula for obtaining the final uniformity of the polyurethane pillow core casting is as follows: in, This indicates the final uniformity of the polyurethane pillow core casting. This indicates the initial non-uniformity of the initial polyurethane pillow core grayscale image; This indicates the number of grayscale images of the polyurethane pillow core; Indicates the first The degree of uneven variation in the difference values of the grayscale image of the polyurethane pillow core; This represents the hyperbolic tangent function.
2. The method for detecting the uniformity of polyurethane pillow core casting according to claim 1, characterized in that, The specific formula for calculating the bubble edge probability of each edge pixel in each polyurethane pillow core grayscale image based on the gradient magnitude and grayscale value of each edge pixel is as follows: in, Indicates the first The first grayscale image of Zhang polyurethane pillow core Bubble edge probability of each edge pixel; Indicates the first The first grayscale image of Zhang polyurethane pillow core Gradient magnitude of each edge pixel; Indicates the first The first grayscale image of Zhang polyurethane pillow core The maximum gradient magnitude of all edge pixels on the edge line where the edge pixel is located; Indicates the first In the grayscale image of Zhang polyurethane pillow core, and the first The first edge pixel is adjacent to the first... The grayscale value of each pixel; Indicates the first The first grayscale image of Zhang polyurethane pillow core The grayscale value of each edge pixel; Indicates the first The first grayscale image of Zhang polyurethane pillow core The number of pixels adjacent to each edge pixel; express Belongs to the interval [1, All within the time frame The maximum value; This represents the linear normalization function.
3. The method for detecting the uniformity of polyurethane pillow core casting according to claim 1, characterized in that, The specific steps for selecting a number of bubble edge pixels from the edge pixels in each polyurethane pillow core grayscale image based on the bubble edge probability of each edge pixel are as follows: When the The first grayscale image of Zhang polyurethane pillow core The probability of a bubble edge at each edge pixel is greater than [value missing]. At that time, the first The first grayscale image of Zhang polyurethane pillow core The nth edge pixel, denoted as the nth edge pixel. The pixels representing the edges of air bubbles in a grayscale image of a polyurethane pillow core; among them... It is a preset probability threshold.
4. The method for detecting the uniformity of polyurethane pillow core casting according to claim 1, characterized in that, The specific steps for obtaining the final test result of the polyurethane pillow core casting based on the final uniformity of the casting are as follows: When the final uniformity of the polyurethane pillow core casting is greater than At that time, it was determined that the polyurethane pillow core was poured evenly; among them, It is a preset threshold.
5. A polyurethane pillow core casting uniformity detection system, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the computer program is executed by the processor, it implements the steps of the polyurethane pillow core casting uniformity detection method as described in any one of claims 1-4.
Citation Information
Patent Citations
Slow-resilience polyurethane (PU) pillow casting machine
CN217802818U
Foaming uniformity test imaging apparatus and method for metal sandwich panel with polyurethane core
WO2023138582A1