A method and device for detecting a foaming region, an electronic device, and a storage medium

By obtaining the relative positional relationship between the foamed area and the target panel, and combining visible light and infrared images, the position of the foamed area in the visible light image is calculated, and the detection result is determined by the temperature difference. This solves the problem of the difficulty in accurately determining the position of the foamed area and improves the detection accuracy.

CN119310134BActive Publication Date: 2026-02-03HANGZHOU HIKVISION SYST TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202411863734.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-17
Publication Date
2026-02-03
Estimated Expiration
2044-12-17

AI Technical Summary

Technical Problem

When manufacturing thermal insulation products, the foaming area is located inside the outer shell, making it difficult to directly and accurately determine its location. This results in low accuracy of foaming area marking, which in turn affects the accuracy of test results.

Method used

By obtaining the relative positional relationship between the foamed area of ​​the product under test and the target panel, and combining visible light and infrared images, the regional position of the foamed area in the visible light image is calculated, and the detection result of the foamed area is determined based on the temperature difference between the infrared image and the ambient temperature.

Benefits of technology

This improved the accuracy of foam area detection, reduced the impact of positional errors on the detection results, and ensured the accuracy of the detection results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119310134B_ABST
    Figure CN119310134B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a foaming area detection method and device, electronic equipment and storage medium, and relate to the technical field of product testing. The method comprises: obtaining a relative position relationship between a foaming area of a product to be tested and a target panel where the product to be tested is located, and a visible light image and an infrared image of the product to be tested, wherein the visible light image and the infrared image comprise the target panel; detecting contour information of the target panel from the visible light image; calculating a region position of the foaming area in the visible light image according to the contour information and the relative position relationship; and determining a detection result of the foaming area based on a temperature difference between a temperature corresponding to the region position in the infrared image and an ambient temperature. The contour information of the target panel and the relative position relationship between the foaming area and the target panel are used to calculate the region position of the foaming area of the product in the visible light image, thereby improving the accuracy of the detection result of the foaming area.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of product testing technology, and in particular to a method, apparatus, electronic device and storage medium for detecting foamed areas. Background Technology

[0002] In the manufacture of insulated products such as refrigerators and water heaters, a foaming process is typically used to create a foamed area between the outer and inner shells of the product to achieve its insulation function and improve energy efficiency. Taking refrigerators as an example, by filling the space between the outer and inner shells with a foaming agent and rigid foam material, a foamed area is formed between the outer and inner shells, reducing cold air leakage and hot air ingress, thus achieving an insulation effect.

[0003] Since the thermal insulation performance of a product is closely related to the uniformity of the foaming area, it is necessary to test whether the foaming area of ​​the product is uniform during the production process. However, the foaming area is located inside the shell, making it difficult to directly and accurately determine the specific location of the foaming area, resulting in low accuracy of foaming area marking and consequently poor accuracy of test results. Summary of the Invention

[0004] The purpose of this application is to provide a method, apparatus, electronic device, and storage medium for detecting foamed areas, so as to calculate the location of the foamed area of ​​a product in a visible light image, thereby improving the accuracy of the detection results of the foamed area. The specific technical solution is as follows:

[0005] In a first aspect, embodiments of this application provide a method for detecting foamed areas, the method comprising:

[0006] The relative positional relationship between the foamed area of ​​the product under test and its target panel is obtained, as well as the visible light image and infrared image of the product under test, wherein the visible light image and infrared image include the target panel;

[0007] Detect the contour information of the target panel from the visible light image;

[0008] Based on the contour information and the relative positional relationship, the position of the foaming region in the visible light image is calculated;

[0009] The detection result of the foaming area is determined based on the temperature difference between the temperature corresponding to the location of the area in the infrared image and the ambient temperature.

[0010] Optionally, the step of calculating the regional position of the foaming region in the visible light image based on the contour information and the relative positional relationship includes:

[0011] Based on the contour information and the relative positional relationship, the image margin between the foamed region and the target panel in the visible light image is calculated, wherein the contour information includes the vertex coordinates and / or contour dimensions of the target panel; the relative positional relationship includes the ratio between the actual margin between the foamed region and the target panel and the actual size of the target panel;

[0012] Based on the contour information and the image margin, the location of the foaming region in the visible light image is calculated.

[0013] Optionally, the target panel and the foaming area are rectangular areas;

[0014] The step of calculating the image margin between the foamed region and the target panel in the visible light image based on the contour information and the relative positional relationship includes:

[0015] Calculate the contour length and multiply it by the proportional relationship between the target panel and the foamed area in the length direction to obtain at least one image margin between the foamed area and the target panel in the visible light image in the length direction.

[0016] Calculate the contour width and multiply it by the proportional relationship between the target panel and the foamed area in the width direction to obtain at least one image margin of the foamed area and the target panel in the width direction in the visible light image.

[0017] Optionally, the step of calculating the location of the foaming region in the visible light image based on the contour information and the image margin includes:

[0018] Based on the vertex coordinates of the first panel vertex of the target panel, the image margin corresponding to the first panel vertex in the length direction, and the image margin corresponding to the first panel vertex in the width direction, calculate the vertex coordinates of the first target vertex corresponding to the foaming area and the first panel vertex.

[0019] Based on the contour information, the vertex coordinates of other target vertices in the foaming region are calculated.

[0020] Optionally, the step of calculating the vertex coordinates of other target vertices in the foaming region based on the contour information includes:

[0021] Based on the contour information, calculate the vertex coordinates of the second target vertex adjacent to the first target vertex;

[0022] Based on the first target vertex, the second target vertex, and the relative positional relationship, calculate the vertex coordinates of the other target vertices in the foaming region.

[0023] Optionally, the step of calculating the vertex coordinates of other target vertices in the foaming region based on the contour information includes:

[0024] Based on the vertex coordinates of the second panel vertex of the target panel, the image margin corresponding to the second panel vertex in the length direction, and the image margin corresponding to the second panel vertex in the width direction, calculate the vertex coordinates of the second target vertex corresponding to the foaming region and the second panel vertex.

[0025] Based on the vertex coordinates of the third panel vertex of the target panel, the image margin corresponding to the third panel vertex in the length direction, and the image margin corresponding to the third panel vertex in the width direction, calculate the vertex coordinates of the third target vertex corresponding to the foaming region and the third panel vertex.

[0026] Based on the vertex coordinates of the fourth panel vertex of the target panel, the image margin corresponding to the fourth panel vertex in the length direction, and the image margin corresponding to the fourth panel vertex in the width direction, the vertex coordinates of the fourth target vertex corresponding to the foaming region and the fourth panel vertex are calculated.

[0027] Optionally, the relative positional relationship also includes a preset first proportional relationship between the foamed area and the target panel in the length direction, and a preset second proportional relationship between the foamed area and the target panel in the width direction;

[0028] The step of calculating the vertex coordinates of the second target vertex adjacent to the first target vertex based on the contour information includes:

[0029] Based on the first target vertex, the contour length, and the first proportional relationship, calculate the vertex coordinates of the second target vertex adjacent to the first target vertex in the length direction;

[0030] The step of calculating the vertex coordinates of other target vertices in the foaming region based on the first target vertex, the second target vertex, and the relative positional relationship includes:

[0031] Based on the first target vertex, the contour width, and the second proportional relationship, calculate the vertex coordinates of the third target vertex adjacent to the first target vertex in the width direction;

[0032] Based on the second target vertex, the contour width, and the second proportional relationship, calculate the vertex coordinates of the fourth target vertex adjacent to the second target vertex in the width direction.

[0033] Optionally, the relative positional relationship also includes a preset aspect ratio of the actual length and width of the foaming area;

[0034] The step of calculating the vertex coordinates of the second target vertex adjacent to the first target vertex based on the contour information includes:

[0035] The vertex coordinates of the second target vertex adjacent to the first target vertex are calculated based on the vertex coordinates of the adjacent panel vertex, the image margin corresponding to the adjacent panel vertex in the length direction, and the image margin corresponding to the adjacent panel vertex in the width direction.

[0036] The step of calculating the vertex coordinates of other target vertices in the foaming region based on the first target vertex, the second target vertex, and the relative positional relationship includes:

[0037] Based on the first target vertex and the second target vertex, calculate the first length of the first edge where the first target vertex and the second target vertex are located;

[0038] Based on the first length and the actual length-to-width ratio of the foamed area, calculate the second length of the adjacent side of the first edge;

[0039] Based on the second length, the first target vertex, and the second target vertex, calculate the vertex coordinates of the other target vertices in the foaming region.

[0040] Optionally, the step of calculating the location of the foaming region in the visible light image based on the contour information and the image margin includes:

[0041] For each edge of the target panel in the visible light image, within the outline of the target panel, a straight line parallel to the edge and at a distance equal to the target image margin is constructed, wherein the target image margin is the image margin between the edge of the foaming region in the visible light image that is parallel to the edge and close to the edge and the edge.

[0042] The location of the area enclosed by the four constructed straight lines is determined as the location of the foaming area in the visible light image.

[0043] Optionally, the relative positional relationship further includes a preset aspect ratio of the actual length and width of the foamed area; before the step of determining the detection result of the foamed area based on the temperature difference between the temperature corresponding to the location of the area in the infrared image and the ambient temperature, the method further includes:

[0044] Based on the vertex coordinates of the four target vertices of the foamed region, calculate the length and width of the foamed region in the visible light image, and calculate the current aspect ratio of the foamed region in the visible light image;

[0045] If the difference between the current aspect ratio and the actual aspect ratio is greater than a preset aspect ratio threshold, the position of the foaming area is adjusted according to the difference.

[0046] The step of determining the detection result of the foaming area based on the temperature difference between the temperature corresponding to the location of the area in the infrared image and the ambient temperature includes:

[0047] The detection result of the foaming area is determined based on the temperature difference between the temperature corresponding to the adjusted area location in the infrared image and the ambient temperature.

[0048] Optionally, the foamed area is located between the target panel and the inner shell of the product under test, with the target panel obscuring the foamed area.

[0049] Optionally, the step of obtaining the relative positional relationship between the foamed area of ​​the product under test and its target panel includes:

[0050] Identify the product identifier of the product under test in the visible light image of the product under test;

[0051] Based on the product identifier and the preset correspondence between the product identifier and the product size, the product size of the product to be tested is determined, wherein the product size includes the actual edge distance between the foaming area and the target panel, the actual size of the target panel where the foaming area of ​​the product to be tested is located, and the actual size of the foaming area.

[0052] Based on the actual edge distance and the actual size of the target panel, calculate the ratio between the actual edge distance between the foamed area and the target panel and the actual size of the target panel.

[0053] Optionally, the step of determining the detection result of the foaming area based on the temperature difference between the temperature corresponding to the location of the area in the infrared image and the ambient temperature includes:

[0054] Determine whether the temperature difference between the temperature of the region in the infrared image and the ambient temperature is greater than a preset temperature threshold.

[0055] When the temperature difference is greater than the preset temperature threshold, a first type of detection result is generated to characterize the non-uniformity of the foaming area;

[0056] When the temperature difference is not greater than the preset temperature threshold, a second type of detection result is generated, which characterizes the uniformity of the foaming area.

[0057] Secondly, embodiments of this application provide a device for detecting foamed areas, the device comprising:

[0058] The positional relationship acquisition module is used to acquire the relative positional relationship between the foaming area of ​​the product under test and the target panel on which it is located, as well as the visible light image and infrared image of the product under test, wherein the visible light image and infrared image include the target panel;

[0059] An information detection module is used to detect the contour information of the target panel from the visible light image;

[0060] A position calculation module is used to calculate the regional position of the foaming region in the visible light image based on the contour information and the relative positional relationship;

[0061] The result determination module is used to determine the detection result of the foaming area based on the temperature difference between the temperature corresponding to the location of the area in the infrared image and the ambient temperature.

[0062] Optionally, the location calculation module includes:

[0063] The margin calculation submodule is used to calculate the image margin between the foamed region and the target panel in the visible light image based on the contour information and the relative positional relationship, wherein the contour information includes the vertex coordinates and / or contour size of the target panel; the relative positional relationship includes the ratio between the actual margin between the foamed region and the target panel and the actual size of the target panel;

[0064] The position calculation submodule is used to calculate the regional position of the foaming region in the visible light image based on the contour information and the image margin.

[0065] Optionally, the target panel and the foaming area are rectangular areas; the margin calculation submodule includes:

[0066] The first calculation unit is used to calculate the product of the contour length and the proportional relationship between the target panel and the foamed area in the length direction, so as to obtain at least one image margin between the foamed area and the target panel in the visible light image in the length direction.

[0067] The second calculation unit is used to calculate the product of the contour width and the proportional relationship between the target panel and the foamed area in the width direction, so as to obtain at least one image margin of the foamed area and the target panel in the width direction in the visible light image.

[0068] Optionally, the location calculation submodule includes:

[0069] The third calculation unit is used to calculate the vertex coordinates of the first target vertex corresponding to the first panel vertex of the target panel based on the vertex coordinates of the first panel vertex of the target panel, the image margin corresponding to the first panel vertex in the length direction, and the image margin corresponding to the first panel vertex in the width direction;

[0070] The fourth calculation unit is used to calculate the vertex coordinates of other target vertices in the foaming region based on the contour information.

[0071] Optionally, the fourth computing unit includes:

[0072] The first calculation subunit is used to calculate the vertex coordinates of the second target vertex adjacent to the first target vertex based on the contour information;

[0073] The second calculation subunit is used to calculate the vertex coordinates of other target vertices in the foaming region based on the first target vertex, the second target vertex, and the relative positional relationship.

[0074] Optionally, the fourth computing unit includes:

[0075] The third calculation subunit is used to calculate the vertex coordinates of the second target vertex corresponding to the second panel vertex of the target panel based on the vertex coordinates of the second panel vertex of the target panel, the image margin corresponding to the second panel vertex in the length direction, and the image margin corresponding to the second panel vertex in the width direction;

[0076] The fourth calculation subunit is used to calculate the vertex coordinates of the third target vertex corresponding to the third panel vertex of the target panel based on the vertex coordinates of the third panel vertex, the image margin corresponding to the third panel vertex in the length direction, and the image margin corresponding to the third panel vertex in the width direction;

[0077] The fifth calculation subunit is used to calculate the vertex coordinates of the fourth target vertex corresponding to the fourth panel vertex of the target panel based on the vertex coordinates of the fourth panel vertex of the target panel, the image margin corresponding to the fourth panel vertex in the length direction, and the image margin corresponding to the fourth panel vertex in the width direction.

[0078] Optionally, the relative positional relationship further includes a preset first proportional relationship between the foamed area and the target panel in the length direction, and a preset second proportional relationship between the foamed area and the target panel in the width direction; the first calculation subunit is specifically used for:

[0079] Based on the first target vertex, the contour length, and the first proportional relationship, calculate the vertex coordinates of the second target vertex adjacent to the first target vertex in the length direction;

[0080] The second calculation subunit is specifically used for:

[0081] Based on the first target vertex, the contour width, and the second proportional relationship, calculate the vertex coordinates of the third target vertex adjacent to the first target vertex in the width direction; based on the second target vertex, the contour width, and the second proportional relationship, calculate the vertex coordinates of the fourth target vertex adjacent to the second target vertex in the width direction.

[0082] Optionally, the relative positional relationship also includes a preset aspect ratio of the actual length and width of the foaming area; the first calculation subunit is specifically used for:

[0083] The vertex coordinates of the second target vertex adjacent to the first target vertex are calculated based on the vertex coordinates of the adjacent panel vertex, the image margin corresponding to the adjacent panel vertex in the length direction, and the image margin corresponding to the adjacent panel vertex in the width direction.

[0084] The second calculation subunit is specifically used for:

[0085] Based on the first target vertex and the second target vertex, calculate the first length of the first edge where the first target vertex and the second target vertex are located;

[0086] Based on the first length and the actual length-to-width ratio of the foamed area, calculate the second length of the adjacent side of the first edge;

[0087] Based on the second length, the first target vertex, and the second target vertex, calculate the vertex coordinates of the other target vertices in the foaming region.

[0088] Optionally, the location calculation submodule includes:

[0089] A straight line construction unit is used to construct, within the outline of the target panel, a straight line parallel to each edge of the target panel in the visible light image, at a distance equal to the target image margin, wherein the target image margin is the image margin between the edge of the foamed region in the visible light image that is parallel to and close to the edge.

[0090] The position determination unit is used to determine the position of the area enclosed by the four constructed straight lines as the position of the foaming area in the visible light image.

[0091] Optionally, the device further includes:

[0092] The ratio calculation module is used to calculate the length and width of the foamed area in the visible light image based on the vertex coordinates of the four target vertices of the foamed area, before the step of determining the detection result of the foamed area based on the temperature difference between the temperature corresponding to the location of the area in the infrared image and the ambient temperature, and before the step of determining the detection result of the foamed area based on the temperature difference between the temperature corresponding to the location of the area in the infrared image and the ambient temperature, and before the step of determining the detection result of the foamed area in the visible light image.

[0093] The adjustment module is used to adjust the position of the foaming area according to the difference when the difference between the current aspect ratio and the actual aspect ratio is greater than a preset aspect ratio threshold.

[0094] The result determination module includes:

[0095] The result determination submodule is used to determine the detection result of the foaming area based on the temperature difference between the temperature corresponding to the adjusted area position in the infrared image and the ambient temperature.

[0096] Optionally, the foamed area is located between the target panel and the inner shell of the product under test, with the target panel obscuring the foamed area.

[0097] Optionally, the location relationship acquisition module includes:

[0098] The identification submodule is used to identify the product identification of the product under test in the visible light image of the product under test;

[0099] The size determination submodule is used to determine the product size of the product to be tested based on the product identifier and the preset correspondence between the product identifier and the product size. The product size includes the actual edge distance between the foaming area and the target panel, the actual size of the target panel where the foaming area of ​​the product to be tested is located, and the actual size of the foaming area.

[0100] The relationship determination submodule is used to calculate the ratio between the actual edge distance between the foamed area and the target panel and the actual size of the target panel, based on the actual edge distance and the actual size of the target panel.

[0101] Optionally, the result determination module includes:

[0102] The temperature difference determination submodule is used to determine whether the temperature difference between the location of the area in the infrared image and the ambient temperature is greater than a preset temperature threshold; if the temperature difference is greater than the preset temperature threshold, the first generation submodule is triggered; if the temperature difference is not greater than the preset temperature threshold, the second generation submodule is triggered.

[0103] The first generation submodule is used to generate a first type of detection result characterizing the non-uniformity of the foaming region;

[0104] The second generation submodule is used to generate a second type of detection result that characterizes the uniformity of the foaming region.

[0105] Thirdly, embodiments of this application provide an electronic device, including:

[0106] Memory, used to store computer programs;

[0107] A processor, when executing a program stored in memory, implements any of the methods described in the first aspect.

[0108] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements any of the methods described in the first aspect.

[0109] Fifthly, embodiments of this application also provide a computer program product containing instructions that, when run on a computer, cause the computer to execute any of the above-described methods for detecting foamed regions.

[0110] Beneficial effects of the embodiments in this application:

[0111] The technical solution provided in this application embodiment allows an electronic device to acquire the relative positional relationship between the foamed area of ​​the product under test and its target panel, as well as visible light and infrared images of the product under test, wherein the visible light and infrared images include the target panel; detect the contour information of the target panel from the visible light image; calculate the region position of the foamed area in the visible light image based on the contour information and the relative positional relationship; and determine the detection result of the foamed area based on the temperature difference between the temperature corresponding to the region position in the infrared image and the ambient temperature.

[0112] For the product under test, the relative positional relationship between the target panel and the foamed area is determined. Given the fixed position of the target panel, the location of the foamed area in the visible light image can be calculated based on this relative positional relationship. Calculating the location of the foamed area improves the accuracy of foamed area detection. Furthermore, by considering the temperature difference between this location and the ambient temperature, the uniformity of the foamed area can be determined, reducing the impact of location errors on the detection results and improving their accuracy. Of course, implementing any product or method of this application does not necessarily require achieving all of the advantages described above simultaneously. Attached Figure Description

[0113] To more clearly illustrate the technical solutions in the embodiments of this application 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 this application. For those skilled in the art, other embodiments can be obtained based on these drawings.

[0114] Figure 1 A flowchart illustrating a method for detecting a foamed area provided in an embodiment of this application;

[0115] Figure 2 This is a schematic diagram showing the distance between the foamed area of ​​the product under test and the panel on which it is located, provided in an embodiment of this application.

[0116] Figure 3 for Figure 1 A specific flowchart of step S103 in the illustrated embodiment;

[0117] Figure 4(a) is another schematic diagram of the foaming area of ​​the product under test and the edge distance between the panel on which it is located, provided in the embodiment of this application;

[0118] Figure 4(b) is a schematic diagram of the image margin between the foamed area of ​​the product under test and the panel on which it is located, provided in an embodiment of this application.

[0119] Figure 5(a) is a schematic diagram of a target vertex of the foaming region provided in an embodiment of this application;

[0120] Figure 5(b) is another schematic diagram of the target vertex of the foaming region provided in the embodiment of this application;

[0121] Figure 6(a) is a schematic diagram of the length and width ratio of the foamed area to the target panel provided in an embodiment of this application;

[0122] Figure 6(b) is a schematic diagram of the aspect ratio of the foaming area provided in the embodiment of this application;

[0123] Figure 7 A schematic diagram of the foaming area provided in an embodiment of this application;

[0124] Figure 8 This is another schematic diagram of the foaming area provided in an embodiment of this application;

[0125] Figure 9(a) is a schematic diagram of the modules included in an electronic device in a specific example provided in the embodiments of this application;

[0126] Figure 9(b) is a schematic diagram of the execution process of the foaming region detection method in a specific example provided in the embodiments of this application;

[0127] Figure 10 This is a schematic diagram of the structure of a foaming area detection device provided in an embodiment of this application;

[0128] Figure 11 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0129] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art based on this application are within the scope of protection of this application.

[0130] In order to accurately determine the foamed area of ​​a product in a visible light image and thus improve the accuracy of the detection results of the foamed area, this application provides a method, apparatus, electronic device, computer-readable storage medium, and computer program product for detecting the foamed area. The following is a description of a method for detecting the foamed area provided by this application.

[0131] The foam region detection method provided in this application can be applied to any electronic device capable of image detection. For example, it can be an image processing device in an image detection system, a server for image detection, etc., without specific limitations. For clarity, it will be referred to as an electronic device below.

[0132] like Figure 1 As shown, a method for detecting foamed areas, the method comprising:

[0133] S101: Obtain the relative positional relationship between the foaming area of ​​the product under test and its target panel, as well as the visible light image and infrared image of the product under test.

[0134] The visible light image and infrared image include the target panel.

[0135] S102: Detect the contour information of the target panel from the visible light image.

[0136] S103: Calculate the position of the foaming region in the visible light image based on the contour information and the relative positional relationship.

[0137] S104: Determine the detection result of the foaming area based on the temperature difference between the temperature corresponding to the location of the area in the infrared image and the ambient temperature.

[0138] The technical solution provided in this application embodiment allows an electronic device to acquire the relative positional relationship between the foamed area of ​​the product under test and its target panel, as well as visible light and infrared images of the product under test, wherein the visible light and infrared images include the target panel; detect the contour information of the target panel from the visible light image; calculate the region position of the foamed area in the visible light image based on the contour information and the relative positional relationship; and determine the detection result of the foamed area based on the temperature difference between the temperature corresponding to the region position in the infrared image and the ambient temperature.

[0139] For the product under test, the relative positional relationship between the target panel and the foamed area is determined. Given this fixed position, the location of the foamed area in the visible light image can be calculated based on this relative relationship. Calculating the location of the foamed area improves the accuracy of its detection. Furthermore, by analyzing the temperature difference between this location and the ambient temperature, the uniformity of the foamed area can be determined, reducing the impact of location errors on the detection results and further enhancing their accuracy.

[0140] For insulated products such as refrigerators and water heaters, their insulation function is achieved through a foamed area between the outer and inner shells. The uniformity of this foamed area directly affects the product's performance. Therefore, checking the uniformity of the foamed area is a crucial step in the production process.

[0141] Because the foamed area can prevent the product's temperature from spreading, when the foamed area is uniform, the temperature difference between the panel where the foamed area is located and the ambient temperature in the infrared image is small. However, when the foamed area is uneven, the internal temperature of the product spreads to the panel where the foamed area is located, resulting in a larger temperature difference between the panel where the foamed area is located and the ambient temperature in the infrared image due to the influence of the internal temperature of the product.

[0142] Therefore, the uniformity of the foamed area of ​​the product can be tested based on the visible light and infrared images of the target panel where the foamed area of ​​the product is located.

[0143] In step S101 above, the electronic device can acquire the relative positional relationship between the foamed area of ​​the product under test and its target panel, as well as the visible light image and infrared image of the product under test. The visible light image and infrared image include the target panel.

[0144] When testing the uniformity of the foamed area of ​​a product, electronic devices can acquire visible light and infrared images of the product under test. Both the visible light and infrared images include the target panel where the foamed area is located.

[0145] In one implementation, the electronic device may be equipped with a first image acquisition device for acquiring visible light images and a second image acquisition device for acquiring infrared images. The electronic device can use its own first and second image acquisition devices to acquire visible light and infrared images of the product under test. Since both the visible light and infrared images are mounted on the same electronic device, by setting the acquisition parameters for the visible light and infrared images, the visible light and infrared images can be acquired from the same viewing angle, and the target panel's position corresponds to the position in the visible light and infrared images. Correspondingly, the position of the foaming area also corresponds to the position in the visible light and infrared images.

[0146] In one implementation, an image acquisition device that communicates with an electronic device can acquire visible light and infrared images of the product under test, and the electronic device can acquire visible light and infrared images of the product under test acquired by other image acquisition devices.

[0147] In one implementation, the electronic device may be equipped with a first image acquisition device for acquiring visible light images. The electronic device can acquire visible light images of the product under test and obtain infrared images of the product under test by communicating with the image acquisition device for acquiring infrared images.

[0148] Accordingly, in one implementation, the electronic device may be equipped with a second image acquisition device for acquiring infrared images. The electronic device can acquire infrared images of the product under test and obtain visible light images of the product under test by communicating with other image acquisition devices for acquiring visible light images.

[0149] In one embodiment of this application, the foaming area is located between the target panel and the inner shell of the product to be tested, and the target panel covers the foaming area.

[0150] Since the foamed area of ​​the product under test is located between the target panel and the inner shell of the product under test, and the foamed area is located inside the target panel, the foamed area is blocked by the target panel both on the actual product and in the visible light image of the product. Therefore, the location of the foamed area cannot be directly determined either on the target panel of the product under test or in the visible light and infrared images of the product under test.

[0151] For the product under test, the foaming area of ​​the product is fixed, and the relative positional relationship between the foaming area of ​​the product and the target panel where the foaming area is located is determined.

[0152] The relative positional relationship may include the actual margin between the foamed area and the target panel, the ratio of the actual margin between the foamed area and the target panel to the actual size of the target panel, or other data that can characterize the relative position between the foamed area and the target panel. Of course, the relative positional relationship may also include the actual aspect ratio of the foamed area, the first proportional relationship between the foamed area and the target panel in the length direction, etc., which are not specifically limited here.

[0153] For example, such as Figure 2 As shown, a foamed area 210 can be provided between the back panel and the inner shell of the refrigerator, and a foamed area 220 can be provided between the side panel and the inner shell of the refrigerator. After filling, the left, right, top, and bottom distances between the foamed area 210 and the back panel are all determined, as are the distances between the foamed area 220 and the side panel.

[0154] Since the relative positional relationship between the foamed area and its target panel is fixed, the positions of the foamed area and its target panel in the visible light image of the product under test also satisfy the aforementioned relative positional relationship. Based on this, the electronic device can obtain the relative positional relationship between the foamed area of ​​the product under test and its target panel, and use this relative positional relationship to determine the location of the foamed area in the visible light image.

[0155] In one implementation, when the relative positional relationship between the foamed area and the target panel is the actual margin between the foamed area and the target panel, the electronic device can obtain the actual size of the target panel after obtaining the relative positional relationship between the foamed area and the target panel, and calculate the ratio between the actual margin between the foamed area and the target panel and the actual size of the target panel.

[0156] Furthermore, in step S102 above, the electronic device can detect the contour information of the target panel from the visible light image.

[0157] After acquiring a visible light image of the product under test, the electronic device can detect the contour information of the target panel of the product under test from the visible light image. This contour information includes the vertex coordinates of the target panel and the contour dimensions of the target panel.

[0158] In one implementation, the electronic device can use a preset contour extraction algorithm to extract the contour information of the target panel from a visible light image.

[0159] In one implementation, the electronic device can use a preset instance segmentation algorithm to segment the target panel of the product under test from a visible light image, and then extract the contour information of the target panel.

[0160] In step S103 above, the electronic device can calculate the location of the foaming region in the visible light image based on the contour information and relative positional relationship.

[0161] After obtaining the outline information of the target panel in the visible light image, as well as the relative positional relationship between the foamed area and the target panel, the electronic device can use the outline information and the relative positional relationship to calculate the regional position of the foamed area in the visible light image.

[0162] In one implementation, given the relative positional relationship between the actual margin between the foamed region and the target panel and the actual size of the target panel, the electronic device can use the aforementioned contour information and the aforementioned proportional relationship to calculate the image margin between the foamed region and the target panel in the visible light image. Then, using the coordinates of each vertex of the target panel and the aforementioned image margin, the regional position of the foamed region in the visible light image is calculated.

[0163] In one implementation, given the relative positional relationship between the actual margin between the foamed region and the target panel and the actual size of the target panel, the electronic device can use the aforementioned contour information and the aforementioned proportional relationship to calculate the image margin between the foamed region and the target panel in a visible light image. Then, using the contour of the target panel and the aforementioned image margin, a straight line containing the edge of the foamed region is constructed to obtain the regional position of the foamed region.

[0164] In step S104 above, the electronic device can determine the detection result of the foaming area based on the temperature difference between the temperature corresponding to the area location in the infrared image and the ambient temperature.

[0165] Because the foamed area can prevent the product's temperature from spreading, when the foamed area is uniform, the temperature difference between the panel where the foamed area is located and the ambient temperature in the infrared image is small. However, when the foamed area is uneven, the internal temperature of the product spreads to the panel where the foamed area is located, resulting in a larger temperature difference between the panel where the foamed area is located and the ambient temperature in the infrared image due to the influence of the internal temperature of the product.

[0166] Furthermore, since infrared images can display the temperature values ​​of various regions in the image, after the electronic device determines the location of the foaming area in the visible light image, it can further determine the temperature corresponding to that location in the infrared image. Then, based on the temperature difference between the temperature of that location in the infrared image and the ambient temperature, the detection result of the foaming area is determined.

[0167] In one implementation, when the image acquisition parameters of the visible light image and the infrared image are matched, the temperature of the region in the infrared image that is at the same location as the area can be determined as the temperature corresponding to that location in the infrared image, and the temperature difference between that temperature and the ambient temperature can be calculated to determine the detection result of the foaming area.

[0168] In one implementation, when the image acquisition parameters of the visible light image and the infrared image do not match, the visible light image and the infrared image can be matched. The temperature of the region in the infrared image that matches the location of the area can be determined as the temperature corresponding to the location of the area in the infrared image. The temperature difference between this temperature and the ambient temperature can be calculated to determine the detection result of the foaming area.

[0169] In one implementation, if the temperature difference between the region's temperature in the infrared image and the ambient temperature is greater than a preset temperature difference threshold, the detection result of the foamed region is determined to be that the foamed region is non-uniform; if the temperature difference between the region's temperature in the infrared image and the ambient temperature is not greater than the preset temperature difference threshold, the detection result of the foamed region is determined to be that the foamed region is uniform.

[0170] As can be seen, the technical solution provided in this application allows an electronic device to acquire the relative positional relationship between the foamed area of ​​the product under test and its target panel, as well as visible light and infrared images of the product under test, wherein the visible light and infrared images include the target panel; detect the contour information of the target panel from the visible light image; calculate the regional position of the foamed area in the visible light image based on the contour information and the relative positional relationship; and determine the detection result of the foamed area based on the temperature difference between the temperature corresponding to the regional position in the infrared image and the ambient temperature. For the product under test, the relative positional relationship between the target panel and the foamed area is determined. Given the determined position of the target panel, the regional position of the foamed area in the visible light image can be calculated based on this relative positional relationship. By calculating the regional position of the foamed area, the accuracy of foamed area detection is improved. Furthermore, by detecting the uniformity of the foamed area based on the temperature difference between the regional position and the ambient temperature, the influence of regional position errors on the detection results can be reduced, thereby improving the accuracy of the detection results.

[0171] As one implementation method of this application, such as Figure 3 As shown, step S103 above, namely the step of calculating the regional position of the foaming region in the visible light image based on the contour information and the relative positional relationship, may include:

[0172] S301: Calculate the image margin between the foamed area and the target panel in the visible light image based on the contour information and the relative positional relationship.

[0173] The contour information includes the vertex coordinates and / or contour dimensions of the target panel; the relative positional relationship includes the ratio between the actual edge distance between the foamed area and the target panel and the actual size of the target panel.

[0174] The relative positional relationship between the foamed area and the target panel acquired by the electronic device includes the ratio between the actual margin between the foamed area and the target panel and the actual size of the target panel. Whether in the actual product or in various images of the target panel, the positional relationship between the foamed area and the target panel satisfies the above-mentioned relative positional relationship; that is, whether in the actual product or in various images of the target panel, the margin between the foamed area and the target panel and the size of the target panel satisfy the aforementioned proportional relationship.

[0175] Contour information includes the vertex coordinates and / or contour dimensions of the target panel in the visible light image. That is, contour information can be the vertex coordinates and contour dimensions of the target panel in the visible light image; contour information can be the vertex coordinates of the target panel in the visible light image; contour information can be the contour dimensions of the target panel in the visible light image.

[0176] In one implementation, the contour information can be the vertex coordinates of the target panel in a visible light image. Based on the vertex coordinates of the target panel in the visible light image, the electronic device can calculate the contour dimensions of the target panel. For example, when the target panel is rectangular, the contour length of the target panel can be calculated based on the coordinates of two vertices in the length direction, and the contour width of the target panel can be calculated based on the coordinates of two vertices in the width direction; when the target panel is circular, the radius of the target panel can be calculated based on the coordinates of the center of the target panel and the coordinates of the points on the circumference.

[0177] Based on the outline information of the target panel in the visible light image, and the ratio between the actual margin between the foamed area and the target panel and the actual size of the target panel, the electronic device can calculate the image margin between the foamed area and the target panel in the visible light image.

[0178] In one implementation, the contour information can be the vertex coordinates of the target panel in the visible light image. Based on the vertex coordinates of the target panel in the visible light image, the electronic device can calculate the contour size of the target panel and calculate the product of the contour size and the ratio of the actual edge distance between the foamed area and the target panel to the actual size of the target panel, thus obtaining the image edge distance between the foamed area and the target panel in the visible light image.

[0179] In one implementation, the contour information can be the contour size of the target panel in the visible light image. The electronic device can calculate the contour size of the target panel and the product of the ratio of the actual margin between the foamed area and the target panel to the actual size of the target panel to obtain the image margin between the foamed area and the target panel in the visible light image.

[0180] S302: Calculate the location of the foaming region in the visible light image based on the contour information and the image margin.

[0181] Electronic devices can calculate the location of the foamed area in a visible light image based on the outline information of the target panel in the visible light image and the image margin between the foamed area and the target panel.

[0182] In one implementation, the contour information can be the vertex coordinates of the target panel in the visible light image. The electronic device can calculate the vertex coordinates of the four target vertices of the foaming region in the visible light image based on the four vertex coordinates of the target panel in the visible light image and the image margin between the foaming region and the target panel.

[0183] In one implementation, the contour information can be the vertex coordinates of the target panel in the visible light image. The electronic device can construct, within the contour of the target panel for each edge in the visible light image, a straight line parallel to the edge and at a distance equal to the target image margin, within the contour of the target panel. The target image margin is the image margin between the edge of the bubble region in the visible light image that is parallel to and close to the edge. The region position enclosed by the four constructed straight lines is determined as the region position of the bubble region in the visible light image.

[0184] In this embodiment, the electronic device can calculate the image margin between the foamed area and the target panel in the visible light image based on the contour information of the target panel in the visible light image and the ratio between the actual margin between the foamed area and the target panel and the actual size of the target panel. Then, based on the contour information and the image margin, the regional position of the foamed area in the visible light image can be calculated. Since the ratio between the actual margin between the foamed area and the target panel and the actual size of the target panel is fixed, and the image margin between the foamed area and the target panel in the visible light image also satisfies the above ratio, the image margin between the foamed area and the target panel in the visible light image can be calculated based on this ratio and the contour information of the target panel. Furthermore, based on the contour information and the image margin, the regional position of the foamed area can be further calculated, thereby accurately calculating the regional position of the foamed area in the visible light image.

[0185] In one embodiment of this application, the target panel and the foaming area are rectangular areas;

[0186] Step S301 above, namely the step of calculating the image margin between the foamed region in the visible light image and the target panel based on the contour information and the relative positional relationship, may include:

[0187] Calculate the contour length and multiply it by the proportional relationship between the target panel and the foamed area in the length direction to obtain at least one image margin between the foamed area and the target panel in the visible light image in the length direction.

[0188] Calculate the contour width and multiply it by the proportional relationship between the target panel and the foamed area in the width direction to obtain at least one image margin of the foamed area and the target panel in the width direction in the visible light image.

[0189] The image margin between the foamed area and the target panel in the visible light image satisfies the proportional relationship between the actual margin between the target panel and the foamed area and the actual size of the target panel. Furthermore, the image margin between the target panel and the foamed area can be calculated based on the proportional relationship between the actual margin between the target panel and the foamed area and the actual size of the target panel, as well as the outline size of the target panel in the visible light image.

[0190] In cases where the target panel and the foamed area are rectangular regions, to facilitate understanding of the foamed area detection method provided in this application embodiment, the implementation of this application embodiment is described with the target panel's sides parallel to the coordinate axes of the image coordinate system, and the foamed area's sides parallel to the corresponding sides of the target panel as examples. When the sides of the target panel are at a certain angle to the coordinate axes of the image coordinate system, and / or the sides of the foamed area are at a certain angle to the corresponding sides of the target panel, the position information of the foamed area can be calculated according to the angular relationship provided in this application. The electronic device can calculate the contour length and the product of the proportional relationship between the target panel and the foamed area's side distances in the length direction to obtain at least one image side distance between the foamed area and the target panel in the visible light image in the length direction; and calculate the contour width and the product of the proportional relationship between the target panel and the foamed area's side distances in the width direction to obtain at least one image side distance between the foamed area and the target panel in the visible light image in the width direction.

[0191] In the case where the contour information is the vertex coordinates of the target panel in the visible light image, the electronic device can calculate the contour size of the target panel based on the vertex coordinates of the target panel in the visible light image, and obtain the contour length and contour width of the target panel.

[0192] For example, as shown in Figure 4(a), the length direction is the direction where the edge 410 of the target panel is located, and the width direction is the direction where the edge 420 of the target panel is located. The actual length of the target panel is a, and the actual width is b.

[0193] The actual width margins of the target panel and the foam area are top margin (difference) 1 and bottom margin (difference) 2. The proportional relationships of these width margins include the ratio of top margin 1 to the actual width b of the target panel (margin1 / b), and the ratio of bottom margin 2 to the actual width b of the target panel (margin2 / b). Similarly, the actual length margins of the target panel and the foam area are left margin (difference) 3 and right margin (difference) 4. The proportional relationships of these length margins are the ratio of left margin 3 to the actual length a of the target panel (margin3 / a), and the ratio of right margin 4 to the actual length a of the target panel (margin4 / a).

[0194] As shown in Figure 4(b), in the visible light image, the outline length of the target panel is L and the outline width is W. The image margins between the bubble region and the target panel in the width direction (Y direction) of the visible light image include the top margin W×margin(difference)1 / b and the bottom margin W×margin(difference)2 / b. The image margins between the bubble region and the target panel in the length direction (X direction) of the visible light image include the left margin L×margin(difference)3 / a and the right margin L×margin(difference)4 / a.

[0195] In one implementation, when both the target panel and the foamed area are circular, the outline information of the target panel includes its image radius in the visible light image; the relative positional relationship is the ratio of the radius difference between the foamed area and the target panel to the actual radius of the target panel. The electronic device can calculate the image radius of the target panel and multiply it by the ratio between the target panel and the foamed area to obtain the image radius of the foamed area in the visible light image. Based on the distance between the center of the foamed area and the center of the target panel, and the image radius of the foamed area, the positional information of the foamed area can be calculated.

[0196] In one implementation, when the target panel is rectangular and the foamed area is circular, the relative positional relationship is the ratio of the actual distance between the center of the foamed area and each side of the target panel to the actual size of the target panel, and the ratio of the radius of the foamed area to the length of the target panel. The electronic device can calculate the outline size of the target panel and multiply it by the ratio between the target panel and the foamed area to obtain the image distance between the center of the foamed area and each side of the target panel in the visible light image. By calculating the center of the foamed area, its outline size, and the ratio between the radius of the foamed area and the length of the target panel based on the image distance, the positional information of the foamed area can be calculated.

[0197] The above are merely examples of how to calculate the location of the foamed area under different shapes of the target panel and the foamed area, and are not limitations.

[0198] In this embodiment, when the target panel and the foamed area are rectangular, the electronic device can calculate the outline length and multiply it by the proportional relationship between the outline length and the margins of the target panel and the foamed area in the length direction to obtain at least one image margin between the foamed area and the target panel in the visible light image in the length direction; and calculate the outline width and multiply it by the proportional relationship between the outline width and the margins of the target panel and the foamed area in the width direction to obtain at least one image margin between the foamed area and the target panel in the visible light image in the width direction. Thus, since the image margin between the foamed area and the target panel in the visible light image satisfies the proportional relationship between the actual margin between the foamed area and the target panel and the actual size of the target panel, the image margin between the foamed area and the target panel can be accurately calculated using this proportional relationship and the outline size of the target panel. Furthermore, the region position of the foamed area can be further calculated using this image margin, improving the accuracy of the calculated region position of the foamed area.

[0199] As one embodiment of this application, step S302 above, namely the step of calculating the position of the foaming region in the visible light image based on the contour information and the image margin, may include:

[0200] Based on the vertex coordinates of the first panel vertex of the target panel, the image margin corresponding to the first panel vertex in the length direction, and the image margin corresponding to the first panel vertex in the width direction, calculate the vertex coordinates of the first target vertex corresponding to the foaming area and the first panel vertex.

[0201] Based on the contour information, the vertex coordinates of other target vertices in the foaming region are calculated.

[0202] Based on the positional relationship between the first panel vertex and the bubble region and the corresponding first target vertex, the electronic device can calculate the vertex coordinates of the bubble region and the corresponding first target vertex according to the vertex coordinates of the first panel vertex of the target panel, the image margin corresponding to the first panel vertex in the length direction, and the image margin corresponding to the first panel vertex in the width direction. The image margin corresponding to the first panel vertex in the length direction is the image margin related to the first panel vertex among the two image margins of the bubble region and the target panel in the length direction. For example, if the first panel vertex is the top-left vertex, the image margin related to the first panel vertex is the top margin of the image. The image margin corresponding to the first panel vertex in the width direction is the image margin related to the first panel vertex among the two image margins of the bubble region and the target panel in the width direction. For example, if the first panel vertex is the top-left vertex, the image margin related to the first panel vertex is the left margin of the image.

[0203] In one implementation, when the coordinates of the first panel vertex in the length direction are greater than the coordinates of the first target vertex in the length direction, and the coordinates of the first panel vertex in the width direction are greater than the coordinates of the first target vertex in the length direction, the electronic device can calculate the difference between the coordinates of the first panel vertex in the length direction and the corresponding image margin of the first panel vertex in the length direction, and calculate the difference between the coordinates of the first panel vertex in the width direction and the corresponding image margin of the first panel vertex in the width direction, to obtain the vertex coordinates of the first target vertex.

[0204] In one implementation, when the coordinates of the first panel vertex in the length direction are greater than the coordinates of the first target vertex in the length direction, and the coordinates of the first panel vertex in the width direction are less than the coordinates of the first target vertex in the length direction, the electronic device can calculate the difference between the coordinates of the first panel vertex in the length direction and the corresponding image margin of the first panel vertex in the length direction, and calculate the sum of the coordinates of the first panel vertex in the width direction and the corresponding image margin of the first panel vertex in the width direction to obtain the vertex coordinates of the first target vertex.

[0205] In one implementation, when the coordinates of the first panel vertex in the length direction are less than the coordinates of the first target vertex in the length direction, and the coordinates of the first panel vertex in the width direction are greater than the coordinates of the first target vertex in the length direction, the electronic device can calculate the sum of the coordinates of the first panel vertex in the length direction and the corresponding image margin of the first panel vertex in the length direction, and calculate the difference between the coordinates of the first panel vertex in the width direction and the corresponding image margin of the first panel vertex in the width direction to obtain the vertex coordinates of the first target vertex.

[0206] In one implementation, when the coordinates of the first panel vertex in the length direction are less than the coordinates of the first target vertex in the length direction, and the coordinates of the first panel vertex in the width direction are less than the coordinates of the first target vertex in the length direction, the electronic device can calculate the sum of the coordinates of the first panel vertex in the length direction and the corresponding image margin in the length direction, and calculate the sum of the coordinates of the first panel vertex in the width direction and the corresponding image margin in the width direction, to obtain the vertex coordinates of the first target vertex.

[0207] For example, as shown in Figure 5(a), the outline length of the target panel is L, the outline width is W, and the vertex coordinates of the first panel vertex A in the image coordinate system XY are (M, N). The image margins corresponding to the first panel vertex A include the top margin W×margin1 / b and the left margin L×margin3 / a. The vertex coordinates of the bubble region and the first target vertex a corresponding to the first panel vertex are (M+L×margin3 / a, NW×margin1 / b).

[0208] After calculating the vertex coordinates of the first target vertex corresponding to the foamed area and the first panel vertex, the electronic device can continue to calculate the vertex coordinates of other target vertices in the foamed area based on the contour information of the target panel.

[0209] In one implementation, the electronic device can calculate the vertex coordinates of the second target vertex corresponding to the second panel vertex of the target panel based on the vertex coordinates of the second panel vertex, the image margin corresponding to the second panel vertex in the length direction, and the image margin corresponding to the second panel vertex in the width direction. Correspondingly, the electronic device can calculate the vertex coordinates of the third target vertex corresponding to the third panel vertex of the target panel based on the vertex coordinates of the third panel vertex, the image margin corresponding to the third panel vertex in the length direction, and the image margin corresponding to the third panel vertex in the width direction. And based on the vertex coordinates of the fourth panel vertex of the target panel, the image margin corresponding to the fourth panel vertex in the length direction, and the image margin corresponding to the fourth panel vertex in the width direction, the electronic device can calculate the vertex coordinates of the fourth target vertex corresponding to the fourth panel vertex of the bubble region.

[0210] In one implementation, the relative positional relationship between the bubble region and the target panel may further include a preset aspect ratio of the actual length and width of the bubble region. The electronic device can calculate the vertex coordinates of the second target vertex corresponding to the second panel vertex based on the vertex coordinates of the second panel vertex of the target panel, the image margin corresponding to the second panel vertex in the length direction, and the image margin corresponding to the second panel vertex in the width direction. Based on the positional relationship between the first target vertex and the second target vertex, the length or width of the bubble region is calculated. Furthermore, based on the actual aspect ratio of the bubble region, the image size of the bubble region is calculated. Finally, based on the first target vertex, the second target vertex, and the image size of the bubble region, the third target vertex and the fourth target vertex of the bubble region are calculated.

[0211] In this embodiment, the electronic device can calculate the vertex coordinates of the first target vertex corresponding to the first panel vertex of the target panel based on the vertex coordinates of the first panel vertex, the image margin corresponding to the first panel vertex in the length direction, and the image margin corresponding to the first panel vertex in the width direction; and calculate the vertex coordinates of other target vertices in the bubble region based on the contour information. In this way, by calculating the coordinates of each target vertex in the bubble region, each target vertex in the bubble region can be calculated, and the region position of the bubble region in the visible light image can be obtained.

[0212] As one embodiment of this application, the step of calculating the vertex coordinates of other target vertices of the foaming region based on the contour information includes:

[0213] Based on the contour information, calculate the vertex coordinates of the second target vertex adjacent to the first target vertex;

[0214] Based on the first target vertex, the second target vertex, and the relative positional relationship, calculate the vertex coordinates of the other target vertices in the foaming region.

[0215] After calculating the first target vertex of the foamed region, the electronic device can continue to calculate the vertex coordinates of the second target vertex adjacent to the first target vertex based on the contour information. Then, based on the first target vertex, the second target vertex, and their relative positional relationships, the vertex coordinates of the other target vertices in the foamed region are calculated.

[0216] Since the first target vertex and the second target vertex are adjacent, the length or width of the foaming region can be calculated based on the first target vertex and the second target vertex.

[0217] In one implementation, the relative positional relationship further includes a preset first proportional relationship between the foamed area and the target panel in the length direction, and a preset second proportional relationship between the foamed area and the target panel in the width direction. The electronic device can calculate the vertex coordinates of a third target vertex adjacent to the first target vertex in the width direction based on the first target vertex, the contour width, and the second proportional relationship; and calculate the vertex coordinates of a fourth target vertex adjacent to the second target vertex in the width direction based on the second target vertex, the contour width, and the second proportional relationship.

[0218] In one implementation, the relative positional relationship also includes a preset aspect ratio of the actual length and width of the foamed region. The electronic device can calculate the first length of the first edge where the first target vertex and the second target vertex are located based on the first target vertex and the second target vertex; and calculate the second length of the adjacent side of the first edge based on the first length and the actual aspect ratio of the foamed region; then calculate the vertex coordinates of other target vertices in the foamed region based on the first length, the second length, the first target vertex, and the second target vertex.

[0219] In this embodiment, the electronic device can calculate the vertex coordinates of the second target vertex adjacent to the first target vertex based on contour information; and calculate the vertex coordinates of other target vertices in the foaming region based on the first target vertex, the second target vertex, and their relative positional relationship. In this way, each target vertex in the foaming region can be calculated sequentially to obtain the regional position of the foaming region.

[0220] As one embodiment of this application, the step of calculating the vertex coordinates of other target vertices of the foaming region based on the contour information includes:

[0221] Based on the vertex coordinates of the second panel vertex of the target panel, the image margin corresponding to the second panel vertex in the length direction, and the image margin corresponding to the second panel vertex in the width direction, calculate the vertex coordinates of the second target vertex corresponding to the foaming region and the second panel vertex.

[0222] Based on the vertex coordinates of the third panel vertex of the target panel, the image margin corresponding to the third panel vertex in the length direction, and the image margin corresponding to the third panel vertex in the width direction, calculate the vertex coordinates of the third target vertex corresponding to the foaming region and the third panel vertex.

[0223] Based on the vertex coordinates of the fourth panel vertex of the target panel, the image margin corresponding to the fourth panel vertex in the length direction, and the image margin corresponding to the fourth panel vertex in the width direction, the vertex coordinates of the fourth target vertex corresponding to the foaming region and the fourth panel vertex are calculated.

[0224] Given the vertex coordinates of each panel vertex of the target panel and the image area between the target panel and the bubble area, the electronic device can further calculate the vertex coordinates of the second target vertex corresponding to the bubble area based on the vertex coordinates of the second panel vertex of the target panel, the image margin corresponding to the second panel vertex in the length direction, and the image margin corresponding to the second panel vertex in the width direction.

[0225] The electronic device can also calculate the vertex coordinates of the third target vertex corresponding to the third panel vertex of the target panel based on the vertex coordinates of the third panel vertex, the image margin corresponding to the third panel vertex in the length direction, and the image margin corresponding to the third panel vertex in the width direction. It can also calculate the vertex coordinates of the fourth target vertex corresponding to the fourth panel vertex of the bubble region based on the vertex coordinates of the fourth panel vertex of the target panel, the image margin corresponding to the fourth panel vertex in the length direction, and the image margin corresponding to the fourth panel vertex in the width direction.

[0226] For each target vertex, the numerical relationship between its coordinates and the corresponding panel vertex can be determined based on the positional relationship between the target vertex's coordinates and the panel vertex's coordinates. Taking the second target vertex as an example, the calculation methods for the second, third, and fourth target vertices are explained.

[0227] In both implementations, if the coordinates of the second panel vertex in the length direction are greater than the coordinates of the second target vertex in the length direction, and the coordinates of the second panel vertex in the width direction are greater than the coordinates of the second target vertex in the length direction, the electronic device can calculate the difference between the coordinates of the second panel vertex in the length direction and the corresponding image margin of the second panel vertex in the length direction, and calculate the difference between the coordinates of the second panel vertex in the width direction and the corresponding image margin of the second panel vertex in the width direction, to obtain the vertex coordinates of the second target vertex.

[0228] In both implementations, if the coordinates of the second panel vertex in the length direction are greater than the coordinates of the second target vertex in the length direction, and the coordinates of the second panel vertex in the width direction are less than the coordinates of the second target vertex in the length direction, the electronic device can calculate the difference between the coordinates of the second panel vertex in the length direction and the corresponding image margin in the length direction, and calculate the sum of the coordinates of the second panel vertex in the width direction and the corresponding image margin in the width direction to obtain the vertex coordinates of the second target vertex.

[0229] In both implementations, if the coordinates of the second panel vertex in the length direction are less than the coordinates of the second target vertex in the length direction, and the coordinates of the second panel vertex in the width direction are greater than the coordinates of the second target vertex in the length direction, the electronic device can calculate the sum of the coordinates of the second panel vertex in the length direction and the corresponding image margin in the length direction, and calculate the difference between the coordinates of the second panel vertex in the width direction and the corresponding image margin in the width direction, to obtain the vertex coordinates of the second target vertex.

[0230] In both implementations, if the coordinates of the second panel vertex in the length direction are less than the coordinates of the second target vertex in the length direction, and the coordinates of the second panel vertex in the width direction are less than the coordinates of the second target vertex in the length direction, the electronic device can calculate the sum of the coordinates of the second panel vertex in the length direction and the corresponding image margin in the length direction, and calculate the sum of the coordinates of the second panel vertex in the width direction and the corresponding image margin in the width direction, to obtain the vertex coordinates of the second target vertex.

[0231] For example, as shown in Figure 5(b), the outline length of the target panel is L, and the outline width is W. In the image coordinate system XY, the vertex coordinates of the first panel vertex A of the target panel are (M, N). The image margins corresponding to the first panel vertex A include the top margin W×margin1 / b and the left margin L×margin3 / a. The vertex coordinates of the bubble region and the first target vertex a corresponding to the first panel vertex are (M+L×margin3 / a, NW×margin1 / b).

[0232] The vertex coordinates of the second panel vertex B of the target panel are (H, I). The image margins corresponding to the second panel vertex B include the top margin W×margin1 / b and the right margin L×margin4 / a. The vertex coordinates of the bubble region and the second target vertex b corresponding to the second panel vertex are (HL×margin4 / a, IW×margin1 / b).

[0233] The vertex coordinates of the third panel vertex C of the target panel are (J, K). The image margins corresponding to the third panel vertex C include the bottom margin W×margin2 / b and the left margin L×margin3 / a. The vertex coordinates of the bubble region and the third target vertex c corresponding to the third panel vertex are (J+L×margin3 / a, K+W×margin2 / b).

[0234] The vertex coordinates of the fourth panel vertex D of the target panel are (O, P). The image margins corresponding to the fourth panel vertex D include the bottom margin W×margin2 / b and the right margin L×margin4 / a. The vertex coordinates of the bubble region and the fourth target vertex d corresponding to this fourth panel vertex are (OL×margin4 / a, P+W×margin2 / b).

[0235] In this embodiment, the electronic device can calculate the vertex coordinates of the second target vertex corresponding to the second panel vertex of the target panel based on the vertex coordinates of the second panel vertex, the image margin corresponding to the second panel vertex in the length direction, and the image margin corresponding to the second panel vertex in the width direction; calculate the vertex coordinates of the third target vertex corresponding to the third panel vertex of the target panel based on the vertex coordinates of the third panel vertex, the image margin corresponding to the third panel vertex in the length direction, and the image margin corresponding to the third panel vertex in the width direction; and calculate the vertex coordinates of the fourth target vertex corresponding to the fourth panel vertex of the target panel based on the vertex coordinates of the fourth panel vertex, the image margin corresponding to the fourth panel vertex in the length direction, and the image margin corresponding to the fourth panel vertex in the width direction. Thus, by using the four panel vertices of the target panel and the image margins, each target vertex of the bubble region can be calculated, and the location of the bubble region can be determined.

[0236] As one embodiment of this application, the relative positional relationship further includes a preset first proportional relationship between the foaming area and the target panel in the length direction, and a preset second proportional relationship between the foaming area and the target panel in the width direction;

[0237] The step of calculating the vertex coordinates of the second target vertex adjacent to the first target vertex based on the contour information described above may include:

[0238] Based on the first target vertex, the contour length, and the first proportional relationship, calculate the vertex coordinates of the second target vertex adjacent to the first target vertex in the length direction;

[0239] The step of calculating the vertex coordinates of other target vertices in the foaming region based on the first target vertex, the second target vertex, and the relative positional relationship includes:

[0240] Based on the first target vertex, the contour width, and the second proportional relationship, calculate the vertex coordinates of the third target vertex adjacent to the first target vertex in the width direction;

[0241] Based on the second target vertex, the contour width, and the second proportional relationship, calculate the vertex coordinates of the fourth target vertex adjacent to the second target vertex in the width direction.

[0242] The relative positional relationship between the foaming area and the target panel may also include a preset first proportional relationship between the foaming area and the target panel in the length direction, and a preset second proportional relationship between the foaming area and the target panel in the width direction.

[0243] The electronic device can calculate the vertex coordinates of the second target vertex adjacent to the first target vertex in the length direction based on the first target vertex, the contour length, and the first proportional relationship; calculate the vertex coordinates of the third target vertex adjacent to the first target vertex in the width direction based on the first target vertex, the contour width, and the second proportional relationship; and calculate the vertex coordinates of the fourth target vertex adjacent to the second target vertex in the width direction based on the second target vertex, the contour width, and the second proportional relationship.

[0244] Specifically, after determining the outline information of the target panel, the electronic device can calculate the outline length and outline width of the target panel. Then, it can calculate the product of the outline length and the first proportional relationship to obtain the region length of the foamed area, and calculate the product of the outline width and the second proportional relationship to obtain the region width of the foamed area.

[0245] When the edges of the target panel are parallel to the coordinate axes of the image coordinate system, the coordinate difference between the first target vertex and its adjacent second target vertex in the length direction is the region length. Based on the positional relationship between the first target vertex and the second target vertex, the vertex coordinates of the second target vertex adjacent to the first target vertex in the length direction can be calculated using the vertex coordinates of the first target vertex and the region length.

[0246] The difference in coordinates between the first target vertex and its adjacent third target vertex in the width direction is the area width. The electronic device can calculate the vertex coordinates of the third target vertex adjacent to the first target vertex in the width direction based on the positional relationship between the first target vertex and the third target vertex, using the vertex coordinates of the first target vertex and the area width.

[0247] Correspondingly, the coordinate difference in the width direction between the second target vertex and its adjacent fourth target vertex is the region width. The electronic device can calculate the vertex coordinates of the fourth target vertex adjacent to the second target vertex in the width direction based on the positional relationship between the second target vertex and the fourth target vertex, using the vertex coordinates of the second target vertex and the region width.

[0248] For example, the relative positional relationship also includes a preset first proportional relationship between the foamed area and the target panel in the length direction, and a preset second proportional relationship between the foamed area and the target panel in the width direction. As shown in Figure 6(a), the outline length of the target panel in the visible light image is L. Based on the outline length and the first proportional relationship, the region length l of the foamed area in the visible light image can be calculated. In the image coordinate system XY, the distance between the first target vertex a and its adjacent second target vertex b in the length direction is l. Based on the vertex coordinates (x1, y1) of the first target vertex a and l, the vertex coordinates (x1+l, y1) of b can be calculated.

[0249] The outline width of the target panel in the visible light image is W. Based on the outline width and the second proportional relationship, the area width w of the bubble region in the visible light image can be calculated. The distance w in the width direction between the first target vertex a and its adjacent third target vertex c in the width direction can be calculated based on the vertex coordinates (x1, y1) of the first target vertex a and w.

[0250] The distance between the second target vertex b and its adjacent fourth target vertex d in the width direction is w. Based on the vertex coordinates (x1+l, y1) of the second target vertex b and w, the vertex coordinates (x1+l, y1-w) of d can be calculated.

[0251] In this embodiment, when the relative positional relationship also includes a preset first proportional relationship between the foaming area and the target panel in the length direction, and a preset second proportional relationship between the foaming area and the target panel in the width direction, the electronic device can calculate the vertex coordinates of the second target vertex adjacent to the first target vertex in the length direction based on the first target vertex, the contour length, and the first proportional relationship; calculate the vertex coordinates of the third target vertex adjacent to the first target vertex in the width direction based on the first target vertex, the contour width, and the second proportional relationship; and calculate the vertex coordinates of the fourth target vertex adjacent to the second target vertex in the width direction based on the second target vertex, the contour width, and the second proportional relationship. Thus, by utilizing the contour information of the target panel, the first target vertex, the first proportional relationship between the foaming area and the target panel in the length direction, and the second proportional relationship between the foaming area and the target panel in the width direction, the vertex coordinates of the other three target vertices of the foaming area can be calculated, and the location of the foaming area can be determined.

[0252] As one embodiment of this application, the relative positional relationship also includes a preset actual length-to-width ratio of the foaming area;

[0253] The step of calculating the vertex coordinates of the second target vertex adjacent to the first target vertex based on the contour information includes:

[0254] The vertex coordinates of the second target vertex adjacent to the first target vertex are calculated based on the vertex coordinates of the adjacent panel vertex, the image margin corresponding to the adjacent panel vertex in the length direction, and the image margin corresponding to the adjacent panel vertex in the width direction.

[0255] The step of calculating the vertex coordinates of other target vertices in the foaming region based on the first target vertex, the second target vertex, and the relative positional relationship includes:

[0256] Based on the first target vertex and the second target vertex, calculate the first length of the first edge where the first target vertex and the second target vertex are located;

[0257] Based on the first length and the actual length-to-width ratio of the foamed area, calculate the second length of the adjacent side of the first edge;

[0258] Based on the second length, the first target vertex, and the second target vertex, calculate the vertex coordinates of the other target vertices in the foaming region.

[0259] The relative positional relationship between the foamed area and the target panel it is located in can also include the preset aspect ratio of the actual length and width of the foamed area.

[0260] The electronic device can calculate the second target vertex of the foaming region based on the vertex coordinates of the adjacent panel vertex of the first panel vertex, the image margin corresponding to the adjacent panel vertex in the length direction, and the image margin corresponding to the adjacent panel vertex in the width direction. Since the adjacent panel vertex is adjacent to the first panel vertex, the second target vertex determined based on the adjacent panel vertex is adjacent to the first target vertex.

[0261] Based on the first target vertex and the second target vertex, the first length of the first edge where the first target vertex and the second target vertex are located can be calculated, and the first length is the length or width of the foaming region.

[0262] By calculating the first length and the actual length-to-width ratio of the foamed area, the second length of the adjacent side of the first edge can be calculated. Here, the first length is the length of the foamed area, and the second length is the width of the foamed area; or, the first length is the width of the foamed area, and the second length is the length of the foamed area.

[0263] After determining the second length of the foaming region, the third target vertex adjacent to the first target vertex on the second edge can be calculated using the second length and the first target vertex; correspondingly, the fourth target vertex adjacent to the second target vertex on the second edge can be calculated using the second length and the second target vertex.

[0264] In one implementation, a fourth target vertex adjacent to the third target vertex on the third edge can be calculated using the first length and the third target vertex, wherein the length of the third edge is the first length.

[0265] For example, the relative positional relationship also includes a preset aspect ratio of 1:2 for the actual length and width of the foamed area. As shown in Figure 6(b), in the image coordinate system XY, the first length f1 of the first edge where the first target vertex a (x1, y1) and the second target vertex b (x2, y1) of the foamed area are located is x2 - x1.

[0266] Based on the first length x2 - x1 and the actual length-to-width ratio of the foamed area, the second length f2 of the adjacent side of the first edge is calculated to be 2f1.

[0267] The distance between the first target vertex a and its adjacent third target vertex c in the width direction is 2f1. Based on the vertex coordinates (x1, y1) of the first target vertex a and 2f1, the vertex coordinates (x1, y1-2f1) of c can be calculated.

[0268] The distance between the second target vertex b and its adjacent fourth target vertex d in the width direction is 2f1. Based on the vertex coordinates (x2, y1) of the second target vertex b and 2f1, the vertex coordinates (x2, y1-2f1) of d can be calculated.

[0269] In this embodiment, when the relative positional relationship also includes a preset aspect ratio of the actual length and width of the bubble area, the electronic device can calculate the vertex coordinates of the second target vertex adjacent to the first target vertex based on the vertex coordinates of the adjacent panel vertices of the first panel vertex, the image margins corresponding to the adjacent panel vertices in the length direction, and the image margins corresponding to the adjacent panel vertices in the width direction; calculate the first length of the first edge where the first target vertex and the second target vertex are located based on the first target vertex and the second target vertex; calculate the second length of the adjacent edge of the first edge based on the first length and the actual aspect ratio of the bubble area; and calculate the vertex coordinates of the other target vertices in the bubble area based on the second length, the first target vertex, and the second target vertex. Thus, by using the two adjacent panel vertices of the target panel, any three image margins, and the preset aspect ratio of the actual length and width of the bubble area, the vertex coordinates of the four target vertices of the bubble area can be calculated, and the location of the bubble area can be determined.

[0270] As one embodiment of this application, step S302 above, namely the step of calculating the position of the foaming region in the visible light image based on the contour information and the image margin, may include:

[0271] For each edge of the target panel in the visible light image, within the outline of the target panel, a straight line parallel to the edge and at a distance equal to the target image margin is constructed, wherein the target image margin is the image margin between the edge of the foaming region in the visible light image that is parallel to the edge and close to the edge and the edge.

[0272] The location of the area enclosed by the four constructed straight lines is determined as the location of the foaming area in the visible light image.

[0273] When the image margin between the foamed area and the target panel is calculated in the visible light image, the electronic device can construct a straight line parallel to each edge of the target panel within the outline of the target panel, with the distance from the edge being the target image margin.

[0274] The target image margin is the image margin between the edge of the bubble region in the visible light image that is parallel to and close to the edge.

[0275] The four lines constructed can form an image area within the outline of the target panel, which is the bubble area in the visible light image.

[0276] For example, such as Figure 7 As shown, parallel lines are constructed parallel to each edge M1-M4 of the target panel. Specifically, the image margin between edge M1 and the line m1 containing the edge of the foamed area is h1. A line m1 is constructed within the outline of the target panel, parallel to edge M1 and at a distance h1 from edge M1. Similarly, the image margin between edge M2 and the line m2 containing the edge of the foamed area is h2. A line m2 is constructed within the outline of the target panel, parallel to edge M2 and at a distance h2 from edge M2. The image margin between edge M3 and the line m3 containing the edge of the foamed area is h3. A line m3 is constructed within the outline of the target panel, parallel to edge M3 and at a distance h3 from edge M3. Finally, the image margin between edge M4 and the line m4 containing the edge of the foamed area is h4. A line m4 is constructed within the outline of the target panel, parallel to edge M4 and at a distance h4 from edge M4. The area enclosed by straight lines m1-m4 within the outline of the target panel is the bubble region in the visible light image.

[0277] In this embodiment, the electronic device can construct, within the outline of the target panel in a visible light image, a straight line parallel to each edge of the target panel and at a distance equal to the target image margin. The target image margin is the image margin between the edge of the bubble region in the visible light image that is parallel to and close to the edge. The region enclosed by the four constructed straight lines is then determined as the region position of the bubble region in the visible light image. Thus, using the regional outline of the target panel and the image margin between the target panel and the bubble region in the visible light image, the region position of the bubble region can be calculated.

[0278] As one embodiment of this application, the relative positional relationship further includes a preset actual length-to-width ratio of the foamed area; before the step S104 above, that is, before the step of determining the detection result of the foamed area based on the temperature difference between the temperature corresponding to the location of the area in the infrared image and the ambient temperature, the foamed area detection method provided in this application may further include:

[0279] Based on the vertex coordinates of the four target vertices of the foamed region, calculate the length and width of the foamed region in the visible light image, and calculate the current aspect ratio of the foamed region in the visible light image;

[0280] If the difference between the current aspect ratio and the actual aspect ratio is greater than a preset aspect ratio threshold, the position of the foaming area is adjusted according to the difference.

[0281] Accordingly, step S104 above, namely the step of determining the detection result of the foaming area based on the temperature difference between the temperature corresponding to the location of the area in the infrared image and the ambient temperature, may include:

[0282] The detection result of the foaming area is determined based on the temperature difference between the temperature corresponding to the adjusted area location in the infrared image and the ambient temperature.

[0283] The relative positional relationship can also include the actual length-to-width ratio of the preset foaming area.

[0284] After calculating the four target vertices of the bubble region by using the four panel vertices and four image margins of the target panel, or by using the two panel vertices of the target panel, the outline length, the outline width, the preset bubble region and the target panel in the first proportional relationship in the length direction, and the preset bubble region and the target panel in the second proportional relationship in the width direction, or by using the image margins and the outline region of the target panel, the bubble region can be constructed within the outline of the target panel. In order to verify the accuracy of the calculated position information of the bubble region, the length and width of the bubble region in the visible light image can be calculated based on the vertex coordinates of the four target vertices of the bubble region.

[0285] Next, the current aspect ratio of the bubbled region in the visible light image can be calculated, and then the difference between the current aspect ratio and the actual aspect ratio can be determined.

[0286] If the difference is not greater than the preset ratio threshold, the location of the current foaming area is relatively accurate. The detection result of the foaming area can be determined by using the temperature difference between the temperature corresponding to the location of the foaming area in the infrared image and the ambient temperature.

[0287] If the difference is greater than the preset ratio threshold, the current location of the foamed area is inaccurate. The location of the foamed area can be adjusted according to the difference until the difference between the current aspect ratio and the actual aspect ratio of the adjusted foamed area in the visible light image is not greater than the preset ratio threshold. Based on the temperature difference between the temperature corresponding to the adjusted location in the infrared image and the ambient temperature, the detection result of the foamed area is determined.

[0288] In this embodiment, the electronic device can calculate the length and width of the foamed region in the visible light image based on the vertex coordinates of the four target vertices of the foamed region, and calculate the current aspect ratio of the foamed region in the visible light image. If the difference between the current aspect ratio and the actual aspect ratio is greater than a preset aspect ratio threshold, the region position of the foamed region is adjusted according to the difference. Based on the temperature difference between the temperature corresponding to the adjusted region position in the infrared image and the ambient temperature, the detection result of the foamed region is determined. In this way, by using the preset actual aspect ratio of the foamed region to verify the determined foamed region, the accuracy of the determined region position of the foamed region can be improved. Furthermore, by using the temperature difference between the temperature corresponding to the more accurate region position in the infrared image and the ambient temperature, the detection result of the foamed region is determined, resulting in a high accuracy.

[0289] As one embodiment of this application, the step of obtaining the relative positional relationship between the foamed area of ​​the product to be tested and its target panel includes:

[0290] Identify the product identifier of the product under test in the visible light image of the product under test;

[0291] Based on the product identifier and the preset correspondence between the product identifier and the product size, the product size of the product to be tested is determined, wherein the product size includes the actual edge distance between the foaming area and the target panel, the actual size of the target panel where the foaming area of ​​the product to be tested is located, and the actual size of the foaming area.

[0292] Based on the actual edge distance and the actual size of the target panel, calculate the ratio between the actual edge distance between the foamed area and the target panel and the actual size of the target panel.

[0293] Electronic devices can store a preset correspondence between product identifiers and product dimensions. The product dimensions include the actual margin between the foamed area and the target panel, the actual dimensions of the target panel where the foamed area of ​​the product under test is located, and the actual dimensions of the foamed area.

[0294] After acquiring a visible light image of the product under test, the electronic device can recognize the product identification from the visible light image. For example, OCR (Optical Character Recognition) can be used to recognize the product identification; alternatively, recognition algorithms can be used to identify product logos and other identifying information to obtain the product identification.

[0295] Then, in the preset correspondence between product identifiers and product sizes, the product size corresponding to the product identifier of the product to be tested is found, and the product size of the product to be tested is obtained.

[0296] Electronic devices can calculate the ratio between each actual edge distance between the foamed area and the target panel and the actual size of the edge of the target panel corresponding to that actual edge distance, thus obtaining the proportional relationship between the actual edge distance between the foamed area and the target panel and the actual size of the target panel.

[0297] In one implementation, the ratio of the actual length to the actual width of the foamed area is calculated to obtain the actual length-to-width ratio of the foamed area; the ratio of the actual length of the foamed area to the actual length of the target panel is calculated to obtain a first proportional relationship between the foamed area and the target panel in the length direction; and the ratio of the actual width of the foamed area to the actual width of the target panel is calculated to obtain a second proportional relationship between the foamed area and the target panel in the width direction.

[0298] The electronic device can also calculate the ratio of the actual length to the actual width of the foamed area to obtain the actual length-to-width ratio of the foamed area; calculate the ratio of the actual length of the foamed area to the actual length of the target panel to obtain the first proportional relationship between the foamed area and the target panel in the length direction; and calculate the ratio of the actual width of the foamed area to the actual width of the target panel to obtain the second proportional relationship between the foamed area and the target panel in the width direction. Thus, the relative positional relationship between the foamed area and the target panel is obtained.

[0299] In this embodiment, the electronic device can identify the product identifier of the product under test in a visible light image, and determine the product size of the product under test using the product identifier and a preset correspondence between the product identifier and product size. Then, based on the actual margin and the actual size of the target panel, the ratio of the actual margin between the foamed area and the target panel to the actual size of the target panel is calculated to obtain the relative positional relationship between the foamed area and the target panel. This relative positional relationship is then used to calculate the regional position of the foamed area in the visible light image, improving the accuracy of the regional position of the foamed area.

[0300] As one embodiment of this application, step S104 above, namely the step of determining the detection result of the foaming area based on the temperature difference between the temperature corresponding to the location of the area in the infrared image and the ambient temperature, may include:

[0301] Determine whether the temperature difference between the temperature of the region in the infrared image and the ambient temperature is greater than a preset temperature threshold.

[0302] When the temperature difference is greater than the preset temperature threshold, a first type of detection result is generated to characterize the non-uniformity of the foaming area;

[0303] When the temperature difference is not greater than the preset temperature threshold, a second type of detection result is generated, which characterizes the uniformity of the foaming area.

[0304] The electronic device can determine whether the temperature difference between the area's location in the infrared image and the ambient temperature exceeds a preset temperature threshold. This preset temperature threshold can be set according to actual needs; for example, it could be 0.1 degrees, 0.5 degrees, etc., without specific limitations here.

[0305] When the temperature difference is greater than a preset temperature threshold, the electronic device can generate a first type of detection result that characterizes the non-uniformity of the foaming area and output the first type of detection result.

[0306] When the temperature difference is not greater than the preset temperature threshold, the electronic device can generate a second type of detection result that characterizes the uniformity of the foaming area and output the second type of detection result.

[0307] In one implementation, when the electronic device detects a temperature difference greater than a preset temperature threshold, it can further determine the number of holes in the foamed region of the infrared image where the temperature difference with the environment is greater than the preset temperature threshold, and determine the numerical relationship between the number of holes and the preset hole number threshold. If the number of holes is greater than the preset hole number threshold, the electronic device can generate a first type of detection result characterizing the non-uniformity of the foamed region and output the first type of detection result. For example, the preset hole number threshold is 1. When detecting the foamed region of a refrigerator, the number of holes in the foamed region where the temperature difference with the environment is greater than the preset temperature threshold is as follows: Figure 8 As shown, the number of pores in the uneven foaming is 5, which is greater than the preset pore number threshold. The electronic device can generate and output the first type of detection result that characterizes the unevenness of the foaming area.

[0308] In one implementation, when the electronic device detects a temperature difference greater than a preset temperature threshold, it can further determine the area of ​​the holes in the foamed region in the infrared image where the temperature difference with the environment is greater than the preset temperature threshold. If the area of ​​the holes is greater than the preset area threshold, the electronic device can generate a first type of detection result characterizing the non-uniformity of the foamed region and output the first type of detection result.

[0309] In this embodiment, the electronic device can determine whether the temperature difference between the temperature corresponding to the region location in the infrared image and the ambient temperature is greater than a preset temperature threshold. If the temperature difference is greater than the preset temperature threshold, a first type of detection result representing the non-uniformity of the foamed region is generated; if the temperature difference is not greater than the preset temperature threshold, a second type of detection result representing the uniformity of the foamed region is generated. By determining the numerical relationship between the temperature difference between the temperature corresponding to the region location in the infrared image and the ambient temperature and the preset temperature threshold, the detection result of the foamed region can be obtained. Using multi-dimensional sensing methods to detect the foamed region can improve detection efficiency and accuracy. Furthermore, it is adaptable to changes in the test environment, and this foamed region detection method can obtain good temperature measurement accuracy and relatively accurate detection results.

[0310] To facilitate understanding of the implementation process of the foaming region detection method provided in this application embodiment, the module composition of the electronic device executing the method and the execution process of the method will be described below with reference to Figures 9(a)-9(b).

[0311] As shown in Figure 9(a), an electronic device that performs a foaming area detection method provided in this embodiment of the application may include a production data import module, a database module, a product identification module, a comparison module, a contour extraction module, a detection area contour calculation module, a temperature detection module, and a detection area temperature calculation module.

[0312] The system includes several modules: a production data import module, a database module, and a temperature detection module. The production data import module allows users to manually input or connect to production system data, such as MES (Manufacturing Execution System). Product information can include product name, external panel dimensions, foam area dimensions, and margins between the foam area and its corresponding panel. The database module stores product information and reports product dimensions. The product identification module acquires product identifiers for identification purposes, using either OCR or detection algorithms to identify product logos. The comparison module compares data from the database and the product identification module to determine the product information of the product under test and reports the corresponding dimensions. The contour extraction module extracts the product contour using segmentation algorithms. The detection area contour calculation module calculates the location of the foam area of ​​the product under test in the visible light image and reports the detection area. The temperature detection module performs global temperature detection. The detection area temperature calculation module uses a preset temperature threshold to determine if the temperature within the foam area is normal, and outputs an alarm if an abnormality is detected.

[0313] The software and hardware systems of the electronic device work together to perform the detection process of the foamed area of ​​the product under test. As shown in Figure 9(b), the detection process includes the following steps:

[0314] S901: The software system inputs the product model and product specifications.

[0315] The software system can input and store product models and specifications.

[0316] S902: The hardware system obtains the unique identifier of the product through a product identification algorithm;

[0317] The hardware system can acquire visible light images of the product under test, obtain the product's unique identifier through a product recognition algorithm, and send the product's unique identifier to the software system.

[0318] S903: The software system compares the product's unique identifier to obtain detailed product specifications.

[0319] The software system can compare the product's unique identifier with its own recorded data to obtain the detailed specifications of the product under test.

[0320] S904: The software system obtains the detailed proportional relationship between the foaming area and the back panel through product specification parameters;

[0321] The software system can calculate the detailed proportional relationship between the foamed area and its back panel based on product specification parameters, thus obtaining the detailed proportional relationship (i.e., relative positional relationship) between the foamed area and the back panel.

[0322] S905: The hardware system obtains the contour data of the product in the image through a contour extraction algorithm;

[0323] The hardware system can use a contour extraction algorithm to extract the contour data of the back panel of the product under test in the image and send the contour data to the software system.

[0324] S906: The software system calculates the actual size of the foamed area in the image based on proportional relationships and contour data;

[0325] The software system can calculate the actual size and position of the foaming area in the image based on the above proportional relationship and the received outline data of the product under test.

[0326] S907: The hardware system acquires the product's temperature data in the image through infrared thermometry;

[0327] The hardware system acquires infrared images of the product under test through infrared temperature measurement.

[0328] S908: The software system records temperature data within a dimensional area based on actual dimensional data;

[0329] The software system records the temperature data within the foaming area based on the actual size of the foaming area.

[0330] S909: The software system determines whether the temperature is abnormal based on a preset temperature threshold.

[0331] The software system uses a preset temperature threshold to calculate the temperature difference between the foaming area and the ambient temperature, determines whether there is an abnormal temperature, identifies the abnormal temperature area, and obtains the detection results of the foaming area.

[0332] Corresponding to the method for detecting foamed areas, this embodiment also provides a device for detecting foamed areas.

[0333] like Figure 10 As shown, a device for detecting foamed areas includes:

[0334] The positional relationship acquisition module 1010 is used to acquire the relative positional relationship between the foaming area of ​​the product under test and the target panel on which it is located, as well as the visible light image and infrared image of the product under test, wherein the visible light image and infrared image include the target panel;

[0335] The information detection module 1020 is used to detect the contour information of the target panel from the visible light image;

[0336] The position calculation module 1030 is used to calculate the regional position of the foaming region in the visible light image based on the contour information and the relative positional relationship;

[0337] The result determination module 1040 is used to determine the detection result of the foaming area based on the temperature difference between the temperature corresponding to the location of the area in the infrared image and the ambient temperature.

[0338] The technical solution provided in this application embodiment allows an electronic device to acquire the relative positional relationship between the foamed area of ​​a product under test and its target panel, as well as visible light and infrared images of the product under test, wherein the visible light and infrared images include the target panel; detect the contour information of the target panel from the visible light image; calculate the regional position of the foamed area in the visible light image based on the contour information and the relative positional relationship; and determine the detection result of the foamed area based on the temperature difference between the temperature corresponding to the regional position in the infrared image and the ambient temperature. For the product under test, the relative positional relationship between the target panel and the foamed area is determined. Given the determined position of the target panel, the regional position of the foamed area in the visible light image can be calculated based on this relative positional relationship. By calculating the regional position of the foamed area, the accuracy of foamed area detection is improved. Furthermore, by detecting the uniformity of the foamed area based on the temperature difference between the regional position and the ambient temperature, the influence of regional position errors on the detection results can be reduced, thereby improving the accuracy of the detection results.

[0339] As one embodiment of this application, the location calculation module 1030 includes:

[0340] The margin calculation submodule is used to calculate the image margin between the foamed region and the target panel in the visible light image based on the contour information and the relative positional relationship, wherein the contour information includes the vertex coordinates and / or contour size of the target panel; the relative positional relationship includes the ratio between the actual margin between the foamed region and the target panel and the actual size of the target panel;

[0341] The position calculation submodule is used to calculate the regional position of the foaming region in the visible light image based on the contour information and the image margin.

[0342] In one embodiment of this application, the target panel and the foaming area are rectangular areas;

[0343] The margin calculation submodule includes:

[0344] The first calculation unit is used to calculate the product of the contour length and the proportional relationship between the target panel and the foamed area in the length direction, so as to obtain at least one image margin between the foamed area and the target panel in the visible light image in the length direction.

[0345] The second calculation unit is used to calculate the product of the contour width and the proportional relationship between the target panel and the foamed area in the width direction, so as to obtain at least one image margin of the foamed area and the target panel in the width direction in the visible light image.

[0346] As one embodiment of this application, the location calculation submodule includes:

[0347] The third calculation unit is used to calculate the vertex coordinates of the first target vertex corresponding to the first panel vertex of the target panel based on the vertex coordinates of the first panel vertex of the target panel, the image margin corresponding to the first panel vertex in the length direction, and the image margin corresponding to the first panel vertex in the width direction;

[0348] The fourth calculation unit is used to calculate the vertex coordinates of other target vertices in the foaming region based on the contour information.

[0349] As one embodiment of this application, the fourth computing unit includes:

[0350] The first calculation subunit is used to calculate the vertex coordinates of the second target vertex adjacent to the first target vertex based on the contour information;

[0351] The second calculation subunit is used to calculate the vertex coordinates of other target vertices in the foaming region based on the first target vertex, the second target vertex, and the relative positional relationship.

[0352] As one embodiment of this application, the fourth computing unit includes:

[0353] The third calculation subunit is used to calculate the vertex coordinates of the second target vertex corresponding to the second panel vertex of the target panel based on the vertex coordinates of the second panel vertex of the target panel, the image margin corresponding to the second panel vertex in the length direction, and the image margin corresponding to the second panel vertex in the width direction;

[0354] The fourth calculation subunit is used to calculate the vertex coordinates of the third target vertex corresponding to the third panel vertex of the target panel based on the vertex coordinates of the third panel vertex, the image margin corresponding to the third panel vertex in the length direction, and the image margin corresponding to the third panel vertex in the width direction;

[0355] The fifth calculation subunit is used to calculate the vertex coordinates of the fourth target vertex corresponding to the fourth panel vertex of the target panel based on the vertex coordinates of the fourth panel vertex of the target panel, the image margin corresponding to the fourth panel vertex in the length direction, and the image margin corresponding to the fourth panel vertex in the width direction.

[0356] As one embodiment of this application, the relative positional relationship further includes a preset first proportional relationship between the foaming area and the target panel in the length direction, and a preset second proportional relationship between the foaming area and the target panel in the width direction;

[0357] The first computing subunit is specifically used for:

[0358] Based on the first target vertex, the contour length, and the first proportional relationship, calculate the vertex coordinates of the second target vertex adjacent to the first target vertex in the length direction;

[0359] The second calculation subunit is specifically used for:

[0360] Based on the first target vertex, the contour width, and the second proportional relationship, calculate the vertex coordinates of the third target vertex adjacent to the first target vertex in the width direction; based on the second target vertex, the contour width, and the second proportional relationship, calculate the vertex coordinates of the fourth target vertex adjacent to the second target vertex in the width direction.

[0361] As one embodiment of this application, the relative positional relationship also includes a preset actual length-to-width ratio of the foaming area;

[0362] The first computing subunit is specifically used for:

[0363] The vertex coordinates of the second target vertex adjacent to the first target vertex are calculated based on the vertex coordinates of the adjacent panel vertex, the image margin corresponding to the adjacent panel vertex in the length direction, and the image margin corresponding to the adjacent panel vertex in the width direction.

[0364] The second calculation subunit is specifically used for:

[0365] Based on the first target vertex and the second target vertex, calculate the first length of the first edge where the first target vertex and the second target vertex are located;

[0366] Based on the first length and the actual length-to-width ratio of the foamed area, calculate the second length of the adjacent side of the first edge;

[0367] Based on the second length, the first target vertex, and the second target vertex, calculate the vertex coordinates of the other target vertices in the foaming region.

[0368] As one embodiment of this application, the location calculation submodule includes:

[0369] A straight line construction unit is used to construct, within the outline of the target panel, a straight line parallel to each edge of the target panel in the visible light image, at a distance equal to the target image margin, wherein the target image margin is the image margin between the edge of the foamed region in the visible light image that is parallel to and close to the edge.

[0370] The position determination unit is used to determine the position of the area enclosed by the four constructed straight lines as the position of the foaming area in the visible light image.

[0371] As one embodiment of this application, the apparatus further includes:

[0372] The ratio calculation module is used to calculate the length and width of the foamed area in the visible light image based on the vertex coordinates of the four target vertices of the foamed area, before the step of determining the detection result of the foamed area based on the temperature difference between the temperature corresponding to the location of the area in the infrared image and the ambient temperature, and before the step of determining the detection result of the foamed area based on the temperature difference between the temperature corresponding to the location of the area in the infrared image and the ambient temperature, and before the step of determining the detection result of the foamed area in the visible light image.

[0373] The adjustment module is used to adjust the position of the foaming area according to the difference when the difference between the current aspect ratio and the actual aspect ratio is greater than a preset aspect ratio threshold.

[0374] The result determination module 1040 includes:

[0375] The result determination submodule is used to determine the detection result of the foaming area based on the temperature difference between the temperature corresponding to the adjusted area position in the infrared image and the ambient temperature.

[0376] In one embodiment of this application, the foaming area is located between the target panel and the inner shell of the product to be tested, and the target panel covers the foaming area.

[0377] As one embodiment of this application, the position relationship acquisition module 1010 includes:

[0378] The identification submodule is used to identify the product identification of the product under test in the visible light image of the product under test;

[0379] The size determination submodule is used to determine the product size of the product to be tested based on the product identifier and the preset correspondence between the product identifier and the product size. The product size includes the actual edge distance between the foaming area and the target panel, the actual size of the target panel where the foaming area of ​​the product to be tested is located, and the actual size of the foaming area.

[0380] The relationship determination submodule is used to calculate the ratio between the actual edge distance between the foamed area and the target panel and the actual size of the target panel, based on the actual edge distance and the actual size of the target panel.

[0381] As one embodiment of this application, the result determination module 1040 includes:

[0382] The temperature difference determination submodule is used to determine whether the temperature difference between the location of the area in the infrared image and the ambient temperature is greater than a preset temperature threshold; if the temperature difference is greater than the preset temperature threshold, the first generation submodule is triggered; if the temperature difference is not greater than the preset temperature threshold, the second generation submodule is triggered.

[0383] The first generation submodule is used to generate a first type of detection result characterizing the non-uniformity of the foaming region;

[0384] The second generation submodule is used to generate a second type of detection result that characterizes the uniformity of the foaming region.

[0385] This application also provides an electronic device, such as... Figure 11 As shown, it includes:

[0386] Memory 1101 is used to store computer programs;

[0387] The processor 1102 is used to execute the program stored in the memory 1101 to implement the foaming region detection method provided in the embodiments of this application.

[0388] Furthermore, the aforementioned electronic device may also include a communication bus and / or a communication interface, with the processor 1102, the communication interface, and the memory 1101 communicating with each other via the communication bus.

[0389] The communication bus mentioned in the above electronic devices can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in the diagram, but this does not mean that there is only one bus or one type of bus.

[0390] The communication interface is used for communication between the aforementioned electronic devices and other devices.

[0391] The memory may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.

[0392] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0393] In another embodiment provided in this application, a computer-readable storage medium is also provided, which stores a computer program that, when executed by a processor, implements the steps of the above-described method for detecting any of the foamed regions.

[0394] In another embodiment provided in this application, a computer program product containing instructions is also provided, which, when run on a computer, causes the computer to perform the detection method for any of the foamed regions described in the above embodiments.

[0395] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a solid-state drive (SSD), etc.

[0396] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0397] The various embodiments in this specification are described in a related manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the embodiments of apparatus, electronic devices, computer-readable storage media, and computer program products are basically similar to the method embodiments, and therefore the descriptions are relatively simple; relevant parts can be referred to the descriptions of the method embodiments.

[0398] The above description is merely a preferred embodiment of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application are included within the scope of protection of this application.

Claims

1. A method for detecting foamed areas, characterized in that, The method includes: The relative positional relationship between the foamed area of ​​the product under test and its target panel is obtained, as well as the visible light image and infrared image of the product under test, wherein the visible light image and infrared image include the target panel; in the visible light image, the foamed area is obscured by the target panel; Detect the contour information of the target panel from the visible light image; Based on the contour information and the relative positional relationship, the position of the foaming region in the visible light image is calculated; The detection result of the foaming area is determined based on the temperature difference between the temperature corresponding to the location of the area in the infrared image and the ambient temperature. The step of obtaining the relative positional relationship between the foamed area of ​​the product under test and its target panel includes: Identify the product identifier of the product under test in the visible light image of the product under test; Based on the product identifier and the preset correspondence between the product identifier and the product size, the product size of the product to be tested is determined, wherein the product size includes the actual edge distance between the foaming area and the target panel, the actual size of the target panel where the foaming area of ​​the product to be tested is located, and the actual size of the foaming area. Based on the actual edge distance and the actual size of the target panel, calculate the ratio between the actual edge distance between the foaming area and the target panel and the actual size of the target panel; The step of calculating the regional position of the foamed region in the visible light image based on the contour information and the relative positional relationship includes: Based on the contour information and the relative positional relationship, the image margin between the foamed region and the target panel in the visible light image is calculated, wherein the contour information includes the vertex coordinates and / or contour dimensions of the target panel; the relative positional relationship includes the ratio between the actual margin between the foamed region and the target panel and the actual size of the target panel; the image margin is the distance between corresponding sides of the foamed region and the target panel in the length direction and the distance between corresponding sides in the width direction in the visible light image; For each edge of the target panel in the visible light image, within the outline of the target panel, a straight line parallel to the edge and at a distance equal to the target image margin is constructed, wherein the target image margin is the image margin between the edge of the foamed region in the visible light image that is parallel to and close to the edge; the region position enclosed by the four constructed straight lines is determined as the region position of the foamed region in the visible light image.

2. The method according to claim 1, characterized in that, The target panel and the foaming area are rectangular areas; The step of calculating the image margin between the foamed region and the target panel in the visible light image based on the contour information and the relative positional relationship includes: Calculate the contour length and multiply it by the proportional relationship between the target panel and the foamed area in the length direction to obtain at least one image margin between the foamed area and the target panel in the visible light image in the length direction. Calculate the contour width and multiply it by the proportional relationship between the target panel and the foamed area in the width direction to obtain at least one image margin of the foamed area and the target panel in the width direction in the visible light image.

3. The method according to any one of claims 1-2, characterized in that, The foamed area is located between the target panel and the inner shell of the product under test, with the target panel obscuring the foamed area.

4. The method according to any one of claims 1-2, characterized in that, The step of determining the detection result of the foaming area based on the temperature difference between the temperature corresponding to the location of the area in the infrared image and the ambient temperature includes: Determine whether the temperature difference between the temperature of the region in the infrared image and the ambient temperature is greater than a preset temperature threshold. When the temperature difference is greater than the preset temperature threshold, a first type of detection result is generated to characterize the non-uniformity of the foaming area; When the temperature difference is not greater than the preset temperature threshold, a second type of detection result is generated, which characterizes the uniformity of the foaming area.

5. A device for detecting foamed areas, characterized in that, The device includes: The positional relationship acquisition module is used to acquire the relative positional relationship between the foamed area of ​​the product under test and its target panel, as well as the visible light image and infrared image of the product under test, wherein the visible light image and infrared image include the target panel; in the visible light image, the foamed area is occluded by the target panel; An information detection module is used to detect the contour information of the target panel from the visible light image; A position calculation module is used to calculate the regional position of the foaming region in the visible light image based on the contour information and the relative positional relationship; The result determination module is used to determine the detection result of the foaming area based on the temperature difference between the temperature corresponding to the location of the area in the infrared image and the ambient temperature. The location relationship acquisition module includes: The identification submodule is used to identify the product identification of the product under test in the visible light image of the product under test; The size determination submodule is used to determine the product size of the product to be tested based on the product identifier and the preset correspondence between the product identifier and the product size. The product size includes the actual edge distance between the foaming area and the target panel, the actual size of the target panel where the foaming area of ​​the product to be tested is located, and the actual size of the foaming area. The relationship determination submodule is used to calculate the ratio between the actual edge distance between the foaming area and the target panel and the actual size of the target panel, based on the actual edge distance and the actual size of the target panel; The location calculation module includes: The margin calculation submodule is used to calculate the image margin between the bubble region and the target panel in the visible light image based on the contour information and the relative positional relationship. The contour information includes the vertex coordinates and / or contour dimensions of the target panel; the relative positional relationship includes the ratio between the actual margin between the bubble region and the target panel and the actual size of the target panel; the image margin is the distance between corresponding edges of the bubble region and the target panel in the length direction and the distance between corresponding edges in the width direction in the visible light image. The position calculation submodule is used to construct, within the outline of the target panel for each edge of the target panel in the visible light image, a straight line parallel to the edge and at a distance equal to the target image margin, wherein the target image margin is the image margin between the edge of the foamed region in the visible light image that is parallel to and close to the edge; and to determine the region position of the area enclosed by the four constructed straight lines as the region position of the foamed region in the visible light image.

6. The apparatus according to claim 5, characterized in that, The target panel and the foaming area are rectangular areas; The margin calculation submodule includes: The first calculation unit is used to calculate the product of the contour length and the proportional relationship between the target panel and the foamed area in the length direction, so as to obtain at least one image margin between the foamed area and the target panel in the visible light image in the length direction. The second calculation unit is used to calculate the product of the contour width and the proportional relationship between the target panel and the foamed region's margins in the width direction, to obtain at least one image margin between the foamed region and the target panel in the visible light image in the width direction; and / or, The foamed area is located between the target panel and the inner shell of the product under test, and the target panel obscures the foamed area; and / or, The result determination module includes: The temperature difference determination submodule is used to determine whether the temperature difference between the temperature corresponding to the location of the region in the infrared image and the ambient temperature is greater than a preset temperature threshold; if the temperature difference is greater than the preset temperature threshold, the first generation submodule is triggered; if the temperature difference is not greater than the preset temperature threshold, the second generation submodule is triggered. The first generation submodule is used to generate a first type of detection result characterizing the non-uniformity of the foaming region; The second generation submodule is used to generate a second type of detection result that characterizes the uniformity of the foaming region.

7. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor, when executing a program stored in memory, implements the method of any one of claims 1-4.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method described in any one of claims 1-4.

Citation Information

Patent Citations

  • Method and device for detecting vacuum loss of low-temperature container

    CN107270113A

  • Spacing measurement method, device and equipment and computer readable medium

    CN111161339A

  • Refrigerator detection method and device

    CN111830078A

  • Deicing wind power blade heating system detection device and method

    CN112483336A

  • Image distance information extraction method based on feature object and perspective transformation

    CN113129363A