Firework filling process safety monitoring system

By calculating the segmentation threshold based on the entire image in infrared image processing and adjusting the local area size, the problem of poor and time-consuming segmentation effect of firework loading temperature monitoring in the prior art is solved, and more accurate and timely temperature monitoring is achieved.

CN119007121AInactive Publication Date: 2024-11-22LIUYANG HENGBANG MACHINERY FACTORY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411370948.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-29
Publication Date
2024-11-22
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

When using infrared images to monitor the temperature during the fireworks loading process, the segmentation effect is not accurate enough, and the segmentation takes a long time, which affects the timely detection of temperature abnormalities.

Method used

In infrared image processing, the first segmentation threshold is obtained based on the entire image, and the first foreground image is divided into multiple local areas, and the representative areas are selected for segmentation, and the local area size is adjusted until A second foreground image is obtained, and the comparison value is calculated to adjust the local area size to ensure segmentation accuracy and efficiency.

Benefits of technology

It improves the accuracy of image segmentation, reduces the probability of local areas being too large or too small, avoids the increase in segmentation time, and realizes timely and accurate monitoring of the temperature of fireworks products.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119007121A_ABST
    Figure CN119007121A_ABST
Patent Text Reader

Abstract

The invention belongs to the field of image processing, and discloses a firework filling process safety monitoring system which comprises a shooting device, an image processing device and a monitoring device. The shooting device is used for shooting the firework products on the conveying belt in the filling process to obtain infrared images containing the firework products; the image processing device is used for processing the infrared image to obtain the temperature of the firework product; and the monitoring device is used for judging whether a dangerous condition exists or not based on the temperature obtained by the image processing device and displaying a judgment result. According to the method, the occurrence probability of an event that a local area is too large or too small is effectively reduced, and the time consumption of segmentation is prevented from being greatly increased while the accuracy of image segmentation is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the field of image processing, and in particular to a fireworks filling process safety monitoring system. Background Art

[0002] The process of loading fireworks into the inner tube usually involves more dangerous steps such as loading propellant and loading special effect inner tubes. Therefore, the loading process needs to be monitored to promptly detect abnormal temperatures of the fireworks products being loaded.

[0003] The prior art usually uses a temperature sensor or infrared temperature measurement to obtain the temperature. Since the temperature sensor can usually only measure a very small range, it is not suitable for obtaining the temperature during the filling process of fireworks. When obtaining the temperature by infrared temperature measurement, it is usually necessary to first take an infrared image of the fireworks product being filled, and then perform preprocessing, image cutting, temperature acquisition and other steps on the infrared image. In the process of image cutting, the prior art usually only performs segmentation based on the threshold calculated from the entire image, or only divides the infrared image into multiple local areas according to a pre-set size, and then performs threshold segmentation on each local area, and then merges the segmentation results of each local area to obtain a complete segmentation result.

[0004] In the process of segmentation directly based on the threshold obtained from the entire image, since the threshold is calculated based on the overall situation, the segmentation effect is not good enough and the edge is not accurate enough for local areas with complex edge changes. When segmenting based on the threshold of the local area, since the size of the local area is specified in advance and cannot match the actual size of the target area, it is easy for the local area to be too small or too large. When the local area is too large, the target area is still concentrated in one or more local areas, and the segmentation result is still based on more pixels. The cutting result is still not accurate enough. As a result, it is impossible to conduct comprehensive temperature monitoring of the fireworks products being loaded; and when there are too many local areas, it is easy to cause the segmentation to take a long time, affecting the overall segmentation efficiency, resulting in the inability to detect temperature anomalies of the fireworks products being loaded in time. Summary of the invention

[0005] The purpose of the present invention is to disclose a safety monitoring system for fireworks filling process, which solves the problem of how to improve the accuracy of image segmentation while avoiding a significant increase in segmentation time in the process of using infrared images to monitor the temperature of fireworks products being filled, so as to more accurately and timely monitor the temperature of fireworks products being filled.

[0006] In order to achieve the above object, the present invention adopts the following technical solution:

[0007] The present invention provides a fireworks filling process safety monitoring system, including a shooting device, an image processing device and a monitoring device;

[0008] The photographing device is used to photograph the fireworks products on the conveyor belt during the filling process to obtain an infrared image containing the fireworks products;

[0009] The image processing device is used to process the infrared image to obtain the temperature of the fireworks product;

[0010] The monitoring device is used to judge whether there is a dangerous situation based on the temperature obtained by the image processing device, and display the judgment result;

[0011] The infrared image is processed to obtain the temperature of the fireworks product, including:

[0012] With the vertex of the infrared image as the origin, establish a rectangular coordinate system XY;

[0013] A preset threshold segmentation algorithm is used to obtain a first segmentation threshold of the infrared image;

[0014] Segmenting the infrared image based on a first segmentation threshold to obtain a first foreground image;

[0015] The infrared image is divided into a plurality of first local areas with a length of L1 and a width of W1;

[0016] Based on the first target image, selecting a representative area from the first local area;

[0017] Using a preset threshold segmentation algorithm to obtain a second segmentation threshold representing the area;

[0018] Segment the representative area using a second segmentation threshold to obtain a first comparison image;

[0019] Obtain a set U1 of coordinates of the pixel points in the representative area in the rectangular coordinate system XY;

[0020] Obtaining a set U2 of coordinates of pixel points in the first foreground image in the rectangular coordinate system XY;

[0021] Get the intersection U3 of U1 and U2;

[0022] Acquire a second comparison image composed of pixels in U3 in the first foreground image;

[0023] calculating a comparison value between the first comparison image and the second comparison image;

[0024] L1 and W1 are adjusted based on the comparison value to obtain L2 and W2;

[0025] Divide the infrared image into a plurality of second local areas with a length of L2 and a width of W2;

[0026] Segmenting the second local area using a preset threshold segmentation algorithm to obtain a second foreground image;

[0027] The temperature of the fireworks product is acquired based on the second foreground image.

[0028] Preferably, the photographing device includes a detection sensor and an industrial camera;

[0029] The industrial camera is set above the sensor to obtain infrared images of fireworks products by taking a bird's-eye view.

[0030] The detection sensor is used to detect whether there are fireworks products under the industrial camera. If so, a notification signal is sent to the industrial camera;

[0031] The industrial camera is used to shoot below when receiving a notification signal to obtain an infrared image containing fireworks products.

[0032] Preferably, the detection sensor comprises an infrared ranging sensor;

[0033] The infrared distance measuring sensor is arranged above the conveyor belt;

[0034] The infrared distance measuring sensor periodically acquires the monitoring distance between itself and the surface of the conveyor belt by sending infrared rays to the surface of the conveyor belt under the industrial camera;

[0035] When the absolute value of the difference between the latter monitoring distance and the previous monitoring distance is greater than the set distance, it means that there are fireworks products under the industrial camera.

[0036] Preferably, a rectangular coordinate system XY is established with the vertex of the infrared image as the origin, including:

[0037] A rectangular coordinate system XY is established with the vertex at the lower left corner of the infrared image as the origin, one edge of the infrared image connected to the origin as the X-axis, and the other edge connected to the origin as the Y-axis.

[0038] Preferably, the preset threshold segmentation algorithm includes a maximum inter-class variance algorithm.

[0039] Preferably, segmenting the infrared image based on the first segmentation threshold to obtain the first foreground image includes:

[0040] Obtain a set U4 of pixel points in the infrared image whose grayscale values ​​are greater than a first segmentation threshold;

[0041] The first foreground image is composed of the pixels in U4.

[0042] Preferably, based on the first target image, selecting a representative area from the first local area comprises:

[0043] Calculate the representative value of each first local area respectively;

[0044] The first region with the largest representative value is taken as the representative region.

[0045] Preferably, segmenting the representative area using the second segmentation threshold to obtain the first comparison image includes:

[0046] Obtain a set U5 of pixel points in the representative area whose grayscale values ​​are greater than the second segmentation threshold;

[0047] The first comparison image is composed of the pixels in U5.

[0048] Preferably, calculating the comparison value between the first comparison image and the second comparison image includes:

[0049] The comparison value between the first comparison image and the second comparison image is calculated using the following formula:

[0050]

[0051] simCmp represents the comparison value between the first comparison image and the second comparison image, N1 and N2 represent the number of pixels in the first comparison image and the second comparison image respectively, max(N1,N2) represents obtaining the larger value of N1 and N2, grymif and grymxf represent the minimum and maximum grayscale values ​​in the first comparison image respectively, and nup i represents the number of pixels with grayscale values ​​equal to i in the first comparison image, grymis and grymxs represent the minimum and maximum grayscale values ​​in the second comparison image, respectively, and nup j represents the number of pixels with grayscale value equal to j in the first comparison image, maxp represents and , α1 and α2 represent the quantity coefficient and information coefficient respectively.

[0052] Preferably, adjusting L1 and W1 respectively based on the comparison value to obtain L2 and W2 comprises:

[0053]

[0054] δ represents an adjustment coefficient, Nf represents the number of pixels in the first foreground image, Nfr represents the number of pixels in the infrared image, and simCmp represents a comparison value between the first comparison image and the second comparison image.

[0055] Beneficial effects:

[0056] In the process of monitoring the fireworks products being loaded by using infrared images, the present invention does not only use the segmentation threshold calculated based on the whole infrared image to obtain the area where the fireworks products are located, nor does it only divide the infrared image into a plurality of local areas of preset sizes, then segment each local area separately, and then synthesize the segmentation results of all local areas to obtain the area where the fireworks products are located. Instead, the first foreground image is first obtained by using the first segmentation threshold calculated based on the whole infrared image, and then the infrared image is divided into a plurality of local areas of preset sizes, a representative area is selected from all the local areas, and the representative area is segmented to obtain a first comparison image, and then a second comparison image composed of pixel points in a set of coordinates of pixels in the representative area is obtained from the first foreground image, and the size of the local area is effectively adjusted by the comparison value between the first comparison image and the second comparison image, so that the size of the local area can change with the size of the fireworks product and the adjustment value, thereby effectively reducing the probability of the occurrence of the event that the local area is too large or too small, while improving the accuracy of image segmentation and avoiding a significant increase in segmentation time. BRIEF DESCRIPTION OF THE DRAWINGS

[0057] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.

[0058] Figure 1 A schematic diagram of a fireworks filling process safety monitoring system of the present invention.

[0059] Figure 2 A schematic diagram of a fireworks loading device monitored by the present invention.

[0060] Figure 3 A schematic diagram of the outer edge of the present invention. DETAILED DESCRIPTION

[0061] The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. The components of the embodiments of the present invention generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the drawings is not intended to limit the scope of the claimed invention, but merely represents the selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present invention.

[0062] like Figure 1 In one embodiment shown, the present invention provides a fireworks filling process safety monitoring system, including a shooting device, an image processing device and a monitoring device;

[0063] The photographing device is used to photograph the fireworks products on the conveyor belt during the filling process to obtain an infrared image containing the fireworks products;

[0064] The image processing device is used to process the infrared image to obtain the temperature of the fireworks product;

[0065] The monitoring device is used to judge whether there is a dangerous situation based on the temperature obtained by the image processing device, and display the judgment result;

[0066] When the temperature of the fireworks product is greater than the set temperature monitoring threshold, the judgment result is that a dangerous situation exists; otherwise, the judgment result is that there is no dangerous situation.

[0067] The infrared image is processed to obtain the temperature of the fireworks product, including:

[0068] With the vertex of the infrared image as the origin, establish a rectangular coordinate system XY;

[0069] A preset threshold segmentation algorithm is used to obtain a first segmentation threshold of the infrared image;

[0070] Segmenting the infrared image based on a first segmentation threshold to obtain a first foreground image;

[0071] The infrared image is divided into a plurality of first local areas with a length of L1 and a width of W1;

[0072] Based on the first target image, selecting a representative area from the first local area;

[0073] Using a preset threshold segmentation algorithm to obtain a second segmentation threshold representing the area;

[0074] Segment the representative area using a second segmentation threshold to obtain a first comparison image;

[0075] Obtain a set U1 of coordinates of the pixel points in the representative area in the rectangular coordinate system XY;

[0076] Obtaining a set U2 of coordinates of pixel points in the first foreground image in the rectangular coordinate system XY;

[0077] Get the intersection U3 of U1 and U2;

[0078] Acquire a second comparison image composed of pixels in U3 in the first foreground image;

[0079] calculating a comparison value between the first comparison image and the second comparison image;

[0080] L1 and W1 are adjusted based on the comparison value to obtain L2 and W2;

[0081] Divide the infrared image into a plurality of second local areas with a length of L2 and a width of W2;

[0082] Segmenting the second local area using a preset threshold segmentation algorithm to obtain a second foreground image;

[0083] The temperature of the fireworks product is acquired based on the second foreground image.

[0084] In the above scheme, the first foreground image is first obtained by calculating the first segmentation threshold based on the entire infrared image, and then the infrared image is divided into a plurality of local areas of preset sizes, a representative area is selected from all the local areas, and the representative area is segmented to obtain a first comparison image, and then a second comparison image composed of pixel points in a set of coordinates of pixels in the representative area whose coordinates belong to the pixels in the representative area is obtained from the first foreground image, and the size of the local area is effectively adjusted by the comparison value between the first comparison image and the second comparison image, so that the size of the local area can change with the size of the fireworks product and the adjustment value, thereby effectively reducing the probability of the local area being too large or too small, while improving the accuracy of image segmentation and avoiding a significant increase in segmentation time.

[0085] In one embodiment, a fireworks loading device such as Figure 2 As shown, the fireworks loading device includes a conveyor belt, and the shooting device of the present invention is installed just above the conveyor belt.

[0086] The fireworks loading device comprises a lower paper sheet air inlet cylinder 1, a paper sheet plugging mechanism 2, an inlet cylinder belt 3, a bottom plate 4, a conveyor belt 5, a discharging belt 6, an upper paper sheet air inlet cylinder 7, a discharging lifting mechanism 8, and a positioning plug rod structure 9.

[0087] Figure 2The honeycomb-shaped object in the filling process is the firework product, which is placed on the conveyor belt 5 and conveyed along the conveyor belt 5.

[0088] Preferably, L1 is one quarter of the length of the infrared image, and W1 is one quarter of the width of the infrared image.

[0089] In the present invention, the size of the preset local area is set relatively large, which is conducive to providing more types of sizes for the second local area in the subsequent adjustment process, thereby improving the ability of the present invention to accurately segment fireworks products of different sizes.

[0090] Preferably, the photographing device includes a detection sensor and an industrial camera;

[0091] The industrial camera is set above the sensor to obtain infrared images of fireworks products by taking a bird's-eye view.

[0092] The detection sensor is used to detect whether there are fireworks products under the industrial camera. If so, a notification signal is sent to the industrial camera;

[0093] The industrial camera is used to shoot below when receiving a notification signal to obtain an infrared image containing fireworks products.

[0094] The lens of the industrial camera shoots vertically downward. By shooting from above, the temperature can be tracked throughout the process of loading propellant, loading paper, removing paper, and inserting special-effect powder into the inner tube of fireworks products, so as to obtain more comprehensive tracking results.

[0095] The notification signal sent may be a level signal.

[0096] In one embodiment, there are multiple industrial cameras, which are arranged along the conveyor belt at certain intervals to obtain multiple infrared images covering all areas of the conveyor belt; there is an overlapping area between the infrared images captured by two adjacent industrial cameras.

[0097] Preferably, the detection sensor comprises an infrared ranging sensor;

[0098] The infrared distance measuring sensor is arranged above the conveyor belt;

[0099] The infrared distance measuring sensor periodically acquires the monitoring distance between itself and the surface of the conveyor belt by sending infrared rays to the surface of the conveyor belt under the industrial camera;

[0100] When the absolute value of the difference between the latter monitoring distance and the previous monitoring distance is greater than the set distance, it means that there are fireworks products under the industrial camera.

[0101] The infrared ranging sensor periodically sends infrared rays for measurement, so multiple distances can be obtained continuously. When there are no fireworks products under the industrial camera, the distance is a basically fixed value, and when there are fireworks products, the distance will change greatly, thereby detecting the presence of fireworks products.

[0102] The corresponding position below the industrial camera is the position at the center of the image captured by the industrial camera.

[0103] Preferably, the set distance is 5 cm.

[0104] Preferably, a rectangular coordinate system XY is established with the vertex of the infrared image as the origin, including:

[0105] A rectangular coordinate system XY is established with the vertex at the lower left corner of the infrared image as the origin, one edge of the infrared image connected to the origin as the X-axis, and the other edge connected to the origin as the Y-axis.

[0106] The infrared image has 4 vertices and 4 edges. Each vertex is connected to two edges, and the two edges connected to the same vertex are perpendicular to each other, which can serve as the basis for forming a rectangular coordinate system.

[0107] Preferably, the preset threshold segmentation algorithm includes a maximum inter-class variance algorithm.

[0108] The threshold segmentation algorithm adopted in the present invention is a single threshold segmentation algorithm.

[0109] Preferably, segmenting the infrared image based on the first segmentation threshold to obtain the first foreground image includes:

[0110] Obtain a set U4 of pixel points in the infrared image whose grayscale values ​​are greater than a first segmentation threshold;

[0111] The first foreground image is composed of the pixels in U4.

[0112] In the infrared image, the higher the temperature of the object, the larger the corresponding gray value. Therefore, by obtaining the pixel points whose gray value is greater than the first segmentation threshold, the pixel points of the fireworks product area are obtained. Because during the filling process of the fireworks product, such as the inner tube filling and the special effect inner tube filling, the friction between the filling machine and the fireworks product will make the temperature of the fireworks product higher than the temperature of the conveyor belt.

[0113] Preferably, based on the first target image, selecting a representative area from the first local area comprises:

[0114] Calculate the representative value of each first local area respectively;

[0115] The first region with the largest representative value is taken as the representative region.

[0116] The purpose of selecting the representative area in the present invention is to be able to use the same threshold segmentation algorithm to segment the local area such as the representative area in the future, obtain the first comparison image, and then compare the segmentation results of the same area of ​​the first foreground image, so as to judge the size of the fireworks product, because the larger the fireworks product, the smaller the difference between the two segmentation results. At the same time, it can also show the gap between local segmentation and global segmentation.

[0117] Preferably, segmenting the representative area using the second segmentation threshold to obtain the first comparison image includes:

[0118] Obtain a set U5 of pixel points in the representative area whose grayscale values ​​are greater than the second segmentation threshold;

[0119] The first comparison image is composed of the pixels in U5.

[0120] Preferably, calculating the comparison value between the first comparison image and the second comparison image includes:

[0121] The comparison value between the first comparison image and the second comparison image is calculated using the following formula:

[0122]

[0123] simCmp represents the comparison value between the first comparison image and the second comparison image, N1 and N2 represent the number of pixels in the first comparison image and the second comparison image respectively, max(N1,N2) represents obtaining the larger value of N1 and N2, grymif and grymxf represent the minimum and maximum grayscale values ​​in the first comparison image respectively, and nup i represents the number of pixels with grayscale values ​​equal to i in the first comparison image, grymis and grymxs represent the minimum and maximum grayscale values ​​in the second comparison image, respectively, and nup j represents the number of pixels with grayscale value equal to j in the first comparison image, maxp represents and , α1 and α2 represent the quantity coefficient and information coefficient respectively.

[0124] Specifically, the comparison value is used to compare the difference between the results obtained by two segmentation algorithms for the same area. The smaller the comparison value, the smaller the difference between the results of the two segmentation methods, and the larger the size of the fireworks product. When calculating the comparison value, the present invention is not calculated based only on the number of pixels, because this does not take into account factors such as the amount of information. Therefore, since the present invention comprehensively calculates the comparison value based on two different types of data, the difference in the number of pixels and the difference in the amount of information, the calculated comparison value is more accurate. This allows the present invention to more accurately adjust the size of the local area later.

[0125] Preferably, the quantity coefficient and information coefficient are and

[0126] Preferably, adjusting L1 and W1 respectively based on the comparison value to obtain L2 and W2 comprises:

[0127]

[0128] δ represents an adjustment coefficient, Nf represents the number of pixels in the first foreground image, Nfr represents the number of pixels in the infrared image, and simCmp represents a comparison value between the first comparison image and the second comparison image.

[0129] Specifically, when making a comparison, the present invention performs a comprehensive calculation from two perspectives, namely, the comparison value and the number of pixels in the first foreground image, so that the smaller the size of the fireworks product is, the larger the difference between the segmentation results obtained by the local segmentation and the global segmentation is, the smaller the size of the local area is, which is conducive to obtaining a more accurate segmentation result. When the difference between the segmentation results obtained by the local segmentation and the global segmentation is smaller, the larger the size of the fireworks product is, the larger the size of the local area is, so that the number of the second local area can be reduced, thereby improving the efficiency of segmentation.

[0130] Preferably, the adjustment factor is one-half.

[0131] Preferably, using a preset threshold segmentation algorithm to segment the second local area to obtain a second foreground image includes:

[0132] Obtain a set U6 of pixel points belonging to the edge of the image in the first foreground image;

[0133] Obtain the number N3 of pixels in each second local area that have the same coordinates as the pixels in the set U6;

[0134] The second local area where N3 is greater than 0 is saved to set U7;

[0135] Using a preset threshold segmentation algorithm to segment each second local area in the set U7, to obtain a connected domain H;

[0136] Obtain a set U8 of pixel points at the outer edge of the connected domain H;

[0137] The area enclosed by the pixels in the set U8 is used as the second foreground image.

[0138] In the process of segmenting the second local area, the present invention does not directly segment all the second local areas, but only segments the area around the edge of the first foreground image. In this way, on the one hand, the accuracy of the segmentation can be further improved, and on the other hand, the segmentation of all the second local areas can be avoided, which effectively reduces the overall segmentation time and improves the segmentation efficiency.

[0139] After the connected domain H is obtained, since only the peripheral area of ​​the fireworks product is obtained, the area surrounded by the pixel points in U8 is obtained to obtain the complete area of ​​the fireworks product.

[0140] like Figure 3 As shown, since the present invention only segments part of the second local area, a ring-shaped connected domain is obtained, and the connected domain has an inner edge B and a peripheral edge A.

[0141] Figure 3 The shape of the area in is merely a schematic diagram for representing the outer edge and does not limit the shape of the connected domain H.

[0142] Preferably, a preset threshold segmentation algorithm is used to segment each second local area in the set U7 to obtain a connected domain H, including:

[0143] Using a preset threshold segmentation algorithm to respectively determine a third segmentation threshold for each second local area in the set U7;

[0144] The connected domain H is composed of the pixel points whose grayscale values ​​are greater than the third segmentation threshold in all the second regions in the set U7.

[0145] Preferably, acquiring the temperature of the fireworks product based on the second foreground image includes:

[0146] Get the mapping value between grayscale value and temperature;

[0147] Calculate the temperature corresponding to each pixel in the second foreground image according to the mapping value;

[0148] The maximum value of all the temperatures obtained is taken as the temperature of the fireworks product.

[0149] Specifically, the mapping value refers to the temperature corresponding to a gray level. For example, 1 gray level corresponds to 0.5 degrees Celsius. When the gray value is 100, the temperature corresponding to the pixel is 50 degrees Celsius.

[0150] The mapping value can be measured in advance, that is, first take an infrared image, then use a thermometer to measure the temperature of the position corresponding to the pixel point in the infrared image, and divide the temperature by the gray value to obtain the mapping value.

[0151] Preferably, respectively calculating the representative value of each first local area includes:

[0152] Obtain a set U6 of pixel points belonging to the edge of the image in the first foreground image;

[0153] Obtain the number N4 of pixels in each first local area that have the same coordinates as the pixels in the set U6;

[0154] The calculation formula of the representative value of the first local area is:

[0155]

[0156] repval represents the representative value of the first local area, N5 represents the total number of pixels in the first local area, dist1 represents the distance between the pixel closest to the center of the first local area and the pixel closest to the center of the first foreground image, dist2 represents the maximum value of the distance between the pixel at the edge of the first foreground image and the center of the first foreground image, β1 and β2 are the quantity representative coefficient and the distance representative coefficient, respectively.

[0157] When obtaining the representative area, the present invention does not randomly select one from the first local area, but calculates the representative value so that the more pixel points that contain the edge of the first foreground image and the closer the first local area is to the edge of the first foreground image, the larger the representative value. This screening method of the first local area can obtain a first area with as many pixel points as possible that belong to the edge of the fireworks product and as complex edge changes as possible, so that a more accurate comparison value can be obtained in the subsequent comparison value calculation, thereby improving the accuracy of the size of the obtained two-divided area.

[0158] Preferably, the quantity representative coefficient and the distance representative coefficient are and

[0159] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.

[0160] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0161] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0162] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program code.

[0163] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims

1. A fireworks loading process safety monitoring system, It is characterized in that It includes a shooting device, an image processing device and a monitoring device; The photographing device is used to photograph the fireworks products on the conveyor belt during the filling process to obtain an infrared image containing the fireworks products; The image processing device is used to process the infrared image to obtain the temperature of the fireworks product; The monitoring device is used to judge whether there is a dangerous situation based on the temperature obtained by the image processing device, and display the judgment result; The infrared image is processed to obtain the temperature of the fireworks product, including: With the vertex of the infrared image as the origin, establish a rectangular coordinate system XY; A preset threshold segmentation algorithm is used to obtain a first segmentation threshold of the infrared image; Segmenting the infrared image based on a first segmentation threshold to obtain a first foreground image; The infrared image is divided into a plurality of first local areas with a length of L1 and a width of W1; Based on the first target image, selecting a representative area from the first local area; Using a preset threshold segmentation algorithm to obtain a second segmentation threshold representing the area; Segment the representative area using a second segmentation threshold to obtain a first comparison image; Obtain a set U1 of coordinates of the pixel points in the representative area in the rectangular coordinate system XY; Obtaining a set U2 of coordinates of pixel points in the first foreground image in the rectangular coordinate system XY; Get the intersection U3 of U1 and U2; Acquire a second comparison image composed of pixels in U3 in the first foreground image; calculating a comparison value between the first comparison image and the second comparison image; L1 and W1 are adjusted based on the comparison value to obtain L2 and W2; Divide the infrared image into a plurality of second local areas with a length of L2 and a width of W2; Segmenting the second local area using a preset threshold segmentation algorithm to obtain a second foreground image; The temperature of the fireworks product is acquired based on the second foreground image.

2. A fireworks loading process safety monitoring system according to claim 1, It is characterized in that The shooting device includes a detection sensor and an industrial camera; The industrial camera is set above the sensor to obtain infrared images of fireworks products by taking a bird's-eye view. The detection sensor is used to detect whether there are fireworks products under the industrial camera. If so, a notification signal is sent to the industrial camera; The industrial camera is used to shoot the area below when receiving a notification signal to obtain an infrared image containing fireworks products.

3. A fireworks filling process safety monitoring system according to claim 2, It is characterized in that The detection sensor includes an infrared ranging sensor; The infrared distance measuring sensor is arranged above the conveyor belt; The infrared distance measuring sensor periodically acquires the monitoring distance between itself and the surface of the conveyor belt by sending infrared rays to the surface of the conveyor belt under the industrial camera; When the absolute value of the difference between the latter monitoring distance and the previous monitoring distance is greater than the set distance, it means that there are fireworks products under the industrial camera.

4. A fireworks loading process safety monitoring system according to claim 1, It is characterized in that With the vertex of the infrared image as the origin, establish a rectangular coordinate system XY, including: A rectangular coordinate system XY is established with the vertex at the lower left corner of the infrared image as the origin, one edge of the infrared image connected to the origin as the X-axis, and the other edge connected to the origin as the Y-axis.

5. A fireworks loading process safety monitoring system according to claim 1, It is characterized in that The preset threshold segmentation algorithm includes the maximum inter-class variance algorithm.

6. A fireworks filling process safety monitoring system according to claim 1, It is characterized in that The infrared image is segmented based on the first segmentation threshold to obtain a first foreground image, including: Obtain a set U4 of pixel points in the infrared image whose grayscale values ​​are greater than a first segmentation threshold; The first foreground image is composed of the pixels in U4.

7. A fireworks filling process safety monitoring system according to claim 1, It is characterized in that Based on the first target image, selecting a representative area from the first local area includes: Calculate the representative value of each first local area respectively; The first region with the largest representative value is taken as the representative region.

8. A fireworks filling process safety monitoring system according to claim 1, It is characterized in that The representative area is segmented using the second segmentation threshold to obtain a first comparison image, including: Obtain a set U5 of pixel points in the representative area whose grayscale values ​​are greater than the second segmentation threshold; The first comparison image is composed of the pixels in U5.

9. A fireworks loading process safety monitoring system according to claim 1, It is characterized in that Calculating a comparison value between the first comparison image and the second comparison image includes: The comparison value between the first comparison image and the second comparison image is calculated using the following formula: simCmp represents the comparison value between the first comparison image and the second comparison image, N1 and N2 represent the number of pixels in the first comparison image and the second comparison image respectively, max(N1,N2) represents obtaining the larger value of N1 and N2, grymif and grymxf represent the minimum and maximum grayscale values ​​in the first comparison image respectively, and nup i represents the number of pixels with grayscale values ​​equal to i in the first comparison image, grymis and grymxs represent the minimum and maximum grayscale values ​​in the second comparison image, respectively, and nup j represents the number of pixels with grayscale value equal to j in the first comparison image, maxp represents and , α1 and α2 represent the quantity coefficient and information coefficient respectively.

10. A fireworks filling process safety monitoring system according to claim 1, It is characterized in that L1 and W1 are adjusted based on the comparison value to obtain L2 and W2, including: δ represents an adjustment coefficient, Nf represents the number of pixels in the first foreground image, Nfr represents the number of pixels in the infrared image, and simCmp represents a comparison value between the first comparison image and the second comparison image.