A forest and grassland fire image detection method and system based on video monitoring
By analyzing the characteristics of smoke during forest and grassland fires, obtaining the possibilities of smoke pixels and using regional growth algorithms to determine the fire occurrence area, the problem of inaccurate fire identification caused by thick smoke blocking flames is solved, and the accuracy of fire alarms is improved.
Patent Information
- Application Number
- CN202411389898.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-08
- Publication Date
- 2024-12-17
- Estimated Expiration
- 2044-10-08
AI Technical Summary
When monitoring forest and grassland fires, the existing technology causes inaccurate identification of the fire area due to thick smoke blocking the flame, which affects the accuracy of fire alarms and the efficiency of fire extinguishing work.
By analyzing the characteristics of smoke during fire, obtaining the pixel possibilities of smoke at pixel points, filtering out the fire frame images, and using the area growth algorithm to determine the fire occurrence area to improve the accuracy of fire alarms.
More accurately identify the location of the fire, reduce misjudgment, and improve the accuracy of fire alarms and fire extinguishing work efficiency.
Smart Images

Figure CN118898812B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of fire alarm, and in particular to a forest and grassland fire image detection method and system based on video monitoring. Background Art
[0002] Forests and grasslands are important ecosystems. Fires in forests and grasslands not only cause serious damage to the ecological environment, but also directly affect the safety of surrounding residents. By real-time monitoring of forest and grassland fires through video, fire alarms can be issued when fires occur, which helps to reasonably arrange firefighting work and reduce the impact of fires on the natural environment and public safety.
[0003] By timely acquiring the fire occurrence area in the monitoring frame image, it is helpful to make a fire alarm in time. The existing technology determines the fire occurrence area by identifying the flame in the monitoring image, which is a widely used method. However, when monitoring the fire occurrence area, the existing technology is affected by the thick smoke generated by forest and grassland fires, which obscures the flame, resulting in inaccurate monitoring of the fire occurrence area, affecting the accuracy of fire alarm and the efficiency of fire extinguishing. Summary of the invention
[0004] In order to solve the technical problem of inaccurate monitoring of fire occurrence areas in the prior art, the purpose of the present invention is to provide a forest and grassland fire image detection method and system based on video monitoring. The technical solution adopted is as follows:
[0005] A method for detecting forest and grassland fire images based on video monitoring, the method comprising the following steps:
[0006] Obtain each monitoring frame image in the monitoring video;
[0007] In the monitoring frame image, according to the difference of the pixel values of the pixel in different color channels, the smoke pixel possibility of the pixel point is obtained; according to the smoke pixel possibility of the pixel point in the monitoring frame image, the smoke pixel point of each monitoring frame image is obtained;
[0008] According to the number of smoke pixels in the monitoring frame image, a fire frame image is screened out from the monitoring frame image; according to the local distribution of smoke pixels in the fire frame image, the fire occurrence area in the fire frame image is obtained to issue a fire alarm.
[0009] Furthermore, the method for obtaining the smoke pixel probability specifically includes:
[0010] The monitoring frame image is an RGB color space image; the monitoring frame image is converted from the RGB color space to the HSV color space to obtain an HSV image corresponding to the monitoring frame image; the color channels of the pixel points include: R color channel, G color channel, B color channel and V color channel;
[0011] Obtaining a vegetation smoke measurement index of the pixel point according to the pixel value of the B color channel of the pixel point; the pixel value of the B color channel and the vegetation smoke measurement index are positively correlated;
[0012] Obtaining a sky haze measurement index of a pixel point according to a pixel value of the V color channel of the pixel point; the pixel value of the V color channel and the sky haze measurement index are negatively correlated;
[0013] According to the difference of pixel values of different color channels of the pixel points and the spatial distribution of the pixel points, the vegetation area measurement index of the pixel points is obtained;
[0014] The smoke pixel possibility of the pixel point is obtained according to the vegetation area measurement index of the pixel point, the vegetation smoke measurement index and the sky smoke measurement index.
[0015] Furthermore, the method for obtaining the vegetation area measurement index specifically includes:
[0016] According to the difference between the pixel value of the G color channel and the pixel value of the B color channel of the pixel point, a first vegetation pixel possibility of the pixel point is obtained; and according to the first vegetation pixel possibility, each vegetation area reference point is screened out from the pixel point;
[0017] Obtaining sky pixel possibility according to the difference between the pixel value of the R color channel and the pixel value of the B color channel of the pixel point; and screening out various sky area reference points from the pixel point according to the sky pixel possibility;
[0018] According to the overall distribution of the spatial distance between the pixel point and all the reference points in the vegetation area, the deviation vegetation metric value of the pixel point is obtained;
[0019] According to the overall distribution of the spatial distance between the pixel point and all the reference points in the sky area, the deviation metric value of the pixel point from the sky is obtained;
[0020] According to the deviation from vegetation metric value and the deviation from sky metric value, obtaining a second vegetation pixel possibility of the pixel point; the deviation from sky metric value and the second vegetation pixel possibility are positively correlated; the deviation from vegetation metric value and the second vegetation pixel possibility are negatively correlated;
[0021] The vegetation area measurement index is obtained according to the first vegetation pixel possibility and the second vegetation pixel possibility.
[0022] Furthermore, the method for obtaining the vegetation area measurement index according to the first vegetation pixel possibility and the second vegetation pixel possibility specifically includes:
[0023] The first vegetation pixel possibility is normalized to obtain a first normalized value; the second vegetation pixel possibility is normalized to obtain a second normalized value; and the product of the first normalized value and the second normalized value is calculated to obtain a vegetation area measurement index.
[0024] Furthermore, the method for obtaining the smoke pixel possibility of a pixel point according to the vegetation area measurement index of the pixel point, the vegetation smoke measurement index and the sky smoke measurement index specifically includes:
[0025] The vegetation area measurement index of the pixel point is used as the vegetation weight; the difference between 1 and the vegetation weight is calculated to obtain the sky weight; the product of the vegetation weight and the vegetation smoke measurement index is calculated to obtain a first product value; the product of the sky weight and the sky smoke measurement index is calculated to obtain a second product value; the sum of the first product value and the second product value is calculated to obtain the smoke pixel possibility of the pixel point.
[0026] Furthermore, the method for obtaining smoke pixels specifically includes:
[0027] Each pixel point whose smoke pixel probability is not less than a preset smoke threshold is marked as a smoke pixel point.
[0028] Furthermore, the method for acquiring the fire frame image specifically includes:
[0029] Each monitoring frame image with a number of smoke pixels greater than a preset number is marked as a fire frame image.
[0030] Furthermore, the method for obtaining the fire occurrence area specifically includes:
[0031] Based on the region growing algorithm, all smoke pixels in the fire frame image are clustered according to the pixel values of the V color channel of all smoke pixels to obtain various suspected fire areas;
[0032] The fire occurrence area is screened out from the suspected fire area according to the overall distribution of the pixel values of the V color channel of all smoke pixels in each of the suspected fire areas.
[0033] Furthermore, the method for obtaining the fire occurrence area by screening out the fire occurrence area from the suspected fire area specifically includes:
[0034] The mean value of the pixel value of the V color channel of all smoke pixels in each suspected fire area is calculated to obtain the regional smoke ignition possibility, and the largest regional smoke ignition possibility is corresponding to the suspected fire area as the fire occurrence area.
[0035] The present invention proposes a forest and grassland fire image detection system based on video surveillance, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the forest and grassland fire image detection method based on video surveillance are implemented.
[0036] The present invention has the following beneficial effects:
[0037] When monitoring the fire situation in forests and grasslands, the fire in forests and grasslands will produce thick smoke to block the flame, which makes it impossible to clearly identify the flame, resulting in inaccurate identification of the fire location. The present invention analyzes the characteristics of smoke when forests and grasslands are on fire, so as to better determine the fire area. First, it is necessary to determine the smoke pixel points, and obtain the smoke pixel possibility of the pixel points by analyzing the performance characteristics of the flame smoke in the vegetation and the sky when monitoring the fire situation in forests and grasslands; the larger the smoke pixel possibility, the more likely the pixel point is to be fire smoke, so that the smoke pixel points of each monitoring frame image are obtained according to the smoke pixel possibility of the pixel point in the monitoring frame image. The smoke pixel points more accurately reflect the pixel points corresponding to the fire smoke. In order to prevent the misjudgment of the image of the fire as the image of the fire, considering that the fire will produce obvious smoke, the fire frame image is screened out from the monitoring frame image according to the number of smoke pixel points in the monitoring frame image; the fire frame image can more accurately reflect the existence of the fire in the image. At the same time, considering that the smoke concentration is usually high at the location where the fire occurs, and affected by the wind direction, part of the smoke will spread to other places where the fire has not occurred. Therefore, the fire area is determined by the smoke concentration, and the fire area in the fire frame image is obtained, so that the fire area can be located more accurately and the accuracy of the fire alarm is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0039] Figure 1 A flowchart of a forest and grassland fire image detection method based on video monitoring provided by one embodiment of the present invention;
[0040] Figure 2 A flow chart of a method for obtaining the probability of smoke pixels provided by an embodiment of the present invention;
[0041] Figure 3 A flow chart of a method for obtaining a fire occurrence area provided by an embodiment of the present invention;
[0042] Figure 4 A structural diagram of a forest and grassland fire image detection system based on video surveillance provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0043] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following is a detailed description of the forest and grassland fire image detection method and system based on video surveillance proposed by the present invention, its specific implementation method, structure, features and effects, in combination with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.
[0044] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
[0045] The specific scheme of a forest and grassland fire image detection method and system based on video monitoring provided by the present invention is described in detail below in conjunction with the accompanying drawings.
[0046] The embodiment of the present invention provides a forest and grassland fire image detection method and system based on video monitoring, please refer to Figure 1 , which shows a flow chart of a forest and grassland fire image detection method based on video monitoring provided by an embodiment of the present invention, the method comprising the following steps:
[0047] Step S1: Acquire each monitoring frame image in the monitoring video.
[0048] In order to subsequently analyze the location of the fire, each monitoring frame image is first acquired.
[0049] In one embodiment of the present invention, the video monitoring system monitors the forest and grassland in real time by making the high-definition camera select a suitable acquisition position and maintain a suitable shooting distance and angle to obtain the initial video collected in real time. The frame rate of the initial video is set to 30fps, and all the initial frame images in the initial video can be obtained. Since the collected initial frame images have noise, the noise affects the accuracy of the image, so the initial frame images are denoised to eliminate the influence of noise and some external interference, and the monitoring frame images are obtained. The monitoring video is obtained by denoising all the initial frame images in the initial video. In the embodiment of the present invention, a bilateral filter is used to reduce the noise of the image, and the implementer can set it according to the implementation scenario. It should be noted that, in order to facilitate the calculation, all the indicator data involved in the calculation in the embodiment of the present invention are pre-processed to eliminate the dimension effect. The specific means of removing the dimension effect are technical means well known to those skilled in the art, and are not limited here.
[0050] It should be noted that the monitoring video in the embodiment of the present invention is directed to a scene where the vegetation of the forest and grassland is green against a blue sky background containing bright white clouds. In this scene, a monitoring video of a small-scale fire is taken as an example during the monitoring process.
[0051] Step S2: in the monitoring frame image, according to the difference of the pixel values of the pixel in different color channels, the smoke pixel possibility of the pixel point is obtained; according to the smoke pixel possibility of the pixel point in the monitoring frame image, the smoke pixel point of each monitoring frame image is obtained.
[0052] When monitoring fires in forests and grasslands, the thick smoke generated by forest and grassland fires obscures the flames, making it impossible to clearly identify the flames, resulting in inaccurate identification of the location of the fire. The present invention analyzes the characteristics of smoke when forest and grassland fires occur, thereby better determining the area where the fire occurred. First, it is necessary to determine the smoke pixel points, and obtain the smoke pixel possibility of the pixel points by analyzing the performance characteristics of the flame smoke in the vegetation and the sky when monitoring fires in forests and grasslands; the larger the smoke pixel possibility, the more likely the pixel point is to be fire smoke, and thus the smoke pixel points of each monitoring frame image are obtained according to the smoke pixel possibility of the pixel point in the monitoring frame image. The smoke pixel points more accurately reflect the pixel points corresponding to the fire smoke.
[0053] In order to subsequently analyze the performance of pixels in different color channels, it is first necessary to obtain the pixel values of each color channel of the pixel.
[0054] It should be noted that the monitoring frame image is represented in the form of RGB color space. Each pixel point in the RGB color space corresponds to the R color channel, the G color channel, and the B color channel, wherein the R color channel represents the red component of the pixel point; the G color channel represents the green component of the pixel point; and the B color channel represents the blue component of the pixel point. It is difficult to analyze smoke characteristics only by the pixel values of the RGB color channels. The monitoring frame image is converted from the RGB color space to the HSV color space to obtain the HSV image corresponding to the monitoring frame image. According to the HSV image, the V color channel of the pixel point is obtained. The V color channel represents the brightness of the color, and the pixel value of the V color channel is suitable for analyzing smoke characteristics. It should be noted that the conversion from the RGB color space to the HSV color space is a prior art well known to those skilled in the art and will not be elaborated here.
[0055] See also Figure 2 , which shows a flow chart of a method for obtaining smoke pixel likelihood in one embodiment of the present invention. Preferably, the smoke pixel likelihood of a pixel point is obtained by analyzing the performance characteristics of flame smoke in vegetation and sky. In one embodiment of the present invention, the method for obtaining smoke pixel likelihood specifically includes:
[0056] Step S201: obtaining a vegetation smoke measurement index of a pixel point according to a pixel value of a B color channel of the pixel point; the pixel value of the B color channel and the vegetation smoke measurement index are positively correlated.
[0057] Considering that the difference between forest and grassland vegetation and fire smoke is most obvious in the B color channel, and the pixel value of the B color channel of fire smoke is significantly greater than the pixel value of the B color channel of vegetation, the vegetation smoke metric index of the pixel point is obtained according to the pixel value of the B color channel of the pixel point. The larger the vegetation smoke metric index, the greater the possibility that the pixel point is smoke in the vegetation area.
[0058] In one embodiment of the present invention, a method for obtaining a vegetation smoke measurement index includes:
[0059] The pixel value of the B color channel of the pixel is normalized to obtain the vegetation smoke measurement index of the pixel. In one embodiment of the present invention, the normalization method is: using the norm normalization function to perform normalization and limit the value range to between 0 and 1.
[0060] Step S202: obtaining a sky haze measurement index of a pixel point according to a pixel value of a V color channel of the pixel point; the pixel value of the V color channel and the sky haze measurement index are negatively correlated.
[0061] Considering the presence of bright white clouds in the sky scene, white clouds and smoke are similar in color and difficult to distinguish directly. Since fire smoke gradually spreads from the location of the fire to the sky, the smoke concentration in the monitoring frame image is low, that is, the light reflection ability is weak, so the pixel value of the V color channel corresponding to the fire smoke pixel is often low, and the sky smoke metric index of the pixel is obtained. The larger the sky smoke metric index, the greater the possibility that the pixel is smoke in the sky area.
[0062] In one embodiment of the present invention, a method for obtaining a sky smoke measurement index includes:
[0063] Calculate the sum of the pixel value of the V color channel of the pixel and the denominator adjustment value, calculate the reciprocal of the sum, and use the norm normalization function to normalize the reciprocal to obtain the sky haze metric index of the pixel. In one embodiment of the present invention, the denominator adjustment value is used to ensure that the denominator is not 0. The denominator adjustment value is a number greater than 0. This embodiment sets it to 0.1, and the implementer can set it according to the implementation scenario.
[0064] Step S203: Obtain vegetation area measurement indicators of the pixels according to the differences in pixel values of different color channels of the pixels and the spatial distribution of the pixels.
[0065] Considering the possibility of the pixel being a smoke pixel in the subsequent analysis, it is necessary to adjust the analysis focus according to the area where the smoke is located. First, the possibility of the pixel being a vegetation area is required to obtain the vegetation area metric index. The larger the vegetation area metric index, the more likely the pixel is to be a pixel in the vegetation area.
[0066] Preferably, in one embodiment of the present invention, the method for obtaining vegetation area measurement indicators includes:
[0067] According to the difference between the pixel value of the G color channel and the pixel value of the B color channel of the pixel point, the first vegetation pixel possibility of the pixel point is obtained; according to the first vegetation pixel possibility, each vegetation area reference point is screened out from the pixel point;
[0068] According to the difference between the pixel value of the R color channel and the pixel value of the B color channel of the pixel point, the sky pixel possibility is obtained; according to the sky pixel possibility, each sky area reference point is screened out from the pixel point;
[0069] According to the overall distribution of the spatial distance between the pixel point and all the reference points in the vegetation area, the deviation vegetation metric value of the pixel point is obtained;
[0070] According to the overall distribution of the spatial distance between the pixel point and all the reference points in the sky area, the deviation metric value of the pixel point from the sky is obtained;
[0071] According to the deviation from vegetation measurement value and the deviation from sky measurement value, the second vegetation pixel possibility of the pixel point is obtained; the deviation from sky measurement value and the second vegetation pixel possibility are positively correlated; the deviation from vegetation measurement value and the second vegetation pixel possibility are negatively correlated;
[0072] A vegetation area measurement index is obtained according to the first vegetation pixel possibility and the second vegetation pixel possibility.
[0073] Considering that the monitoring frame image is mainly composed of vegetation area and sky area, both vegetation and sky are distributed regionally and there is a color difference between vegetation area and sky area, the vegetation area measurement index reflecting the possibility that the pixel point is a vegetation area is obtained from the perspective of color characteristics and spatial distribution.
[0074] First, considering that the color of vegetation is green, the pixel value of the G color channel of the pixel point in the vegetation area is relatively large and the pixel value of the B color channel is relatively small, the first vegetation pixel possibility of the pixel point is obtained, and the first vegetation pixel possibility reflects the possibility that the pixel point is a vegetation area from the perspective of color characteristics. The larger the first vegetation pixel possibility, the greater the possibility that the pixel point is in the vegetation area. Then, each vegetation area reference point is screened out from the pixel points. The vegetation area reference point reflects the pixel point corresponding to the vegetation area. Further considering that the sky area is blue as a whole, the pixel value of the B color channel of the sky area is relatively large and the pixel value of the R color channel is relatively small, and the sky pixel possibility is obtained. The sky pixel possibility reflects the possibility that the pixel point is a sky area from the perspective of color characteristics. The larger the sky pixel possibility, the greater the possibility that the pixel point is a sky area. Then, each sky area reference point is screened out from the pixel points. The sky area reference point reflects the pixel point corresponding to the sky area.
[0075] The distance between the pixel and the reference point of the vegetation area is reflected by the deviation of the pixel from the vegetation measurement value. The larger the value, the greater the distance. The distance between the pixel and the reference point of the sky area is reflected by the deviation of the sky measurement value. The larger the value, the greater the distance. Since the smaller the distance between the pixel and the reference point of the vegetation area and the larger the distance from the reference point of the sky area, the greater the possibility that the pixel is in the vegetation area, the second vegetation pixel possibility of the pixel is obtained. The second vegetation pixel possibility reflects the possibility that the pixel is in the vegetation area from the perspective of spatial distribution distance. The larger the second vegetation pixel possibility, the greater the possibility that the pixel is in the vegetation area. The vegetation area measurement index is obtained by combining the first vegetation pixel possibility and the second vegetation pixel possibility. The vegetation area measurement index more comprehensively reflects the possibility that the pixel is in the vegetation area. The larger the value of the vegetation area measurement index, the greater the possibility that the pixel is in the vegetation area.
[0076] For the above steps, specifically, the difference between the pixel value of the G color channel and the pixel value of the B color channel of the pixel point is calculated to obtain the first vegetation pixel possibility of the pixel point; according to the size of the first vegetation pixel possibility, all the pixels are sorted, and the previously preset number of pixels are used as reference points for each vegetation area. The difference between the pixel value of the R color channel and the pixel value of the B color channel of the pixel point is calculated to obtain the sky pixel possibility. According to the size of the sky pixel possibility, all the pixels are sorted, and the previously preset number of pixels are used as reference points for each sky area. The mean of the Euclidean distance between the pixel point and all the vegetation area reference points is calculated to obtain the deviation of the pixel point from the vegetation metric. The mean of the Euclidean distance between the pixel point and all the sky area reference points is calculated to obtain the deviation of the pixel point from the sky metric. The ratio of the deviation from the sky metric to the deviation from the vegetation metric is calculated to obtain the second vegetation pixel possibility of the pixel point. The first vegetation pixel possibility is normalized to obtain a first normalized value; the second vegetation pixel possibility is normalized to obtain a second normalized value, and the product of the first normalized value and the second normalized value is calculated to obtain a vegetation area measurement index. In one embodiment of the present invention, the normalization method is: normalization is performed using a norm normalization function to limit the value range to between 0 and 1. In one embodiment of the present invention, the preset number is 5, and the implementer can set it according to the implementation scenario.
[0077] Step S204: Obtain the smoke pixel possibility of the pixel point according to the vegetation area measurement index, the vegetation smoke measurement index and the sky smoke measurement index of the pixel point.
[0078] The analysis focus is adjusted through vegetation area measurement indicators so that the smoke pixel possibility can more accurately reflect the pixel points corresponding to the fire smoke. The larger the smoke pixel possibility, the greater the possibility that the pixel point is the pixel point corresponding to the fire smoke.
[0079] Preferably, in one embodiment of the present invention, the method for obtaining the smoke pixel probability comprises:
[0080] The vegetation area measurement index of the pixel point is used as the vegetation weight; the difference between 1 and the vegetation weight is calculated to obtain the sky weight; the product of the vegetation weight and the vegetation smoke measurement index is calculated to obtain the first product value; the product of the sky weight and the sky smoke measurement index is calculated to obtain the second product value; the sum of the first product value and the second product value is calculated to obtain the smoke pixel possibility of the pixel point.
[0081] In one embodiment of the present invention, the specific formula of smoke pixel likelihood includes:
[0082] ,in, is the smoke pixel probability of the j-th pixel; is the vegetation area metric of the j-th pixel, i.e., the vegetation weight; is the vegetation smoke metric index of the jth pixel; is the sky haze metric for the jth pixel; is the sky weight of the j-th pixel.
[0083] In the formula, Reflects the possibility that the pixel is in the vegetation area. The larger the value of the vegetation area metric index, the greater the possibility that the pixel is in the vegetation area, and the more the judgment center is inclined to the vegetation smoke metric index; otherwise, the judgment center is more inclined to the sky smoke metric index. The weights of vegetation smoke metrics and sky smoke metrics are adjusted so that smoke pixels can more accurately reflect the characteristics of fire smoke.
[0084] Preferably, in one embodiment of the present invention, considering that the greater the probability of a smoke pixel, the greater the possibility that the pixel is a pixel corresponding to fire smoke, the smoke pixel is screened out from the pixel points, and the method for obtaining the smoke pixel specifically includes:
[0085] Each pixel point whose smoke pixel probability is not less than the preset smoke threshold is marked as a smoke pixel point. In one embodiment of the present invention, the preset smoke threshold is 0.5, and the implementer can set it according to the implementation scenario.
[0086] Step S3: Filter out the fire frame image from the monitoring frame image according to the number of smoke pixels in the monitoring frame image; obtain the fire occurrence area in the fire frame image according to the local distribution of smoke pixels in the fire frame image, and issue a fire alarm.
[0087] In order to prevent misjudgment of images that are not fire images as images of fire, considering that fire will produce obvious smoke, the fire frame images are screened out from the monitoring frame images according to the number of smoke pixels in the monitoring frame images; the fire frame images can more accurately reflect the existence of fire in the image. At the same time, considering that the smoke density is usually high in the fire area, affected by the wind direction, part of the smoke will spread to other places where no fire has occurred, so the fire area is determined by the smoke density, and the fire area in the fire frame image is obtained, so that the fire area can be more accurately located and the accuracy of fire alarm is improved.
[0088] Preferably, considering that fire will produce obvious smoke, that is, the number of smoke pixels in the corresponding monitoring frame image is large, in order to prevent misjudgment of an image that produces fire as a fire image, a fire frame image is screened out from the monitoring frame image. In one embodiment of the present invention, a method for obtaining a fire frame image specifically includes:
[0089] Each monitoring frame image with a number of smoke pixels greater than a preset number is marked as a fire frame image. In one embodiment of the present invention, the preset number is set to 20, and the implementer can set it according to the implementation scenario.
[0090] Considering the regional distribution of smoke pixels and the fact that the smoke density is usually high in the fire area, the fire area is obtained. Figure 3 , which shows a flow chart of a method for obtaining a fire occurrence area in one embodiment of the present invention. Preferably, in one embodiment of the present invention, the method for obtaining a fire occurrence area specifically includes:
[0091] Step S301: Based on the region growing algorithm, all smoke pixels in the fire frame image are clustered according to the pixel values of the V color channel of all smoke pixels to obtain various suspected fire regions.
[0092] Considering the regional distribution of smoke pixels, all smoke pixels in the fire frame image are first clustered to obtain various suspected fire areas. Suspected fire areas initially reflect the possible areas where fires may exist.
[0093] It should be noted that the region growing algorithm is a technical means well known to those skilled in the art. Here, only the steps of clustering all smoke pixels in the fire frame image according to the pixel values of the V color channel of all smoke pixels using the region growing algorithm to obtain each suspected fire area are briefly described:
[0094] (1) Set each seed point in the image and use each seed point as the initial growth area; (2) Perform regional growth on each growth area according to the preset growth criteria to form each updated growth area; (3) Repeat (2) until the growth area meets the iteration termination condition; (4) until all growth areas meet the preset iteration termination condition, output each growth area and use each growth area as each suspected fire area. The preset growth criterion is: if the absolute value of the difference in the pixel value of the V color channel between the edge pixel point of the growth area and its adjacent pixel point is not greater than 2, the adjacent pixel point is added to the growth area. The preset iteration termination condition is: none of the edge pixel points of the growth area meets the growth criterion. In one embodiment of the present invention, the pixel points within the eight neighborhoods of the edge pixel point are used as the adjacent pixel points of the edge pixel point. It should be noted that the eight neighborhoods are a prior art well known to those skilled in the art and will not be elaborated here.
[0095] Step S302: Filter out the fire occurrence area from the suspected fire area according to the overall distribution of the pixel values of the V color channel of all smoke pixels in each suspected fire area.
[0096] Taking into account that the smoke concentration in the fire area is usually significantly higher, the higher the smoke concentration, the higher the density of smoke particles. The smoke area corresponding to the fire has a larger brightness, while the smoke area formed by diffusion has a relatively smaller brightness. The regional smoke ignition possibility is constructed. The larger the value, the greater the brightness of the pixel points in the suspected fire area, and the more likely it is to be a fire area. The fire area can be screened out from the suspected fire area, so that the fire location in the fire area can be more accurately determined.
[0097] In one embodiment of the present invention, the mean value of the pixel values of the V color channel of all smoke pixels in each suspected fire area is calculated to obtain the regional smoke ignition possibility of each suspected fire area, and the largest regional smoke ignition possibility is corresponding to the suspected fire area as the fire occurrence area.
[0098] Specifically, the video surveillance system is usually equipped with a geographic information positioning function. After obtaining the fire area in the fire frame image, it can automatically calculate and display the fire location and issue a fire alarm, providing accurate navigation information for the rescue team and reducing the time to find the source of the fire.
[0099] The present invention also proposes a forest and grassland fire image detection system based on video surveillance, please refer to Figure 4 , which shows a structural diagram of a forest and grassland fire image detection system based on video surveillance provided by an embodiment of the present invention. The system includes: an image acquisition module 101, a smoke pixel analysis module 102 and a fire alarm module 103.
[0100] The image acquisition module 101 is used to acquire each monitoring frame image in the monitoring video.
[0101] The smoke pixel analysis module 102 is used to obtain the smoke pixel possibility of the pixel in the monitoring frame image according to the difference in the pixel values of the pixel in different color channels; and obtain the smoke pixel of each monitoring frame image according to the smoke pixel possibility of the pixel in the monitoring frame image.
[0102] The fire alarm module 103 is used to filter out fire frame images from monitoring frame images according to the number of smoke pixels in the monitoring frame images; obtain the fire occurrence area in the fire frame images according to the local distribution of smoke pixels in the fire frame images, and issue a fire alarm.
[0103] It should be noted that: the system provided in the above embodiment is only illustrated by the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the computer device is divided into different functional modules to complete all or part of the functions described above. In addition, the forest and grassland fire image detection system based on video surveillance and the forest and grassland fire image detection method based on video surveillance provided in the above embodiment belong to the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.
[0104] In summary, the embodiment of the present invention provides a forest and grassland fire image detection method and system based on video surveillance. First, in the monitoring frame image, the smoke pixel possibility of the pixel point is obtained according to the difference in the pixel values of the pixel point in different color channels; the smoke pixel points of each monitoring frame image are obtained according to the smoke pixel possibility of the pixel point in the monitoring frame image; the fire frame image is screened out from the monitoring frame image according to the number of smoke pixel points in the monitoring frame image; the fire occurrence area in the fire frame image is obtained according to the local distribution of smoke pixel points in the fire frame image, and a fire alarm is issued. The embodiment of the present invention deeply analyzes the performance characteristics of flame smoke in vegetation and sky when monitoring fire conditions in forests and grasslands, so as to more accurately locate the fire occurrence area and improve the accuracy of fire alarm.
[0105] It should be noted that the sequence of the above embodiments of the present invention is only for description and does not represent the advantages and disadvantages of the embodiments. The processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0106] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.
Claims
1. A forest and grassland fire image detection method based on video surveillance, characterized in that: The method comprises the following steps: Obtain each monitoring frame image in the monitoring video; In the monitoring frame image, according to the difference of the pixel values of the pixel in different color channels, the smoke pixel possibility of the pixel point is obtained; according to the smoke pixel possibility of the pixel point in the monitoring frame image, the smoke pixel point of each monitoring frame image is obtained; According to the number of smoke pixels in the monitoring frame image, a fire frame image is screened out from the monitoring frame image; according to the local distribution of smoke pixels in the fire frame image, a fire occurrence area in the fire frame image is obtained to issue a fire alarm; The method for obtaining the smoke pixel probability specifically includes: The monitoring frame image is an RGB color space image; the monitoring frame image is converted from the RGB color space to the HSV color space to obtain an HSV image corresponding to the monitoring frame image; the color channels of the pixel points include: R color channel, G color channel, B color channel and V color channel; Obtaining a vegetation smoke measurement index of the pixel point according to the pixel value of the B color channel of the pixel point; the pixel value of the B color channel and the vegetation smoke measurement index are positively correlated; Obtaining a sky haze measurement index of a pixel point according to a pixel value of the V color channel of the pixel point; the pixel value of the V color channel and the sky haze measurement index are negatively correlated; According to the difference of pixel values of different color channels of the pixel points and the spatial distribution of the pixel points, the vegetation area measurement index of the pixel points is obtained; Obtaining the smoke pixel possibility of the pixel point according to the vegetation area measurement index of the pixel point, the vegetation smoke measurement index and the sky smoke measurement index; The method for obtaining the vegetation area measurement index specifically includes: According to the difference between the pixel value of the G color channel and the pixel value of the B color channel of the pixel point, a first vegetation pixel possibility of the pixel point is obtained; and according to the first vegetation pixel possibility, each vegetation area reference point is screened out from the pixel point; Obtaining sky pixel possibility according to the difference between the pixel value of the R color channel and the pixel value of the B color channel of the pixel point; and screening out various sky area reference points from the pixel point according to the sky pixel possibility; According to the overall distribution of the spatial distance between the pixel point and all the reference points in the vegetation area, the deviation vegetation metric value of the pixel point is obtained; According to the overall distribution of the spatial distance between the pixel point and all the reference points in the sky area, the deviation metric value of the pixel point from the sky is obtained; According to the deviation from vegetation metric value and the deviation from sky metric value, obtaining a second vegetation pixel possibility of the pixel point; the deviation from sky metric value and the second vegetation pixel possibility are positively correlated; the deviation from vegetation metric value and the second vegetation pixel possibility are negatively correlated; The vegetation area measurement index is obtained according to the first vegetation pixel possibility and the second vegetation pixel possibility.
2. A method for detecting forest and grassland fire images based on video surveillance according to claim 1, characterized in that: The method for obtaining the vegetation area measurement index according to the first vegetation pixel possibility and the second vegetation pixel possibility specifically includes: The first vegetation pixel possibility is normalized to obtain a first normalized value; the second vegetation pixel possibility is normalized to obtain a second normalized value; and the product of the first normalized value and the second normalized value is calculated to obtain a vegetation area measurement index.
3. The method for detecting forest and grassland fire images based on video surveillance according to claim 1, characterized in that: The method for obtaining the smoke pixel possibility of a pixel point according to the vegetation area measurement index of the pixel point, the vegetation smoke measurement index and the sky smoke measurement index specifically includes: The vegetation area measurement index of the pixel point is used as the vegetation weight; the difference between 1 and the vegetation weight is calculated to obtain the sky weight; the product of the vegetation weight and the vegetation smoke measurement index is calculated to obtain a first product value; the product of the sky weight and the sky smoke measurement index is calculated to obtain a second product value; the sum of the first product value and the second product value is calculated to obtain the smoke pixel possibility of the pixel point.
4. The method for detecting forest and grassland fire images based on video surveillance according to claim 1, characterized in that: The method for obtaining smoke pixel points specifically includes: Each pixel point whose smoke pixel probability is not less than a preset smoke threshold is marked as a smoke pixel point.
5. The method for detecting forest and grassland fire images based on video surveillance according to claim 1, characterized in that: The method for acquiring the fire frame image specifically comprises: Each monitoring frame image with a number of smoke pixels greater than a preset number is marked as a fire frame image.
6. The method for detecting forest and grassland fire images based on video surveillance according to claim 1, characterized in that: The method for obtaining the fire occurrence area specifically includes: Based on the region growing algorithm, all smoke pixels in the fire frame image are clustered according to the pixel values of the V color channel of all smoke pixels to obtain various suspected fire areas; The fire occurrence area is screened out from the suspected fire area according to the overall distribution of the pixel values of the V color channel of all smoke pixels in each of the suspected fire areas.
7. A method for detecting forest and grassland fire images based on video surveillance according to claim 6, characterized in that: The method for obtaining the fire occurrence area by screening out the fire occurrence area from the suspected fire area specifically includes: The mean value of the pixel value of the V color channel of all smoke pixels in each suspected fire area is calculated to obtain the regional smoke ignition possibility, and the largest regional smoke ignition possibility is corresponding to the suspected fire area as the fire occurrence area.
8. A forest and grassland fire image detection system based on video surveillance, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of a forest and grassland fire image detection method based on video surveillance as described in any one of claims 1 to 7 are implemented.
