Fire point positioning method, device and equipment based on monocular camera and storage medium
Through a monocular camera combined with a smoke detection model, forest fire points are identified and positioned, which solves the problems of high cost, low accuracy and slow speed in the existing technology, and achieves efficient and accurate fire point positioning.
Patent Information
- Application Number
- CN202410975260.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-19
- Publication Date
- 2024-11-15
AI Technical Summary
The existing forest fire point positioning method has high cost, low positioning accuracy and slow speed. The installation of binocular systems is complex and costly, and it is impossible to effectively solve the positioning error of long-distance fire point.
The fire point positioning method based on a monocular camera is adopted, and the scene image is detected through a pre-trained smoke detection model, and the position information of the fire point is obtained, and the latitude and longitude of the fire point is calculated using the camera's optical axis deflection angle and digital elevation information.
It improves the accuracy and speed of fire point positioning, reduces costs, simplifies installation complexity, and reduces the error of long-distance fire point positioning.
Smart Images

Figure CN118967804A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of forest fire positioning, and in particular to a fire point positioning method, device, equipment and storage medium based on a monocular camera. Background Art
[0002] In recent years, forest fires have become more frequent. The occurrence of forest fires can lead to burning of trees, burning of understory plant resources, soil erosion, air pollution, and threats to people's lives and property. Therefore, it is important to find the fire point in advance, obtain the exact location of the fire point, and take remedial measures for forest fires.
[0003] At present, fire point positioning is usually carried out by satellite remote sensing, aerial monitoring such as drones and airplanes, as well as manual control such as on-duty and lookout towers. Although satellite remote sensing has a wide range and high accuracy, it is too expensive and has poor real-time performance. Although airplanes and drones have high positioning accuracy, the time and money costs are too high. Manual monitoring cannot accurately locate the fire point, and the personnel cost and labor are too high. There is currently a binocular method for locating fire points, but the installation conditions of the binocular system are too harsh and complicated, and the cost is high, and the error in locating fire points at long distances is large. Summary of the invention
[0004] The technical problem to be solved by the embodiments of the present application is to provide a fire point positioning method, device, equipment and storage medium based on a monocular camera, so as to solve the problems of high cost, low positioning accuracy and slow positioning speed in the existing forest fire point positioning methods.
[0005] In a first aspect, an embodiment of the present application provides a fire point positioning method based on a monocular camera, the method comprising:
[0006] Calling a pre-trained smoke detection model to perform smoke detection on a scene image in a target scene captured by the monocular camera to obtain a smoke detection result in the scene image;
[0007] When the smoke detection result indicates that smoke exists in the scene image, obtaining the position information of the fire point in the scene image;
[0008] After controlling the camera optical axis of the monocular camera to align with the fire point based on the fire point location information, the longitude and latitude information of the fire point is calculated based on the deflection angle corresponding to the camera optical axis, the digital elevation information of the monocular camera and the projection position of the fire point in the world coordinate system.
[0009] Optionally, the smoke detection result includes: a smoke detection frame in the scene image,
[0010] The obtaining the fire point location information of the fire point in the scene image includes:
[0011] Performing cropping processing on the scene image based on the smoke detection frame to obtain a cropped image containing only the smoke area;
[0012] Based on the pixel point information in the cropped image, the fire point position information of the fire point in the scene image is identified.
[0013] Optionally, the cropping of the scene image based on the smoke detection frame to obtain a cropped image containing only the smoke area includes:
[0014] Performing geometric magnification processing on the smoke detection frame in the scene image to obtain a geometrically magnified detection frame;
[0015] The scene image is cropped based on the proportionally enlarged detection frame to obtain a cropped image containing only the smoke area.
[0016] Optionally, the identifying and obtaining the fire point position information of the fire point in the scene image based on the pixel point information in the cropped image includes:
[0017] Performing grayscale processing on the cropped image to obtain a grayscale image corresponding to the cropped image;
[0018] Traversing pixel values of all pixels in the grayscale image to obtain a traversal result;
[0019] According to the traversal result, determining the target pixel point in the grayscale image that meets the fire point detection condition;
[0020] According to the target pixel point, the fire point position information in the scene image is determined.
[0021] Optionally, determining the fire point position information of the fire point in the scene image according to the target pixel point includes:
[0022] Based on the target pixel point, determining whether the fire starting point is a fire starting point with an occlusion phenomenon;
[0023] In the case where the ignition point is an ignition point with an occlusion phenomenon, obtaining the ignition point position information in the scene image according to the intersection of the edge lines of the target pixel point;
[0024] In the case where the fire point is a fire point without occlusion, the target pixel points are traversed based on a depth-first traversal algorithm to obtain the fire point position information in the scene image.
[0025] Optionally, obtaining the ignition point position information of the ignition point in the scene image according to the intersection of the edge lines of the target pixel point includes:
[0026] Extracting edges of the grayscale image based on an edge detection algorithm to obtain regional edge data of the smoke area;
[0027] Remove edge data of a target pixel located at the bottom of the grayscale image in the region edge data, and extend the target pixel located at the left and right sides of the grayscale image in the region edge data to obtain two rays;
[0028] The intersection point of the two rays is obtained, and the intersection point is used as the fire starting point, and the position information of the intersection point in the scene image is used as the fire starting point position information.
[0029] Optionally, traversing the target pixel points based on a depth-first traversal algorithm to obtain the position information of the fire point in the scene image includes:
[0030] The target pixel points are used as nodes of a graph, and the target pixel points are connected at a preset distance threshold to construct a candidate ignition point graph;
[0031] Traversing the nodes in the candidate fire point graph based on a depth-first traversal algorithm to obtain a traversal result;
[0032] According to the traversal result, the fire point in the scene image and the fire point position information of the fire point in the scene image are obtained.
[0033] Optionally, the calculating the longitude and latitude information of the fire point based on the deflection angle corresponding to the camera optical axis, the digital elevation information of the monocular camera and the projection position of the fire point in the world coordinate system includes:
[0034] Obtaining a vertical deflection angle and a horizontal deflection angle of the camera optical axis when the camera optical axis is aligned with the fire point;
[0035] Obtaining the projection position of the fire point in the world coordinate system;
[0036] Based on the pre-established digital elevation model of the target scene and the position information of the monocular camera, the digital elevation information of the monocular camera is calculated;
[0037] Based on the digital elevation information, the horizontal deflection angle and the vertical deflection angle, the longitude and latitude information of the projection position is calculated;
[0038] The longitude and latitude information of the fire point is calculated based on the longitude and latitude information of the projection position and the digital elevation model.
[0039] Optionally, calling a pre-trained smoke detection model to perform smoke detection on a scene image in a target scene captured by the monocular camera to obtain a smoke detection result in the scene image includes:
[0040] Preprocessing the scene image to obtain a preprocessed image;
[0041] Inputting the preprocessed image into the smoke detection model, the smoke detection model comprising: a feature extraction network, a pyramid feature network, a path aggregation network and a convolutional network;
[0042] Calling the feature extraction network to perform feature extraction on the preprocessed image to obtain feature maps of multiple scales corresponding to the preprocessed image;
[0043] Calling the pyramid feature network to perform upsampling and feature fusion processing on the feature maps of the multiple scales to obtain a fused feature map;
[0044] Calling the path aggregation network to perform downsampling and feature fusion processing on the fused feature map to obtain a fused target feature map;
[0045] The convolutional network is called to perform feature extraction on the target feature map to obtain a smoke detection result in the scene image.
[0046] In a second aspect, an embodiment of the present application provides a fire point positioning device based on a monocular camera, the device comprising:
[0047] A smoke detection result acquisition module is used to call a pre-trained smoke detection model to perform smoke detection on a scene image in a target scene captured by the monocular camera, and obtain a smoke detection result in the scene image;
[0048] A fire point location acquisition module, used for acquiring the fire point location information of the fire point in the scene image when the smoke detection result indicates that there is smoke phenomenon in the scene image;
[0049] The fire point positioning module is used to control the camera optical axis of the monocular camera to align with the fire point based on the fire point position information, and then calculate the longitude and latitude information of the fire point based on the deflection angle corresponding to the camera optical axis, the digital elevation information of the monocular camera and the projection position of the fire point in the world coordinate system.
[0050] Optionally, the smoke detection result includes: a smoke detection frame in the scene image,
[0051] The fire point location acquisition module includes:
[0052] A cropped image acquisition unit, configured to perform cropping processing on the scene image based on the smoke detection frame to obtain a cropped image containing only the smoke area;
[0053] A fire point position identification unit is used to identify the fire point position information of the fire point in the scene image based on the pixel point information in the cropped image.
[0054] Optionally, the cropped image acquisition unit includes:
[0055] The detection frame enlargement subunit is used to perform geometric enlargement processing on the smoke detection frame in the scene image to obtain a geometrically enlarged detection frame;
[0056] The cropped image acquisition subunit is used to crop the scene image based on the proportionally enlarged detection frame to obtain a cropped image containing only the smoke area.
[0057] Optionally, the fire point location identification unit includes:
[0058] A grayscale image acquisition subunit, used for performing grayscale processing on the cropped image to obtain a grayscale image corresponding to the cropped image;
[0059] A traversal result acquisition subunit is used to traverse the pixel values of all pixels in the grayscale image to obtain a traversal result;
[0060] A target pixel point determination subunit, used to determine the target pixel point that meets the fire point detection condition in the grayscale image according to the traversal result;
[0061] The fire point position determination subunit is used to determine the fire point position information of the fire point in the scene image according to the target pixel point.
[0062] Optionally, the fire point location determination subunit includes:
[0063] A fire point determination subunit, used to determine whether the fire point is a fire point with an occlusion phenomenon based on the target pixel point;
[0064] A first position acquisition subunit is used to obtain the position information of the fire point in the scene image according to the intersection of the edge lines of the target pixel point when the fire point is a fire point with an occlusion phenomenon;
[0065] The second position acquisition subunit is used to traverse the target pixel points based on the depth-first traversal algorithm when the fire point is a fire point without occlusion, so as to obtain the fire point position information in the scene image.
[0066] Optionally, the first position acquisition subunit includes:
[0067] An edge data acquisition subunit is used to extract edges of the grayscale image based on an edge detection algorithm to obtain regional edge data of the smoke area;
[0068] A ray acquisition subunit, used for removing edge data of a target pixel located at the bottom of the grayscale image in the area edge data, and extending the target pixel located at the left and right sides of the grayscale image in the area edge data to obtain two rays;
[0069] The third position acquisition subunit is used to acquire the intersection of the two rays, and use the intersection as the fire point, and use the position information of the intersection in the scene image as the fire point position information.
[0070] Optionally, the second position acquisition subunit includes:
[0071] A fire point graph construction subunit is used to use the target pixel points as nodes of the graph and connect the target pixel points at a preset distance threshold to construct a candidate fire point graph;
[0072] A node traversal subunit, used to traverse the nodes in the candidate fire point graph based on a depth-first traversal algorithm to obtain a traversal result;
[0073] The fourth position acquisition subunit is used to obtain the fire point in the scene image and the fire point position information of the fire point in the scene image according to the traversal result.
[0074] Optionally, the fire point locating module includes:
[0075] A deflection angle acquisition unit, used to acquire a vertical deflection angle and a horizontal deflection angle of the camera optical axis when the camera optical axis is aligned with the fire point;
[0076] A projection position acquisition unit, used for acquiring the projection position of the fire point in the world coordinate system;
[0077] A digital elevation calculation unit, configured to calculate digital elevation information of the monocular camera based on a pre-established digital elevation model of the target scene and position information of the monocular camera;
[0078] A first longitude and latitude calculation unit, configured to calculate the longitude and latitude information of the projection position based on the digital elevation information, the horizontal deflection angle, and the vertical deflection angle;
[0079] The second longitude and latitude calculation unit is used to calculate the longitude and latitude information of the fire point according to the longitude and latitude information of the projection position and the digital elevation model.
[0080] Optionally, the smoke detection result acquisition module includes:
[0081] A preprocessed image acquisition unit, used to preprocess the scene image to obtain a preprocessed image;
[0082] A preprocessed image input unit, used to input the preprocessed image into the smoke detection model, wherein the smoke detection model includes: a feature extraction network, a pyramid feature network, a path aggregation network and a convolutional network;
[0083] A first feature map acquisition unit, configured to call the feature extraction network to perform feature extraction on the preprocessed image, and obtain feature maps of multiple scales corresponding to the preprocessed image;
[0084] A second feature map acquisition unit is used to call the pyramid feature network to perform upsampling and feature fusion processing on the feature maps of the multiple scales to obtain a fused feature map;
[0085] A third feature map acquisition unit is used to call the path aggregation network to perform downsampling and feature fusion processing on the fused feature map to obtain a fused target feature map;
[0086] The smoke detection result acquisition unit is used to call the convolutional network to perform feature extraction on the target feature map to obtain the smoke detection result in the scene image.
[0087] In a third aspect, an embodiment of the present application provides an electronic device, including:
[0088] A processor, a memory, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, any of the above-mentioned methods for locating a fire point based on a monocular camera is implemented.
[0089] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium. When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute any of the above-mentioned monocular camera-based fire point positioning methods.
[0090] Compared with the prior art, the embodiments of the present application have the following advantages:
[0091] In the embodiment of the present application, a pre-trained smoke detection model is called to perform smoke detection on a scene image in a target scene captured by a monocular camera to obtain a smoke detection result in the scene image. When the smoke detection result indicates that there is a smoke phenomenon in the scene image, the position information of the fire point in the scene image is obtained. After the camera optical axis of the monocular camera is controlled to align with the fire point based on the fire point position information, the longitude and latitude information of the fire point is calculated based on the deflection angle corresponding to the camera optical axis, the digital elevation information of the monocular camera and the projection position of the fire point in the world coordinate system. In the embodiment of the present application, a smoke detection model is used to first perform smoke detection on a scene image, and a fire point recognition method is used to identify the fire point in the image, and the fire point is located based on the digital elevation information of the monocular camera and the deflection angle of the camera optical axis, so as to improve the accuracy and speed of fire point positioning. At the same time, the method of using a monocular camera to locate the fire point reduces the cost of fire point positioning.
[0092] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0093] Figure 1 A flowchart of a method for locating a fire point based on a monocular camera provided in an embodiment of the present application;
[0094] Figure 2 A schematic diagram of a smoke detection model provided in an embodiment of the present application;
[0095] Figure 3 A schematic diagram of a camera ray locating a fire point provided in an embodiment of the present application;
[0096] Figure 4 A schematic diagram of a fire point positioning coordinate provided in an embodiment of the present application;
[0097] Figure 5 A schematic diagram of a fire point positioning process provided in an embodiment of the present application;
[0098] Figure 6 A schematic diagram of the structure of a fire point positioning device based on a monocular camera provided in an embodiment of the present application;
[0099] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0100] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0101] The terms used in the embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to limit the present application. The singular forms "a", "said" and "the" used in the embodiments of the present application and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings.
[0102] Embodiment 1
[0103] Reference Figure 1 , shows a flow chart of the steps of a fire point positioning method based on a monocular camera provided in an embodiment of the present application, such as Figure 1 As shown, the fire point positioning method based on a monocular camera may include: step 101, step 102 and step 103.
[0104] Step 101: calling a pre-trained smoke detection model to perform smoke detection on a scene image in a target scene captured by the monocular camera to obtain a smoke detection result in the scene image.
[0105] In the embodiment of the present application, the smoke detection model refers to a pre-trained model for smoke detection. In this example, the smoke detection model is generally used in a fire warning system to automatically identify and detect the presence of smoke. The model can combine computer vision, image processing and machine learning technologies to efficiently and accurately detect smoke and issue an alarm when smoke is detected.
[0106] The smoke detection model uses image processing techniques, such as color analysis and edge detection, to process the images captured by the camera to identify smoke.
[0107] The target scene refers to a scene where fire point detection is required. In this example, the target scene may be, but is not limited to, a forest scene.
[0108] A monocular camera is a camera system that uses only one lens. It reflects the information of the three-dimensional world by capturing two-dimensional images.
[0109] In practical applications, a monocular camera for detecting a scene image in a target scene may be pre-installed, and the target scene may be patrolled by the monocular camera to obtain a scene image of the target scene.
[0110] After acquiring the scene image in the target scene, the pre-trained smoke detection model can be called to perform smoke detection on the scene image to obtain the smoke detection result in the scene image. The image processing process of the smoke detection model can be described in detail in combination with the following specific implementation method.
[0111] In a specific implementation of the present application, the above step 101 may include:
[0112] Sub-step A1: pre-process the scene image to obtain a pre-processed image.
[0113] In this embodiment, after obtaining the scene image, the scene image may be preprocessed to obtain a preprocessed image. Specifically, the scene image may be preprocessed using Gaussian filtering, noise filtering, etc., to avoid the problem of inaccurate smoke detection results caused by interference of the camera with rain, fog, dew, etc. due to the forest environment.
[0114] After the scene image is preprocessed to obtain a preprocessed image, sub-step A2 is performed.
[0115] Sub-step A2: inputting the preprocessed image into the smoke detection model, wherein the smoke detection model comprises: a feature extraction network, a pyramid feature network, a path aggregation network and a convolutional network.
[0116] After preprocessing the scene image to obtain a preprocessed image, the preprocessed image may be input into a smoke detection model. In this example, the smoke detection model may be, but is not limited to, a smoke detection model based on YOLOv5.
[0117] The smoke detection model can include: feature extraction network, pyramid feature network, path aggregation network and convolutional network.
[0118] After the pre-processed image is input into the smoke detection model, sub-step A3 is performed.
[0119] Sub-step A3: calling the feature extraction network to perform feature extraction on the preprocessed image to obtain feature maps of multiple scales corresponding to the preprocessed image.
[0120] After the preprocessed image is input into the smoke detection model, first, the feature extraction network can be called to extract features from the preprocessed image, thereby obtaining feature maps of multiple scales corresponding to the preprocessed image. Specifically, the preprocessed image can be subjected to feature extraction through the feature extraction network, and a series of feature maps of different scales will be generated. These feature maps contain information at different levels in the image. Figure 2 As shown in FIG. 1 , after feature extraction, the image can obtain features of three scales, namely 20×20, 40×40, and 80×80.
[0121] After calling the feature extraction network to extract features from the preprocessed image and obtaining feature maps of multiple scales corresponding to the preprocessed image, sub-step A4 is executed.
[0122] Sub-step A4: calling the pyramid feature network to perform upsampling and feature fusion processing on the feature maps of the multiple scales to obtain a fused feature map.
[0123] After calling the feature extraction network to extract features from the preprocessed image and obtaining feature maps of multiple scales corresponding to the preprocessed image, the pyramid feature network can be called to upsample and fuse the feature maps of multiple scales to obtain the fused feature maps. Figure 2 As shown, the pyramid network (FPN) can upsample the feature maps of the three scales respectively, and perform feature fusion processing on the upsampled features to obtain the fused feature maps.
[0124] In the specific implementation, FPN is responsible for feature fusion at different scales to achieve semantic feature fusion. It first upsamples the feature maps of the lower level to have the same spatial resolution as the feature maps of the higher level. Then, these upsampled feature maps are fused with the feature maps of the higher level to generate new fused feature maps. This process can be repeated at multiple scales to generate a series of feature maps that fuse information from different levels.
[0125] After calling the pyramid feature network to upsample and fuse the feature maps of multiple scales to obtain the fused feature maps, sub-step A5 is executed.
[0126] Sub-step A5: calling the path aggregation network to perform downsampling and feature fusion processing on the fused feature map to obtain a fused target feature map.
[0127] After calling the pyramid feature network to upsample and fuse the feature maps of multiple scales to obtain the fused feature map, the path aggregation network can be called to downsample and fuse the fused feature map to obtain the fused target feature map. Figure 2 As shown in the figure, the path aggregation network (PAN) downsamples the feature map and fuses the semantic features of the feature pyramid at different scales to achieve the fusion of graphic and semantic features.
[0128] In the specific implementation, PAN is a bottom-up path enhancement module added on the basis of FPN. It first downsamples the highest-level feature map generated by FPN to have the same spatial resolution as the lower-level feature map. The downsampled feature map is fused with the lower-level feature map, which is the opposite of the upsampling and fusion process in FPN. This bottom-up path aggregation helps propagate low-level detail information (such as edges, textures, etc.) to high-level feature maps, thereby enhancing the model's positioning ability. PAN generates a series of feature maps that fuse information from different levels, which contain both semantic information and graphic features.
[0129] After calling the path aggregation network to downsample and fuse the fused feature map to obtain the fused target feature map, sub-step A6 is executed.
[0130] Sub-step A6: calling the convolutional network to perform feature extraction on the target feature map to obtain a smoke detection result in the scene image.
[0131] After calling the path aggregation network to downsample and fuse the fused feature map to obtain the fused target feature map, the convolutional network can be called to extract features from the target feature map to obtain the smoke detection result in the scene image.
[0132] In the specific implementation, the smoke detection model can also include a detection head. The feature maps processed by the pyramid feature network and the path aggregation network are sent to the detection head for final detection. The detection head predicts bounding boxes, confidences, and category scores on these feature maps to detect and locate smoke. The model outputs a series of bounding boxes, each of which contains a predicted smoke area, the confidence of the area, and the score of belonging to the smoke category. These outputs can be used to draw bounding boxes on the image and display the detection results.
[0133] After calling the pre-trained smoke detection model to perform smoke detection on the scene image in the target scene captured by the monocular camera and obtaining the smoke detection result in the scene image, step 102 is executed.
[0134] Step 102: When the smoke detection result indicates that smoke exists in the scene image, obtain the position information of the fire point in the scene image.
[0135] After calling the pre-trained smoke detection model to perform smoke detection on the scene image in the target scene captured by the monocular camera and obtaining the smoke detection result in the scene image, it can be determined whether there is smoke phenomenon in the scene image based on the smoke detection result, that is, whether there is smoke phenomenon caused by fire in the target scene.
[0136] When the smoke detection result indicates that there is smoke in the scene image, the fire point location information of the fire point in the scene image can be obtained. The identification process of the fire point location information can be described in detail in combination with the following specific implementation methods.
[0137] In a specific implementation of the present application, the above step 102 may include:
[0138] Sub-step B1: cropping the scene image based on the smoke detection frame to obtain a cropped image containing only the smoke area.
[0139] In this embodiment, the smoke detection result may include: a smoke detection frame in the scene image. The smoke detection frame may be a square frame, which is a frame in the scene image that can just enclose the smoke area.
[0140] After obtaining the smoke detection result, the scene image can be cropped based on the smoke detection frame in the smoke detection result to obtain a cropped image containing only the smoke area. In a specific implementation, the smoke detection frame in the scene image can be firstly geometrically enlarged to obtain a geometrically enlarged detection frame. Then, the scene image is cropped according to the geometrically enlarged detection frame to obtain a cropped image containing only the smoke area.
[0141] The embodiment of the present application can expand the positioning range of the fire point by proportionally enlarging the smoke detection frame, thereby avoiding the problem that the fire point cannot be accurately located due to a small positioning range.
[0142] After the scene image is cropped based on the smoke detection frame to obtain a cropped image containing only the smoke area, sub-step B2 is performed.
[0143] Sub-step B2: Based on the pixel information in the cropped image, identify the fire point position information of the fire point in the scene image.
[0144] After the scene image is cropped based on the smoke detection frame to obtain a cropped image containing only the smoke area, the fire point location information in the scene image can be obtained based on the pixel point information in the cropped image. Specifically, the cropped image can be grayscale processed first, and then the pixel values of the pixels in the grayscale image can be traversed, and the fire point location information can be located based on the traversal results. The implementation process can be described in detail in conjunction with the following specific implementation method.
[0145] In another specific implementation of the present application, the above sub-step B2 may include:
[0146] Sub-step C1: performing grayscale processing on the cropped image to obtain a grayscale image corresponding to the cropped image.
[0147] In this embodiment, after the cropped image is obtained, grayscale processing may be performed on the cropped image to obtain a grayscale image corresponding to the cropped image.
[0148] Sub-step C2: traverse the pixel values of all pixels in the grayscale image to obtain a traversal result.
[0149] Then, the pixel values of all pixels in the grayscale image can be traversed to obtain the traversal result. Specifically, the distribution of grayscale image pixel values can be observed, and the grayscale value of the image can be divided into two parts with a threshold value so that the variance of the two parts is maximized and has maximum separability. The segmentation condition is as follows, where g is the image, x, y are pixel coordinates, and T is the threshold value:
[0150]
[0151] This threshold is derived by the least square method based on the grayscale histogram. The binary image of the smoke is obtained by threshold segmentation. At this time, there are many clutters in the binary image that interfere with the judgment, and clutter filtering operations are required. To perform clutter filtering, it is necessary to traverse all pixels with a value of 1 row by row, from left to right, from top to bottom. Traverse the entire contour with a pixel value of 1. Filter out the contours with pixels less than a certain threshold to complete the filtering of the binary image. The judgment conditions are as follows, where contours(area) is the number of pixels in the contour:
[0152]
[0153] Segment the smoke by the above operation. Then, all pixels in the obtained smoke segmentation area can be traversed.
[0154] Sub-step C3: According to the traversal result, determine the target pixel points in the grayscale image that meet the fire point detection conditions.
[0155] After obtaining the traversal results, the target pixel points in the grayscale image that meet the fire point detection conditions can be determined based on the traversal results. The fire point detection conditions are as described in the above sub-step C2: traversing the entire contour with a pixel value of 1. Filtering out contours with pixels less than a certain threshold in the contours can complete the filtering of the binary image.
[0156] Sub-step C4: determining the position information of the fire point in the scene image according to the target pixel point.
[0157] Finally, the position information of the fire starting point in the scene image can be determined according to the target pixel point. Specifically, it can be described in detail in combination with the following specific implementation methods.
[0158] In another specific implementation of the present application, the above sub-step C4 may include:
[0159] Sub-step D1: Based on the target pixel point, determine whether the fire point is a fire point with an occlusion phenomenon.
[0160] In this embodiment, it can be determined in combination with the target pixel point whether the fire starting point is a fire starting point with an occlusion phenomenon.
[0161] Specifically, all pixels in the obtained smoke segmentation area are traversed. Set the point with a pixel value of 1 as the target point and the point with a pixel value of 0 as the background point. When there is at least one background point in the 8 neighborhoods around a target point, the pixel of the point and the 8 neighborhood pixels are judged, and marked if they meet the judgment conditions. The judgment conditions are as follows, where P(A) is the number of non-zero neighborhoods of point A, and S(A) is the number of changes from 0 to 1 in the surrounding neighborhood points:
[0162]
[0163] Traverse all pixels according to the above formula until no pixels that meet the marking condition appear. At this time, the remaining pixels are the refined pixels. The refined pixels are divided according to the edges to get the endpoints. If the bottom endpoints are too dense, almost on the same horizontal plane, and the pixel concentration is lower than the set threshold, it is considered as occlusion, otherwise it is considered as unocclusion.
[0164] Sub-step D2: when the fire point is an occlusion-prone fire point, obtain the fire point position information of the fire point in the scene image according to the intersection of the edge lines of the target pixel point.
[0165] In the case where the fire point is an occluded fire point, the position information of the fire point in the scene image can be obtained based on the intersection of the edge lines of the target pixel points. Specifically, the edge of the grayscale image can be extracted based on the edge detection algorithm to obtain the regional edge data of the smoke area. The edge data of the target pixel points located at the bottom of the grayscale image in the regional edge data is removed, and the curve direction of the target pixel points located on the left and right sides of the grayscale image in the regional edge data is extended to obtain two rays. The intersection of the two rays is obtained, and the intersection is used as the fire point, and the position information of the intersection in the scene image is used as the fire point position information.
[0166] In the specific implementation, when the fire point is blocked, the camera cannot directly observe the fire point, which will lead to obvious deviation in the final fire point positioning. Because the camera locates the smoke to find the fire point, the blockage of the mountain or other objects will lead to misjudgment of the fire point, and the camera ray needs to pass through the fire point, which will lead to very large errors, such as Figure 3As shown. Therefore, in the embodiment of the present application, the perspective rule is used to predict the fire point behind the obstruction to reduce the error. The edge of the obtained smoke segmentation area is extracted, and the edge data formed by the bottom endpoint is removed according to the coordinates of the bottom dense endpoint, so that the edge data is changed from a closed loop to two curves, and the left and right edge lines are made into rays according to the curve trend, and the intersection is the predicted fire point.
[0167] Sub-step D3: When the fire point is a fire point without occlusion, traverse the target pixel points based on a depth-first traversal algorithm to obtain the fire point position information in the scene image.
[0168] In the case where the fire point is a fire point without occlusion, the target pixel points can be traversed based on the depth-first traversal algorithm to obtain the fire point position information in the scene image. Specifically, the target pixel points can be used as nodes of the graph, and the target pixel points can be connected with a preset distance threshold to construct a candidate fire point graph. The nodes in the candidate fire point graph are traversed based on the depth-first traversal algorithm to obtain a traversal result. According to the traversal result, the fire point in the scene image and the fire point position information in the scene image are obtained.
[0169] In this embodiment, when the fire point is unobstructed, according to the above description, the obtained endpoint is used as a candidate for the fire point. According to the depth-first traversal of the candidate points, all endpoints are regarded as a graph, and the top endpoint is regarded as the initial node V. First, the initial node is visited and the node V is marked as visited, and then the first adjacent node W of the node V is found. If W does not exist, the node is searched again from V. If W has not been visited, W is treated as another V and the above steps are performed again. Find the next adjacent node of the W adjacent node of the node V, and determine again whether W exists. Repeat the above steps to obtain the fire point in the unobstructed case. Specifically, after the traversal is completed, the access list will contain all the visited nodes (i.e., endpoints), and these nodes can be further analyzed as needed to determine the final fire point. For example, the most likely fire point can be selected based on the position, brightness, color or other features of the node.
[0170] After obtaining the fire point position information in the scene image, step 103 is executed.
[0171] Step 103: After controlling the camera optical axis of the monocular camera to align with the fire point based on the fire point location information, the longitude and latitude information of the fire point is calculated based on the deflection angle corresponding to the camera optical axis, the digital elevation information of the monocular camera and the projection position of the fire point in the world coordinate system.
[0172] After identifying the position information of the fire point in the scene image based on the pixel point information in the smoke image area obtained by cropping the scene image, an optical axis movement instruction can be sent to the monocular camera. The instruction includes the camera optical axis movement parameters, so that the monocular camera can move the camera optical axis to align with the fire point.
[0173] Then, the longitude and latitude information of the fire point can be calculated based on the deflection angle corresponding to the camera optical axis, the digital elevation information of the monocular camera and the projection position of the fire point in the world coordinate system. The implementation process can be described in detail in combination with the following specific implementation method.
[0174] In a specific implementation of the present application, the above step 103 may include:
[0175] Sub-step E1: Obtain the vertical deflection angle and the horizontal deflection angle of the camera optical axis when it is aimed at the fire point.
[0176] In this embodiment, after the camera optical axis of the monocular camera is aligned with the fire point, the vertical deflection angle and the horizontal deflection angle of the camera optical axis when aligned with the fire point can be obtained.
[0177] Among them, the horizontal deflection angle, also known as the azimuth angle, describes the angle of the camera optical axis in the horizontal plane from the due north direction (or other reference directions, such as due east, due south, etc.) to the target point (such as the fire point) in a counterclockwise (or clockwise, depending on the system convention). This angle is usually measured in degrees (°), and the range is usually 0° to 360°.
[0178] Vertical deflection angle, also called pitch angle, describes the angle at which the camera's optical axis is rotated vertically from the horizontal plane, up or down, to point toward the target point (such as the fire point). This angle is also measured in degrees (°), and usually ranges from -90° (fully downward) to +90° (fully upward).
[0179] Sub-step E2: Obtain the projection position of the fire point in the world coordinate system.
[0180] After obtaining the vertical deflection angle and the horizontal deflection angle of the camera optical axis when it is aimed at the fire point, the projection position of the fire point in the world coordinate system can be obtained.
[0181] Sub-step E3: Based on the pre-established digital elevation model of the target scene and the position information of the monocular camera, the digital elevation information of the monocular camera is calculated.
[0182] A digital elevation model (DEM) is a digital representation of the terrain of a geographical area. It uses limited terrain elevation data to achieve digital simulation of the ground terrain. A digital elevation model is a physical ground model that represents the ground elevation in the form of a set of ordered numerical arrays.
[0183] At the same time, the digital elevation information of the monocular camera can be calculated using the pre-established digital elevation model. Specifically, the digital elevation information of the bullet screen camera can be calculated based on the latitude and longitude information of the monocular camera and the digital elevation model.
[0184] Sub-step E4: Based on the digital elevation information, the horizontal deflection angle and the vertical deflection angle, calculate and obtain the longitude and latitude information of the projection position.
[0185] Furthermore, the longitude and latitude information of the projection position can be calculated based on the digital elevation information, the horizontal deflection angle and the vertical deflection angle.
[0186] Sub-step E5: Calculate the longitude and latitude information of the fire point based on the longitude and latitude information of the projection position and the digital elevation model.
[0187] After the longitude and latitude information of the projection position is obtained, the longitude and latitude information of the fire point can be calculated based on the longitude and latitude information of the projection position and the digital elevation model.
[0188] For calculation methods, it can be combined Figure 4 This is described in detail as follows.
[0189] like Figure 4 As shown in , the angle between the camera optical axis and the horizontal plane is β, which is the current pitch angle of the camera. The angle between the projection of the camera optical axis in the horizontal direction and the initial direction is α, which is the current horizontal angle of the camera.
[0190] Assume that the geodetic coordinate system and the rectangular coordinate system overlap, and take the sea level as point O as the coordinate origin, such as Figure 6 As shown. With the four directions of southeast, northwest and northeast as the four initial zero-degree angles, the horizontal angle and pitch angle are obtained by moving the camera optical axis to align with the fire point. Line segment AB is the camera tower, which is a camera bracket with a certain height, so that the camera can capture wider data. Line segment OA is the elevation obtained by GPS and digital elevation model. F is the simulated fire point, D is the projection of the fire point on the coordinate system, C is the intersection of the camera horizontal plane and the vertical line through the fire point F, and AF is the line from the location of the camera tower to the fire point. Due to the winding mountainous area, it is a curve. The longitude and latitude of point D are obtained to obtain the longitude and latitude information of point F.
[0191] When locating the fire point, you can take a point M on the ray OG at fixed step lengths, where point G is the intersection of the ray with the camera optical axis pointing to the fire point F and the sea level, and calculate the sum of the ground elevation MH of point M on the ray and the opposite side EN of the β angle, EH = NM-HM-EN, where the straight-line distance of point M is a preset value, and the longitude and latitude of point M can be calculated based on the horizontal and vertical deflection angles of the camera. Then subtract the sum from the coordinate height OB of the camera tower to get the value of EH. As point M on the ray OG continues to take points forward at fixed step lengths, the corresponding EH value will gradually approach zero. When the calculated EH value is less than zero, it means that the selected point M exceeds the projection point D of the fire point F on OG. At this time, this point is set to M1, and point D is between M and M1. The interval judgment conditions are as follows:
[0192]
[0193] Use the binary method to find a point where EH is less than the threshold in the interval between M and M1, and obtain the horizontal distance of this point. According to the horizontal and vertical deflection angles of the camera, calculate the longitude and latitude of this point, and then get the coordinates of point D. After obtaining the longitude and latitude of point D, directly use the digital elevation model to obtain the height of the point through the longitude and latitude, and calculate the distance from the fire point to the monocular camera through the horizontal distance and vertical height of the point. Finally, the longitude and latitude information of the fire point can be calculated based on the longitude and latitude information of the monocular camera and the distance, so as to realize the location of the fire point.
[0194] The embodiment of the present application uses a smoke detection model to first perform smoke detection on a scene image, and uses a fire point recognition method to identify the fire point in the image, and locates the fire point based on a digital elevation model, thereby improving the accuracy and speed of fire point location. At the same time, the method of using a monocular camera to locate the fire point reduces the cost of fire point location.
[0195] The implementation process of fire point positioning can be combined with Figure 5 The following description is given.
[0196] Reference Figure 5 , shows a schematic diagram of a fire point positioning process provided by an embodiment of the present application. Figure 5 As shown, the positioning process may include:
[0197] 1. Camera patrol, that is, continuously taking pictures of the target scene (such as a forest, etc.) with a monocular camera.
[0198] 2. Smoke detection, that is, using a smoke detection model to perform smoke detection on the captured scene image.
[0199] 3. Camera patrol: if there is smoke, the detected smoke area will be photographed by a monocular camera to obtain a clearer and more accurate scene image.
[0200] 4. Fire point detection, and determine whether there is any occlusion based on the detection results, that is, segment the area of interest of the scene image (that is, the smoke area in this embodiment), and segment the foreground and background. Secondly, when there are no obstructions in the smoke range and the fire point can be directly observed, the fire point positioning without obstructions is used, the segmented image is pixel-refined, and the endpoints are traversed for depth first to determine the position of the fire point in the image; when there are obstructions in the smoke range and the fire point cannot be directly observed, the fire point positioning with obstructions is used to predict the position of the fire point in the image.
[0201] 5. Combine with DEM positioning. That is, locate the longitude and latitude of the fire point. After detecting the location of the fire point in the image, first move the camera optical axis to the fire point to obtain the horizontal and vertical deflection angles at this time. Secondly, combine the digital elevation model and the camera GPS information to obtain the target longitude and latitude.
[0202] The fire point location method based on a monocular camera provided in the embodiment of the present application performs smoke detection on the scene image in the target scene captured by the monocular camera by calling a pre-trained smoke detection model to obtain the smoke detection result in the scene image. When the smoke detection result indicates that there is smoke in the scene image, the fire point location information of the fire point in the scene image is obtained. After the camera optical axis of the monocular camera is controlled to align with the fire point based on the fire point location information, the longitude and latitude information of the fire point is calculated based on the deflection angle corresponding to the camera optical axis, the digital elevation information of the monocular camera and the projection position of the fire point in the world coordinate system. The embodiment of the present application first performs smoke detection on the scene image by using a smoke detection model, and identifies the fire point in the image by using a fire point recognition method, and locates the fire point based on the digital elevation information of the monocular camera and the deflection angle of the camera optical axis, so as to improve the accuracy and speed of fire point location. At the same time, the method of using a monocular camera to locate the fire point reduces the cost of fire point location.
[0203] Embodiment 2
[0204] Reference Figure 6 , shows a structural schematic diagram of a fire point positioning device based on a monocular camera provided in an embodiment of the present application, such as Figure 6 As shown, the fire point positioning device 600 based on a monocular camera may include the following modules:
[0205] The smoke detection result acquisition module 610 is used to call a pre-trained smoke detection model to perform smoke detection on the scene image in the target scene captured by the monocular camera to obtain the smoke detection result in the scene image;
[0206] A fire point location acquisition module 620, configured to acquire the fire point location information of the fire point in the scene image when the smoke detection result indicates that there is smoke in the scene image;
[0207] The fire point positioning module 630 is used to control the camera optical axis of the monocular camera to align with the fire point based on the fire point position information, and then calculate the longitude and latitude information of the fire point based on the deflection angle corresponding to the camera optical axis, the digital elevation information of the monocular camera and the projection position of the fire point in the world coordinate system.
[0208] Optionally, the smoke detection result includes: a smoke detection frame in the scene image,
[0209] The fire point location acquisition module includes:
[0210] A cropped image acquisition unit, configured to perform cropping processing on the scene image based on the smoke detection frame to obtain a cropped image containing only the smoke area;
[0211] A fire point position identification unit is used to identify the fire point position information of the fire point in the scene image based on the pixel point information in the cropped image.
[0212] Optionally, the cropped image acquisition unit includes:
[0213] The detection frame enlargement subunit is used to perform geometric enlargement processing on the smoke detection frame in the scene image to obtain a geometrically enlarged detection frame;
[0214] The cropped image acquisition subunit is used to crop the scene image based on the proportionally enlarged detection frame to obtain a cropped image containing only the smoke area.
[0215] Optionally, the fire point location identification unit includes:
[0216] A grayscale image acquisition subunit, used for performing grayscale processing on the cropped image to obtain a grayscale image corresponding to the cropped image;
[0217] A traversal result acquisition subunit is used to traverse the pixel values of all pixels in the grayscale image to obtain a traversal result;
[0218] A target pixel point determination subunit, used to determine the target pixel point that meets the fire point detection condition in the grayscale image according to the traversal result;
[0219] The fire point position determination subunit is used to determine the fire point position information of the fire point in the scene image according to the target pixel point.
[0220] Optionally, the fire point location determination subunit includes:
[0221] A fire point determination subunit, used to determine whether the fire point is a fire point with an occlusion phenomenon based on the target pixel point;
[0222] A first position acquisition subunit is used to obtain the position information of the fire point in the scene image according to the intersection of the edge lines of the target pixel point when the fire point is a fire point with an occlusion phenomenon;
[0223] The second position acquisition subunit is used to traverse the target pixel points based on the depth-first traversal algorithm when the fire point is a fire point without occlusion, so as to obtain the fire point position information in the scene image.
[0224] Optionally, the first position acquisition subunit includes:
[0225] An edge data acquisition subunit is used to extract edges of the grayscale image based on an edge detection algorithm to obtain regional edge data of the smoke area;
[0226] A ray acquisition subunit, used for removing edge data of a target pixel located at the bottom of the grayscale image in the area edge data, and extending the target pixel located at the left and right sides of the grayscale image in the area edge data to obtain two rays;
[0227] The third position acquisition subunit is used to acquire the intersection of the two rays, and use the intersection as the fire point, and use the position information of the intersection in the scene image as the fire point position information.
[0228] Optionally, the second position acquisition subunit includes:
[0229] A fire point graph construction subunit is used to use the target pixel points as nodes of the graph and connect the target pixel points at a preset distance threshold to construct a candidate fire point graph;
[0230] A node traversal subunit, used to traverse the nodes in the candidate fire point graph based on a depth-first traversal algorithm to obtain a traversal result;
[0231] The fourth position acquisition subunit is used to obtain the fire point in the scene image and the fire point position information of the fire point in the scene image according to the traversal result.
[0232] Optionally, the fire point locating module includes:
[0233] A deflection angle acquisition unit, used to acquire a vertical deflection angle and a horizontal deflection angle of the camera optical axis when the camera optical axis is aligned with the fire point;
[0234] A projection position acquisition unit, used for acquiring the projection position of the fire point in the world coordinate system;
[0235] A digital elevation calculation unit, configured to calculate digital elevation information of the monocular camera based on a pre-established digital elevation model of the target scene and the position information of the monocular camera;
[0236] A first longitude and latitude calculation unit, configured to calculate the longitude and latitude information of the projection position based on the digital elevation information, the horizontal deflection angle, and the vertical deflection angle;
[0237] The second longitude and latitude calculation unit is used to calculate the longitude and latitude information of the fire point according to the longitude and latitude information of the projection position and the digital elevation model.
[0238] Optionally, the smoke detection result acquisition module includes:
[0239] A preprocessed image acquisition unit, used to preprocess the scene image to obtain a preprocessed image;
[0240] A preprocessed image input unit, used to input the preprocessed image into the smoke detection model, wherein the smoke detection model includes: a feature extraction network, a pyramid feature network, a path aggregation network and a convolutional network;
[0241] A first feature map acquisition unit, configured to call the feature extraction network to perform feature extraction on the preprocessed image, and obtain feature maps of multiple scales corresponding to the preprocessed image;
[0242] A second feature map acquisition unit is used to call the pyramid feature network to perform upsampling and feature fusion processing on the feature maps of the multiple scales to obtain a fused feature map;
[0243] A third feature map acquisition unit is used to call the path aggregation network to perform downsampling and feature fusion processing on the fused feature map to obtain a fused target feature map;
[0244] The smoke detection result acquisition unit is used to call the convolutional network to perform feature extraction on the target feature map to obtain the smoke detection result in the scene image.
[0245] The fire point positioning device based on a monocular camera provided in the embodiment of the present application performs smoke detection on the scene image in the target scene captured by the monocular camera by calling a pre-trained smoke detection model to obtain the smoke detection result in the scene image. When the smoke detection result indicates that there is smoke phenomenon in the scene image, the fire point position information of the fire point in the scene image is obtained. After the camera optical axis of the monocular camera is controlled to align with the fire point based on the fire point position information, the longitude and latitude information of the fire point is calculated based on the deflection angle corresponding to the camera optical axis, the digital elevation information of the monocular camera and the projection position of the fire point in the world coordinate system. The embodiment of the present application first performs smoke detection on the scene image by using the smoke detection model, and identifies the fire point in the image by using the fire point recognition method, and locates the fire point based on the digital elevation information of the monocular camera and the deflection angle of the camera optical axis, so as to improve the accuracy and speed of fire point positioning. At the same time, the method of using a monocular camera to locate the fire point reduces the cost of fire point positioning.
[0246] Embodiment 3
[0247] An embodiment of the present application provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program implements the above-mentioned monocular camera-based fire point positioning method when executed by the processor.
[0248] Figure 7 FIG. 7 is a schematic diagram showing the structure of an electronic device 700 according to an embodiment of the present invention. Figure 7 As shown, the electronic device 700 includes a central processing unit (CPU) 701, which can perform various appropriate actions and processes according to computer program instructions stored in a read-only memory (ROM) 702 or computer program instructions loaded from a storage unit 708 into a random access memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the electronic device 700 can also be stored. The CPU 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.
[0249] Multiple components in the electronic device 700 are connected to the I / O interface 705, including: an input unit 706, such as a keyboard, a mouse, a microphone, etc.; an output unit 707, such as various types of displays, speakers, etc.; a storage unit 708, such as a disk, an optical disk, etc.; and a communication unit 709, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 709 allows the electronic device 700 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0250] The various processes and processing described above may be performed by the processing unit 701. For example, the method of any of the above embodiments may be implemented as a computer software program, which is tangibly contained in a computer-readable medium, such as the storage unit 708. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 700 via the ROM 702 and / or the communication unit 709. When the computer program is loaded into the RAM 703 and executed by the CPU 701, one or more actions in the method described above may be performed.
[0251] Embodiment 4
[0252] An embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-mentioned monocular camera-based fire point positioning method.
[0253] The above is a detailed introduction to a fire point positioning method based on a monocular camera, a fire point positioning device based on a monocular camera, an electronic device and a computer-readable storage medium provided by the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for general technical personnel in this field, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A fire point positioning method based on a monocular camera, characterized in that: The method comprises: Calling a pre-trained smoke detection model to perform smoke detection on a scene image in a target scene captured by the monocular camera to obtain a smoke detection result in the scene image; When the smoke detection result indicates that smoke exists in the scene image, obtaining the position information of the fire point in the scene image; After controlling the camera optical axis of the monocular camera to align with the fire point based on the fire point location information, the longitude and latitude information of the fire point is calculated based on the deflection angle corresponding to the camera optical axis, the digital elevation information of the monocular camera and the projection position of the fire point in the world coordinate system.
2. The method according to claim 1, characterized in that The smoke detection result includes: a smoke detection frame in the scene image, The obtaining the fire point location information of the fire point in the scene image includes: Performing cropping processing on the scene image based on the smoke detection frame to obtain a cropped image containing only the smoke area; Based on the pixel point information in the cropped image, the fire point position information of the fire point in the scene image is identified.
3. The method according to claim 2, characterized in that The step of performing cropping processing on the scene image based on the smoke detection frame to obtain a cropped image containing only the smoke area includes: Performing geometric magnification processing on the smoke detection frame in the scene image to obtain a geometrically magnified detection frame; The scene image is cropped based on the proportionally enlarged detection frame to obtain a cropped image containing only the smoke area.
4. The method according to claim 2, characterized in that: The step of identifying the fire point position information of the fire point in the scene image based on the pixel point information in the cropped image includes: Performing grayscale processing on the cropped image to obtain a grayscale image corresponding to the cropped image; Traversing pixel values of all pixels in the grayscale image to obtain a traversal result; According to the traversal result, determining the target pixel point in the grayscale image that meets the fire point detection condition; According to the target pixel point, the fire point position information in the scene image is determined.
5. The method according to claim 4, characterized in that The determining, according to the target pixel point, the fire point position information of the fire point in the scene image, comprises: Based on the target pixel point, determining whether the fire starting point is a fire starting point with an occlusion phenomenon; In the case where the ignition point is an ignition point with an occlusion phenomenon, obtaining the ignition point position information in the scene image according to the intersection of the edge lines of the target pixel point; In the case where the fire point is a fire point without occlusion, the target pixel points are traversed based on a depth-first traversal algorithm to obtain the fire point position information in the scene image.
6. The method according to claim 5, characterized in that The obtaining, according to the intersection of the edge lines of the target pixel points, the position information of the ignition point in the scene image, includes: Extracting edges of the grayscale image based on an edge detection algorithm to obtain regional edge data of the smoke area; Remove edge data of a target pixel located at the bottom of the grayscale image in the region edge data, and extend the target pixel located at the left and right sides of the grayscale image in the region edge data to obtain two rays; The intersection point of the two rays is obtained, and the intersection point is used as the fire starting point, and the position information of the intersection point in the scene image is used as the fire starting point position information.
7. The method according to claim 5, characterized in that The traversing the target pixel points based on the depth-first traversal algorithm to obtain the position information of the fire point in the scene image includes: The target pixel points are used as nodes of a graph, and the target pixel points are connected at a preset distance threshold to construct a candidate ignition point graph; Traversing the nodes in the candidate fire point graph based on a depth-first traversal algorithm to obtain a traversal result; According to the traversal result, the fire point in the scene image and the fire point position information of the fire point in the scene image are obtained.
8. The method according to claim 1, characterized in that The method of calculating the longitude and latitude information of the fire point based on the deflection angle corresponding to the camera optical axis, the digital elevation information of the monocular camera and the projection position of the fire point in the world coordinate system includes: Obtaining a vertical deflection angle and a horizontal deflection angle of the camera optical axis when the camera optical axis is aligned with the fire point; Obtaining the projection position of the fire point in the world coordinate system; Based on the pre-established digital elevation model of the target scene and the position information of the monocular camera, the digital elevation information of the monocular camera is calculated; Based on the digital elevation information, the horizontal deflection angle and the vertical deflection angle, the longitude and latitude information of the projection position is calculated; The longitude and latitude information of the fire point is calculated based on the longitude and latitude information of the projection position and the digital elevation model.
9. The method according to claim 1, characterized in that: The calling of the pre-trained smoke detection model to perform smoke detection on the scene image in the target scene captured by the monocular camera to obtain the smoke detection result in the scene image includes: Preprocessing the scene image to obtain a preprocessed image; Inputting the preprocessed image into the smoke detection model, the smoke detection model comprising: a feature extraction network, a pyramid feature network, a path aggregation network and a convolutional network; Calling the feature extraction network to perform feature extraction on the preprocessed image to obtain feature maps of multiple scales corresponding to the preprocessed image; Calling the pyramid feature network to perform upsampling and feature fusion processing on the feature maps of the multiple scales to obtain a fused feature map; Calling the path aggregation network to perform downsampling and feature fusion processing on the fused feature map to obtain a fused target feature map; The convolutional network is called to perform feature extraction on the target feature map to obtain a smoke detection result in the scene image.
10. A fire point positioning device based on a monocular camera, characterized in that: The device comprises: A smoke detection result acquisition module is used to call a pre-trained smoke detection model to perform smoke detection on a scene image in a target scene captured by the monocular camera, and obtain a smoke detection result in the scene image; A fire point location acquisition module, used for acquiring the fire point location information of the fire point in the scene image when the smoke detection result indicates that there is smoke phenomenon in the scene image; The fire point positioning module is used to control the camera optical axis of the monocular camera to align with the fire point based on the fire point position information, and then calculate the longitude and latitude information of the fire point based on the deflection angle corresponding to the camera optical axis, the digital elevation information of the monocular camera and the projection position of the fire point in the world coordinate system.
11. An electronic device, characterized in that: include: A processor, a memory, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the fire point positioning method based on a monocular camera as described in any one of claims 1 to 9 is implemented.
12. A computer-readable storage medium, characterized in that: When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the fire point positioning method based on a monocular camera as described in any one of claims 1 to 9.
Citation Information
Cited By
Forest fire rapid positioning method
CN119991803A
