A method and device for positioning fire latitude and longitude coordinates

Through machine learning algorithms and image processing technology, a conversion model between PTZ azimuth angle and geographical azimuth angle is established, and combined with multiple detection models, it solves the problem of inaccurate and inefficient fire positioning, and achieves efficient and accurate fire longitude and latitude coordinates. positioning, adapting to complex environments and reducing hardware costs.

CN118274795BActive Publication Date: 2024-08-27HANGZHOUSR ELECTRONICS
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202410378924.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-03-29
Publication Date
2024-08-27
Estimated Expiration
2044-03-29

AI Technical Summary

Technical Problem

Existing fire positioning technology suffers from inaccurate positioning and low efficiency. It is affected by magnetic field interference and human factors, lacks efficient and objective positioning methods, and relies on high-precision hardware compass measurement costs and insufficient anti-interference capabilities.

Method used

A machine learning algorithm is used to create a conversion model between PTZ azimuth angle and geographical azimuth angle. Image processing and depth estimation technology are combined to identify the fire location through PTZ monitoring equipment, calculate the longitude and latitude coordinates, and use multiple detection models to fuse and identify Fire conditions, providing accurate navigation information.

Benefits of technology

It improves the accuracy and robustness of fire positioning, adapts to different environments and scenarios, reduces the impact of magnetic field interference, reduces the cost of high-precision hardware compasses, and provides efficient and accurate fire longitude and latitude coordinate positioning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118274795B
    Figure CN118274795B
Patent Text Reader

Abstract

The present invention belongs to the technical field of monitoring and positioning, and discloses a method and device for positioning the latitude and longitude coordinates of a fire; obtaining a known coordinate position; collecting a known geographical location according to the known coordinate position and recording n pan-tilt azimuths corresponding to a pan-tilt monitoring device; creating a conversion model using a machine learning algorithm based on the n coordinate data and the corresponding pan-tilt azimuths; identifying the target fire location, recording the pan-tilt azimuth and pitch angle data of the pan-tilt monitoring device; converting the pan-tilt azimuth into the geographical azimuth of the target fire location through the conversion model; obtaining distance data; and calculating the latitude and longitude coordinates of the target fire location according to the geographical azimuth, pitch angle data, distance data and the known coordinate position of the pan-tilt monitoring device, which provides key data support for positioning the latitude and longitude coordinates and can efficiently and accurately locate the latitude and longitude coordinates of the fire location.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of monitoring and positioning technology, and more specifically, to a method and device for positioning the latitude and longitude coordinates of a fire situation. Background Art

[0002] The patent application with application publication number CN112330917A discloses a method, device and system for locating a fire point, wherein an infrared image of the area monitored by a thermal imaging camera is obtained, and first longitude and latitude information of the location of the thermal imaging camera is obtained; coordinate information of the fire point in the infrared image is obtained; and second longitude and latitude information of the fire point is determined based on the first longitude and latitude information and the coordinate information, thereby solving the problem that image intelligent recognition cannot accurately detect fire points and locate fire points, and improving the timeliness and accuracy of fire point identification.

[0003] Traditional fire location methods usually rely on manual video monitoring and judgment, and have problems such as inaccurate positioning and low efficiency. Due to factors such as magnetic field interference in the surrounding environment and the influence of other electronic equipment, the accuracy and scope of application of directly using the azimuth obtained by the pan-tilt monitoring equipment for positioning are subject to certain restrictions. The existing technology lacks methods for training conversion models using advanced machine learning algorithms, resulting in insufficient accuracy and generalization capabilities of existing models, making it difficult to adapt to complex and changeable actual environments and scenarios. Traditional fire location methods often rely on subjective experience such as comparing surveillance videos and referring to surrounding road conditions, which is inefficient and may be affected by human subjective factors. It lacks efficient and objective positioning methods and relies on high-precision hardware compasses to measure azimuths, which is not only costly, but also affected by factors such as magnetic field interference, and its accuracy and anti-interference capabilities need to be improved.

[0004] In view of this, the present invention proposes a method and device for positioning the latitude and longitude coordinates of a fire situation to solve the above-mentioned problem. Summary of the invention

[0005] In order to overcome the above-mentioned defects of the prior art and to achieve the above-mentioned purpose, the present invention provides the following technical solutions: A method for positioning the latitude and longitude coordinates of a fire situation, comprising: S1, obtaining the known coordinate position of a pan-tilt monitoring device; collecting coordinate data of n known geographical locations according to the known coordinate position; and recording n pan-tilt azimuth angles corresponding to the pan-tilt monitoring device; n is an integer greater than or equal to 3;

[0006] S2, based on the n coordinate data and the corresponding PTZ azimuth angle, using a machine learning algorithm to create a conversion model between the PTZ azimuth angle and the geographic azimuth angle;

[0007] S3, identifying the target fire location through the pan-tilt monitoring device, recording the pan-tilt azimuth and pitch angle data of the pan-tilt monitoring device; converting the pan-tilt azimuth into the geographical azimuth of the target fire location through the conversion model;

[0008] S4, obtaining the distance data between the PTZ monitoring device and the target fire location; calculating the latitude and longitude coordinates of the target fire location based on the geographic azimuth, pitch angle data, distance data of the target fire location and the known coordinate position of the PTZ monitoring device;

[0009] S5. Send the latitude and longitude coordinates of the target fire location and warning information to the fire alarm terminal.

[0010] Furthermore, the method of obtaining the known coordinate position of the pan-tilt monitoring device is to use a high-precision GPS to obtain the precise longitude and latitude coordinates of the location of the pan-tilt monitoring device, and use them as the known coordinate position of the pan-tilt monitoring device;

[0011] The method of selecting the n known geographical locations includes:

[0012] The n known geographical locations are evenly distributed within the full field of view of the PTZ monitoring device, and the full field of view includes an azimuth range and a distance range; the azimuth range includes the front and the left and right sides; the distance range includes the distant view and the near view; the azimuth range and the distance range are cross-defined to define the full field of view.

[0013] Furthermore, the definition of the distant view and the near view includes:

[0014] The original monitoring picture obtained by the PTZ monitoring device is subjected to image denoising and enhancement preprocessing to obtain a pre-image;

[0015] The pre-trained SegNet deep network model is used to perform pixel-level semantic segmentation on the pre-image; the segmentation result is obtained; the segmentation result is to classify the pixels in the pre-image into the preset semantic categories;

[0016] Use binocular vision perception method to perform depth estimation on the segmentation result to obtain the depth information of the image, i.e. the depth estimation result;

[0017] For each semantic category i, a close-view depth threshold D is set near (i) and the distance depth threshold D far (i); if the depth distance Z(i) of semantic category i is less than or equal to D near (i), the semantic category is classified as the near-view area;

[0018] If the depth distance Z(i) of semantic category i is greater than D far (i) The semantic category is classified as a distant view area; the distant view depth threshold Dnear (i) and the near-field depth threshold D far (i)

[0019] Based on the image processing algorithm of edge detection and region growing, the boundaries of the distant view area and the near view area are extracted; and the distant view area image and the near view area image are obtained;

[0020] The environment range to which the distant view area image belongs is the distant view, and the environment range to which the near view area image belongs is the near view;

[0021] The method of obtaining the distant view area image and the near view area image comprises:

[0022] The pixel points divided into edge points are subjected to boundary tracing to obtain a pixel chain code sequence of each connected area; the pixel chain code sequence is used to describe each boundary contour; the algorithm for implementing boundary tracing includes neighboring point row scanning, center row scanning, sequential boundary tracing, etc., which will not be described in detail here;

[0023] Taking a specific starting point as a seed inside the boundary contour, the adjacent pixels are continuously merged according to the preset growth conditions to perform region growth, thereby obtaining a distant view connected region and a near view connected region;

[0024] The formula for region growing is:

[0025] R k+1 =R k ∪{p|(p∈Nb(R k ))&&(p∈Q')}; where R k+1 represents the new growth area after the k+1th iteration; R k is the growth area at the kth iteration; ∪ is the union operator of the set; p is the pixel point; Nb(R k ) represents the growth region R k The neighborhood set of ; && represents the logical AND operator; Q' represents the set of growth conditions;

[0026] The growth condition Q' is defined as the set of grayscale similarity and regional smoothness;

[0027] but Among them, I(p) is the gray value of pixel p, M(R k ) is R k The mean grayscale of , T is the grayscale threshold; is the gradient magnitude of pixel p, is the gradient threshold;

[0028] Merge the obtained distant view connected area and near view connected area into the final distant view and near view area map; merge adjacent areas; obtain the complete boundary vector contour lines of the distant view and near view areas; that is, obtain the distant view area image and the near view area image;

[0029] Furthermore, the calculation formula for the depth estimation is: Where Z(i) is the depth distance from the semantic category i to be estimated to the PTZ monitoring device; A is the period of the coded stripes projected into the environment; n i is the number of fringes observed on the imaging plane for semantic category i; f is the equivalent focal length of the PTZ monitoring device; a i is the angle of the stripe beam projected by semantic category i;

[0030] The method of edge extraction includes obtaining the gradient amplitude of the pixel point; dividing the pixel point into edge and non-edge according to the gradient amplitude;

[0031] The calculation formula for obtaining the gradient amplitude is:

[0032]

[0033] Where G(j) represents the magnitude of the image gradient at pixel j; a0, a1, ..., a8 represent the pixel values ​​in a 3x3 neighborhood, and the central pixel is a4; c is a constant;

[0034] The method of dividing the edge and the non-edge includes:

[0035] Set the upper edge threshold Tl and the lower edge threshold Tu; if the gradient amplitude of a pixel point is less than or equal to the upper edge threshold Tl, the corresponding pixel point is a non-edge point; if the gradient amplitude of a pixel point is greater than or equal to the lower edge threshold Tu, the corresponding pixel point is an edge point.

[0036] Furthermore, the coordinate data are longitude and latitude coordinates; the coordinate data of the n known geographical locations are collected by measuring and recording the longitude and latitude coordinates of the n locations using surveying instruments or satellite remote sensing measurement methods;

[0037] The method for obtaining the azimuth angle of the pan / tilt platform includes:

[0038] Through manual control or preset programs, the pan-tilt monitoring device is directed to the n known geographical locations respectively, and the pan-tilt azimuth angle of the pan-tilt monitoring device corresponding to each known geographical location is recorded at the same time.

[0039] Furthermore, the conversion model is created by:

[0040] Preprocessing the collected n coordinate data and the corresponding PTZ azimuth angles to form training data; the preprocessing includes data cleaning, data formatting and standardization;

[0041] Define the basic framework of the conversion model, which includes the expected compass deviation value calculation layer, the point estimation fitting layer and the azimuth fitting layer;

[0042] Input the training data into the expected compass deviation value calculation layer to calculate the deviation values ​​of n coordinate data;

[0043] The calculation formula for calculating the deviation value is:

[0044] Wherein, g is the expected deviation value between the PTZ azimuth angle Y and the geographic azimuth angle; Jx is the longitude coordinate of the known geographic location; Jc is the latitude coordinate of the known geographic location; Wx is the longitude coordinate of the known coordinate position of the PTZ monitoring device; Wc is the latitude coordinate of the known coordinate position of the PTZ monitoring device;

[0045] The point estimation fitting layer removes outliers from the expected deviation values ​​of the n coordinate data to obtain an accurate deviation value set; calculates the mean μ and standard deviation σ of the expected deviation value g in the accurate deviation value set;

[0046] Set the deviation value threshold T1 to eliminate the expected deviation values ​​whose |g-μ is greater than T1·σ; take the average of the remaining expected deviation values ​​to obtain the final fitted compass deviation value;

[0047] The azimuth fitting layer calculates the geographical azimuth of the known geographical location according to the compass deviation value and the PTZ azimuth of the PTZ monitoring device;

[0048] The calculation formula of the fitting calculation is: C=y'+g'; wherein C is the geographical azimuth of the known geographical location; y' is the azimuth of the PTZ monitoring device; g' is the compass deviation value; that is, the calculation formula of the fitting calculation obtained is the conversion model.

[0049] Furthermore, the method for identifying the target fire location includes:

[0050] The PTZ monitoring device integrates a smoke detection model based on RGB images, a high temperature anomaly detection model based on thermal infrared images, and a combustion product detection model based on gas concentration; the integrated model outputs are weighted fused;

[0051] The recording method of the azimuth and pitch angle data of the PTZ monitoring device includes:

[0052] A position encoder is integrated in the PTZ monitoring device to obtain the PTZ azimuth angle; a gyroscope is integrated in the PTZ monitoring device to measure the pitch angle data; the position encoder and the gyroscope are discretely sampled at a fixed sampling frequency to obtain a sample value each time; N consecutive sample values ​​are constructed into an original data sequence;

[0053] Performing error preprocessing on the original data sequence; the error preprocessing includes median filtering and mean operation;

[0054] The median filtering process includes:

[0055] Set a fixed sliding window, slide the sliding window on the original data, extract the median of the data in the sliding window as output, and obtain the data sequence after median filtering;

[0056] The extracted formula is:

[0057] y'(u)=med[x(uv),x(u-v+1),...,x(u+v)]; where y(u) is the output sequence; u is the index of the sequence; x(uv) is the value of the sequence v sampling periods ahead of x(u); 2v+1 is the width of the sliding window; med[] is the median operation;

[0058] The mean operation is to average all the sample values ​​in the data sequence obtained after the median filtering; as real-time PTZ azimuth and pitch angle data;

[0059] Substitute the obtained real-time PTZ azimuth y" into the conversion model to obtain the geographic azimuth C' of the target fire location.

[0060] Furthermore, the method of obtaining the distance data between the PTZ monitoring device and the target fire location includes:

[0061] The original monitoring images collected by the PTZ monitoring device are constructed into a monitoring image sequence in the order of time frames, and the monitoring image sequence is input into the pre-trained depth estimation model frame by frame; the depth estimation model performs pixel-level depth estimation on each frame of the image and outputs a depth map of each frame of the image;

[0062] Locate the pixel area where the target fire occurs in the depth map; count the depth values ​​of all pixels in the pixel area and average them to obtain the average depth distance d';

[0063] The actual size S” of the pixel area on the imaging plane based on the focal length of the PTZ monitoring device and the target fire location known to the PTZ monitoring device;

[0064] You can get the distance data from the target fire location to the PTZ monitoring equipment Wherein, F' is the focal length of the PTZ monitoring device.

[0065] Furthermore, the training method of the depth estimation model includes:

[0066] Collect U sets of RGB image pair datasets with depth ground truth; split the RGB image pair dataset into training set and validation set;

[0067] Use the convolutional neural network model architecture as the basic framework of the depth estimation model; initialize the network weights of the depth estimation model; input the RGB image in the training set, and the label is the corresponding depth ground truth; define the loss function of the depth estimation model as the depth gradient loss function; select the Adam optimizer and initially set the hyperparameters; divide the training set into batches; iteratively train the depth estimation model in batches,

[0068] Depth Gradient Loss Function Where N' represents the total number of pixels in the input image; H' represents the depth map predicted by the model; H" represents the depth ground truth map; and Represent the gradients of the predicted depth map in the horizontal and vertical directions respectively; and Represent the gradients of the true depth map in the horizontal and vertical directions respectively;

[0069] Each time a batch is input to the depth estimation model, the function value of the depth gradient loss function is recorded. If the function value does not decrease in L consecutive iterations, the depth estimation model of the last round is saved; the current depth estimation model is evaluated using the validation set, and the parameters of the depth estimation model with the best performance are saved;

[0070] The calculation method of the latitude and longitude coordinates of the target fire location includes:

[0071] Obtain the precise value of the earth's radius R"; input the geographic azimuth, elevation angle data, distance data, precise value of the earth's radius, and known coordinates of the PTZ monitoring device at the target fire location into the coordinate calculation function to obtain the longitude and latitude coordinates of the target fire location;

[0072] The coordinate calculation function is: Where P' is the pitch angle data; Wx' is the longitude coordinate of the target fire location; Jx' is the latitude coordinate of the target fire location.

[0073] A fire situation latitude and longitude coordinate positioning device, which is used to implement a fire situation latitude and longitude coordinate positioning method, comprises: a pan / tilt base, a portable handle, a transmission cabin, a thermal imaging camera, a laser ranging system, a visible light camera, an optical cabin, and a wiper.

[0074] The technical effects and advantages of the fire situation latitude and longitude coordinate positioning method and device of the present invention are as follows:

[0075] By establishing a conversion model between the PTZ azimuth and the geographic azimuth, the azimuth data obtained by the PTZ monitoring device can be effectively converted into the geographic azimuth, expanding the applicable scope of positioning; the conversion model is trained using a machine learning algorithm to improve the accuracy and generalization ability of the model, and can adapt to different environments and scenarios; a variety of detection models are integrated to identify fire conditions, which improves the robustness of fire identification and can adapt to different types of fire conditions; combined with image processing and depth estimation technology, the distance between the PTZ monitoring device and the fire location is accurately calculated, providing key data support for locating the longitude and latitude coordinates, and can efficiently and accurately locate the longitude and latitude coordinates of the fire, without being interfered by the surrounding magnetic field and other equipment, providing firefighters with accurate navigation basis, without the need to compare the fire monitoring video and the surrounding road conditions experience, and directly navigate to the fire location. At the same time, a mathematical model is used instead of a high-precision hardware compass to increase the accuracy and anti-interference of the compass measurement while eliminating the cost of a high-precision hard disk compass. BRIEF DESCRIPTION OF THE DRAWINGS

[0076] Figure 1 A schematic diagram of a method for positioning fire latitude and longitude coordinates according to the present invention;

[0077] Figure 2 It is a schematic diagram of a fire situation latitude and longitude coordinate positioning device of the present invention;

[0078] Figure 3 It is a schematic diagram of an electronic device of the present invention. DETAILED DESCRIPTION

[0079] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0080] Example 1

[0081] See also Figure 1 As shown, the method for positioning the latitude and longitude coordinates of a fire situation described in this embodiment includes:

[0082] S1. Obtain the known coordinate position of the PTZ monitoring device; collect coordinate data of n known geographical locations according to the known coordinate position; and record n ​​PTZ azimuths corresponding to the PTZ monitoring device; n is an integer greater than or equal to 3;

[0083] S2, based on the n coordinate data and the corresponding PTZ azimuth angle, using a machine learning algorithm to create a conversion model between the PTZ azimuth angle and the geographic azimuth angle;

[0084] S3, identifying the target fire location through the pan-tilt monitoring device, recording the pan-tilt azimuth and pitch angle data of the pan-tilt monitoring device; converting the pan-tilt azimuth into the geographical azimuth of the target fire location through the conversion model;

[0085] S4, obtaining the distance data between the PTZ monitoring device and the target fire location; calculating the latitude and longitude coordinates of the target fire location based on the geographic azimuth, pitch angle data, distance data of the target fire location and the known coordinate position of the PTZ monitoring device;

[0086] S5. Send the latitude and longitude coordinates of the target fire location and warning information to the fire alarm terminal for relevant departments to confirm and dispatch the alarm.

[0087] Furthermore, the method of obtaining the known coordinate position of the pan-tilt monitoring device is to use a high-precision GPS or other location service to obtain the precise longitude and latitude coordinates of the location of the pan-tilt monitoring device, and use them as the known coordinate position of the pan-tilt monitoring device;

[0088] The method of selecting the n known geographical locations includes:

[0089] The n known geographical locations are evenly distributed within the full field of view of the PTZ monitoring device, where the full field of view includes an azimuth range and a distance range; the azimuth range includes the front and the left and right sides; the distance range includes the distant view and the near view;

[0090] The full field of view is defined by crossing the azimuth range and the distance range; for example, the front and the distant view, the left and the near view, etc.

[0091] It should be noted that the distances of the n known geographical locations from the PTZ monitoring equipment vary in a certain gradient, that is, they cannot all be concentrated at a very close or very far distance; close distance locations can provide more accurate data, while long distance locations can expand the scope of application of the model; reasonable setting of distance distribution helps to improve the generalization ability of the model.

[0092] The definition of the distant view and the near view includes:

[0093] The original monitoring images acquired by the PTZ monitoring device are pre-processed by image denoising and enhancement to improve the quality of subsequent processing; a pre-image is obtained;

[0094] Use the pre-trained SegNet deep network model to perform pixel-level semantic segmentation on the pre-image; obtain the segmentation result; the segmentation result is to classify the pixels in the pre-image into preset semantic categories, such as buildings, roads, vegetation, etc.;

[0095] Use binocular vision perception method to perform depth estimation on the segmentation result to obtain the depth information of the image, i.e. the depth estimation result;

[0096] The calculation formula for the depth estimation is: Where Z(i) is the depth distance from the semantic category i to be estimated to the PTZ monitoring device; A is the period of the coded stripes projected into the environment (in meters); n i is the number of fringes observed on the imaging plane for semantic category i (unitless, an integer value); f is the equivalent focal length of the PTZ monitoring device (in pixels); a i is the angle of the stripe beam projected by semantic category i;

[0097] According to the results of semantic segmentation and depth estimation, the picture is divided into two parts: distant view and near view. Specifically, for each semantic category i, a near view depth threshold D is set. near (i) and the distance depth threshold D far (i);

[0098] If the depth distance Z(i) of semantic category i is less than or equal to D near (i), the semantic category is classified as the near-view area;

[0099] If the depth distance Z(i) of semantic category i is greater than D far (i) The semantic category is classified as a distant view area; the distant view depth threshold D near (i) and the near-field depth threshold D far (i)

[0100] Based on the image processing algorithm of edge detection and region growing, the boundaries of the distant view area and the near view area are extracted; and the distant view area image and the near view area image are obtained;

[0101] The method of edge extraction includes obtaining the gradient amplitude of the pixel point; dividing the pixel point into edge and non-edge according to the gradient amplitude;

[0102] The calculation formula for obtaining the gradient amplitude is:

[0103]

[0104] Where G(j) represents the magnitude of the image gradient at pixel j; a0, a1, ..., a8 represent the pixel values ​​in a 3x3 neighborhood, and the center pixel is a4; c is a constant, usually 2;

[0105] Specifically, the approximate value of the gradient in the x direction is calculated by subtracting the left pixel value from the right pixel value; the approximate value of the gradient in the y direction is calculated by subtracting the lower pixel value and the upper pixel value; and finally the gradient amplitude is obtained by taking the square root of the sum of the squares.

[0106] The method of dividing the edge and the non-edge includes:

[0107] Set the upper edge threshold Tl and the lower edge threshold Tu; if the gradient amplitude of a pixel point is less than or equal to the upper edge threshold Tl, the corresponding pixel point is a non-edge point; if the gradient amplitude of a pixel point is greater than or equal to the lower edge threshold Tu, the corresponding pixel point is an edge point;

[0108] The method of obtaining the distant view area image and the near view area image comprises:

[0109] The pixel points divided into edge points are subjected to boundary tracing to obtain a pixel chain code sequence of each connected area; the pixel chain code sequence is used to describe each boundary contour; the algorithm for implementing boundary tracing includes neighboring point row scanning, center row scanning, sequential boundary tracing, etc., which will not be described in detail here;

[0110] Taking a specific starting point as a seed inside the boundary contour, the adjacent pixels are continuously merged according to the preset growth conditions to perform region growth, thereby obtaining a distant view connected region and a near view connected region;

[0111] The formula for region growing is:

[0112] R k+1 =R k ∪{p|(p∈Nb(R k ))&&(p∈Q')}; where R k+1 represents the new growth area after the k+1th iteration; R k is the growth area at the kth iteration; ∪ is the union operator of the set; p is the pixel point; Nb(R k ) represents the growth region R k The neighborhood set, usually referred to as R k The 4-neighborhood pixels or 8-neighborhood pixels of each pixel in; && represents the logical AND operator; Q' represents the set of growth conditions, which defines the conditions for whether a pixel can be incorporated into the growth area;

[0113] The growth condition Q' is defined as the set of grayscale similarity and regional smoothness;

[0114] but Among them, I(p) is the gray value of pixel p, M(R k ) is R kThe mean grayscale of , T is the grayscale threshold; is the gradient magnitude of pixel p, is the gradient threshold;

[0115] Merge the obtained distant view connected area and near view connected area into the final distant view and near view area map; merge adjacent areas; obtain the complete boundary vector contour lines of the distant view and near view areas; that is, obtain the distant view area image and the near view area image;

[0116] The environment range to which the distant view area image belongs is the distant view, and the environment range to which the near view area image belongs is the near view;

[0117] The coordinate data are longitude and latitude coordinates; the coordinate data of the n known geographical locations are collected by using surveying instruments or satellite remote sensing measurement methods, such as handheld GPS, total station, etc., to measure and record the longitude and latitude coordinates of the n locations;

[0118] The method for obtaining the azimuth angle of the pan / tilt platform includes:

[0119] Through manual control or preset programs, the PTZ monitoring device is directed to the n known geographical locations respectively, and the azimuth data of the PTZ monitoring device corresponding to each known geographical location is recorded at the same time.

[0120] Furthermore, the conversion model is created by:

[0121] Preprocessing the collected n coordinate data and the corresponding PTZ azimuth angles to form training data; the preprocessing includes data cleaning, data formatting and standardization;

[0122] Define the basic framework of the conversion model, which includes the expected compass deviation value calculation layer, the point estimation fitting layer and the azimuth fitting layer;

[0123] Input the training data into the expected compass deviation value calculation layer to calculate the deviation values ​​of n coordinate data;

[0124] The calculation formula for calculating the deviation value is:

[0125] Wherein, g is the expected deviation value between the PTZ azimuth angle Y and the geographic azimuth angle; Jx is the longitude coordinate of the known geographic location; Jc is the latitude coordinate of the known geographic location; Wx is the longitude coordinate of the known coordinate position of the PTZ monitoring device; Wc is the latitude coordinate of the known coordinate position of the PTZ monitoring device;

[0126] The point estimation fitting layer removes outliers from the expected deviation values ​​of the n coordinate data to obtain an accurate deviation value set; calculates the mean μ and standard deviation σ of the expected deviation value g in the accurate deviation value set;

[0127] Set the deviation value threshold T1 to eliminate the expected deviation values ​​whose |g-μ is greater than T1·σ; take the average of the remaining expected deviation values ​​to obtain the final fitted compass deviation value;

[0128] The azimuth fitting layer calculates the geographical azimuth of the known geographical location according to the compass deviation value and the PTZ azimuth of the PTZ monitoring device;

[0129] The calculation formula of the fitting calculation is: C=y'+g'; wherein C is the geographic azimuth of the known geographic location; y' is the pan-tilt azimuth of the pan-tilt monitoring device; the pan-tilt azimuth represents the horizontal rotation angle of the pan-tilt monitoring device relative to the north direction; g' is the compass deviation value; that is, the calculation formula of the fitting calculation obtained is the conversion model.

[0130] Furthermore, the method for identifying the target fire location includes:

[0131] The PTZ monitoring device integrates a smoke detection model based on RGB images, a high temperature anomaly detection model based on thermal infrared images, and a combustion product detection model based on gas concentration. The integrated model outputs are weighted and fused, and the weights of each model output are adaptively adjusted to adapt to different environments and fire conditions.

[0132] The smoke detection model uses a deep convolutional neural network as a feature classifier, and the network structure of the smoke detection model uses the classic model structure of VGG or ResNet; the high-temperature anomaly detection model adopts a semantic segmentation model based on FCN; FCN is used to perform pixel-level semantic segmentation on thermal imaging images, and the output divides the thermal imaging images into two categories: high-temperature area and background; the structure of the combustion product detection model can adopt a feedforward neural network, which is suitable for simple function fitting of gas concentration data.

[0133] The recording method of the azimuth angle and pitch angle data of the PTZ monitoring device includes:

[0134] A position encoder is integrated in the PTZ monitoring device to obtain the horizontal rotation angle of the PTZ monitoring device relative to the true north direction, that is, the PTZ azimuth angle; a gyroscope is integrated in the PTZ monitoring device to measure the pitch angle of the PTZ relative to the horizontal plane of the earth; the position encoder and the gyroscope are discretely sampled at a fixed sampling frequency to obtain a sampling value each time; and N consecutive sampling values ​​are constructed into a raw data sequence of finite length;

[0135] The raw data collected by the position encoder and the gyroscope are subjected to error preprocessing; the error preprocessing includes median filtering and averaging operation to eliminate high-frequency noise and drift errors;

[0136] The median filtering process includes:

[0137] Set a fixed sliding window, slide the sliding window on the original data, extract the median of the data in the sliding window as output, and obtain the data sequence after median filtering;

[0138] The extracted formula is:

[0139] y'(u)=med[x(uv),x(u-v+1),...,x(u+v)]; where y(u) is the output sequence; u is the index of the sequence; x(uv) is the value of the sequence v sampling periods ahead of x(u); 2v+1 is the width of the sliding window; med[] is the median operation;

[0140] The mean operation is to average all the sample values ​​in the data sequence obtained after the median filtering; and record the real-time azimuth and pitch angle data of the pan / tilt platform;

[0141] Substitute the obtained real-time PTZ azimuth y" into the conversion model to obtain the geographic azimuth C' of the target fire location.

[0142] Furthermore, the method of obtaining the distance data between the PTZ monitoring device and the target fire location includes:

[0143] This is achieved through the laser ranging system 5. Specifically, the monitoring image sequence collected by the PTZ monitoring device is input frame by frame into a pre-trained depth estimation model, such as a CNN-based depth estimation network; the depth estimation model performs pixel-level depth estimation on each frame of the image and outputs a depth map of each frame of the image; each pixel value in the depth map corresponds to the distance of the pixel from the camera in the real three-dimensional space;

[0144] Locate the pixel area where the target fire occurs in the depth map; count the depth values ​​of all pixels in the pixel area and average them to obtain the average depth distance d';

[0145] The actual size S” of the pixel area on the imaging plane based on the focal length of the PTZ monitoring device and the target fire location known to the PTZ monitoring device;

[0146] According to the principle of triangulation, the distance data from the target fire location to the PTZ monitoring equipment can be obtained. Wherein, F' is the focal length of the PTZ monitoring device.

[0147] The training method of the depth estimation model includes:

[0148] Collect U sets of RGB image pair datasets with depth ground truth values; these data can be collected from depth sensors such as depth cameras and lidars, or manually constructed through structured light projection, stereo matching, etc.; split the RGB image pair dataset into a training set and a validation set;

[0149] The model architecture of the convolutional neural network (CNN) is used as the basic framework of the depth estimation model; the network weights of the depth estimation model are initialized; the RGB images in the training set are input, and the labels are the corresponding depth ground truth values; the loss function of the depth estimation model is defined as the depth gradient loss function; the Adam optimizer is selected and the hyperparameters are initially set; the training set is divided into batches; the depth estimation model is iteratively trained in batches,

[0150] Depth Gradient Loss Function Where N' represents the total number of pixels in the input image; H' represents the depth map predicted by the model; H" represents the depth ground truth map; and Represent the gradients of the predicted depth map in the horizontal and vertical directions respectively; and Represent the gradients of the true depth map in the horizontal and vertical directions respectively;

[0151] Each time a batch is input to the depth estimation model, the function value of the depth gradient loss function is recorded. If the function value does not decrease in L consecutive iterations, the depth estimation model of the last round is saved; the current depth estimation model is evaluated using the validation set, and the parameters of the depth estimation model with the best performance are saved;

[0152] Ways to evaluate the performance of depth estimation models include calculating absolute relative error, squared relative error, or depth accuracy achieved.

[0153] Furthermore, the calculation method of the latitude and longitude coordinates of the target fire location includes:

[0154] Obtain the precise value of the earth's radius R"; input the geographic azimuth, elevation angle data, distance data, precise value of the earth's radius, and known coordinates of the PTZ monitoring device at the target fire location into the coordinate calculation function to obtain the longitude and latitude coordinates of the target fire location;

[0155] The coordinate calculation function is: Where P' is the pitch angle data; Wx' is the longitude coordinate of the target fire location; Jx' is the latitude coordinate of the target fire location.

[0156] In this embodiment, by establishing a conversion model between the pan-tilt azimuth and the geographic azimuth, the azimuth data obtained by the pan-tilt monitoring device can be effectively converted into the geographic azimuth, thereby expanding the applicable scope of positioning; the conversion model is trained using a machine learning algorithm, thereby improving the accuracy and generalization ability of the model, and being able to adapt to different environments and scenarios; a variety of detection models are integrated to identify fire conditions, thereby improving the robustness of fire identification, and being able to adapt to different types of fire conditions; by combining image processing and depth estimation technology, the distance between the pan-tilt monitoring device and the fire location is accurately calculated, providing key data support for locating the longitude and latitude coordinates, and being able to efficiently and accurately locate the longitude and latitude coordinates of the fire, without being interfered by the surrounding magnetic field and other equipment, providing firefighters with accurate navigation basis, without the need to compare the fire monitoring video and the surrounding road conditions experience, and directly navigating to the fire location, and at the same time using a mathematical model instead of a high-precision hardware compass, while increasing the accuracy and anti-interference of the compass measurement, eliminating the cost of a high-precision hard disk compass.

[0157] Example 2

[0158] See also Figure 2 As shown, for the parts not described in detail in this embodiment, please refer to the description of embodiment 1. A fire situation latitude and longitude coordinate positioning device is provided, including: a pan-tilt base (1), a portable handle (2), a transmission cabin (3), a thermal imaging camera (4), a laser ranging system (5), a visible light camera (6), an optical cabin (7), and a wiper (8); each component is connected by wire and / or wireless means to achieve data transmission between modules.

[0159] Example 3

[0160] See also Figure 3 As shown, this embodiment discloses an electronic device, including 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 operation mode of the above-mentioned method for locating the latitude and longitude coordinates of a fire situation is implemented.

[0161] Since the electronic device introduced in this embodiment is an electronic device used to implement a method for positioning the latitude and longitude coordinates of a fire situation in the embodiment of this application, based on the method for positioning the latitude and longitude coordinates of a fire situation introduced in the embodiment of this application, a person skilled in the art can understand the specific implementation of the electronic device of this embodiment and its various variations, so how the electronic device implements the method in the embodiment of this application is not described in detail here. As long as a person skilled in the art implements the electronic device used in the method for positioning the latitude and longitude coordinates of a fire situation in the embodiment of this application, it belongs to the scope of protection of this application.

[0162] The above formulas are all dimensionless and numerical calculations. The formula is a formula for the most recent real situation obtained by collecting a large amount of data and performing software simulation. The preset parameters and thresholds in the formula are set by technicians in this field according to actual conditions.

[0163] The above is only a preferred embodiment of the present invention, and the protection scope of the present invention is not limited to the above embodiments. All technical solutions under the concept of the present invention belong to the protection scope of the present invention. It should be pointed out that for ordinary technical users in this technical field, some improvements and modifications without departing from the principle of the present invention should also be regarded as the protection scope of the present invention.

Claims

1. A method for locating fire situation latitude and longitude coordinates, It is characterized in that include: S1. Obtain the known coordinate position of the PTZ monitoring device; collect coordinate data of n known geographical locations according to the known coordinate position; And record n ​​PTZ azimuth angles corresponding to the PTZ monitoring device; n is an integer greater than or equal to 3; S2, based on the n coordinate data and the corresponding PTZ azimuth angle, using a machine learning algorithm to create a conversion model between the PTZ azimuth angle and the geographic azimuth angle; S3, identifying the location of the target fire through the PTZ monitoring device, and recording the corresponding PTZ azimuth and pitch angle data of the PTZ monitoring device; The azimuth of the pan / tilt platform is converted into the geographical azimuth of the target fire location through a conversion model; S4, obtaining the distance data between the PTZ monitoring device and the target fire location; calculating the latitude and longitude coordinates of the target fire location based on the geographic azimuth, pitch angle data, distance data of the target fire location and the known coordinate position of the PTZ monitoring device; S5. Send the latitude and longitude coordinates of the target fire location and warning information to the fire alarm terminal.

2. A method for positioning fire latitude and longitude coordinates according to claim 1, It is characterized in that The method of obtaining the known coordinate position of the PTZ monitoring device is to use a high-precision GPS to obtain the precise latitude and longitude coordinates of the location of the PTZ monitoring device, and use them as the known coordinate position of the PTZ monitoring device; The method of selecting the n known geographical locations includes: The n known geographical locations are evenly distributed within the full field of view of the PTZ monitoring device, and the full field of view includes an azimuth range and a distance range; the azimuth range includes the front and the left and right sides; the distance range includes the distant view and the near view; the azimuth range and the distance range are cross-defined to define the full field of view.

3. A method for positioning fire latitude and longitude coordinates according to claim 2, It is characterized in that The definition of the distant view and the near view includes: The original monitoring picture obtained by the PTZ monitoring device is subjected to image denoising and enhancement preprocessing to obtain a pre-image; The pre-trained SegNet deep network model is used to perform pixel-level semantic segmentation on the pre-image; the segmentation result is obtained; the segmentation result is to classify the pixels in the pre-image into the preset semantic categories; Use binocular vision perception method to perform depth estimation on the segmentation result to obtain the depth information of the image, i.e. the depth estimation result; For each semantic category i, a close-view depth threshold D is set near (i) and the distance depth threshold D far (i); if the depth distance Z(i) of semantic category i is less than or equal to D near (i), the semantic category is classified as the near-view area; If the depth distance Z(i) of semantic category i is greater than D far (i) The semantic category is classified as a distant view area; the distant view depth threshold D near (i) and the near-field depth threshold D far (i) Based on the image processing algorithm of edge detection and region growing, the boundaries of the distant view area and the near view area are extracted; and the distant view area image and the near view area image are obtained; The environment range to which the distant view area image belongs is the distant view, and the environment range to which the near view area image belongs is the near view; The method of obtaining the distant view area image and the near view area image comprises: The pixel points classified as edge points are subjected to boundary tracing to obtain a pixel chain code sequence of each connected area; the pixel chain code sequence is used to describe each boundary contour; the algorithms for implementing boundary tracing include neighbor row scanning, center row scanning, and sequential boundary tracing; Taking a specific starting point as a seed inside the boundary contour, the adjacent pixels are continuously merged according to the preset growth conditions to perform region growth, thereby obtaining a distant view connected region and a near view connected region; The formula for region growing is: R k+1 =R k ∪{p|(p∈Nb(R k ))&&(p∈Q')}; where R k+1 represents the new growth area after the k+1th iteration; R k is the growth area at the kth iteration; ∪ is the union operator of the set; p is the pixel point; Nb(R k ) represents the growth region R k The neighborhood set of ; && represents the logical AND operator; Q' represents the set of growth conditions; The growth condition Q' is defined as the set of grayscale similarity and regional smoothness; but Among them, I(p) is the gray value of pixel p, M(R k ) is R k The mean grayscale of , T is the grayscale threshold; is the gradient amplitude of pixel p, is the gradient threshold; The obtained distant view connected area and near view connected area are merged into the final distant view and near view area map; the adjacent areas are merged; the complete boundary vector contour lines of the distant view and near view areas are obtained; that is, the distant view area image and the near view area image are obtained.

4. A method for positioning fire latitude and longitude coordinates according to claim 3, It is characterized in that The calculation formula for the depth estimation is: Where Z(i) is the depth distance from the semantic category i to be estimated to the PTZ monitoring device; A is the period of the coded stripes projected into the environment; n i is the number of fringes observed on the imaging plane for semantic category i; f is the equivalent focal length of the PTZ monitoring device; a i is the angle of the stripe beam projected by semantic category i; The method of edge extraction includes obtaining the gradient amplitude of the pixel point; dividing the pixel point into edge and non-edge according to the gradient amplitude; The calculation formula for obtaining the gradient amplitude is: Where G(j) represents the magnitude of the image gradient at pixel j; a0, a1, ..., a8 represent the pixel values ​​in a 3x3 neighborhood, and the central pixel is a4; c is a constant; The method of dividing the edge and the non-edge includes: Set the upper edge threshold Tl and the lower edge threshold Tu; if the gradient amplitude of a pixel point is less than or equal to the upper edge threshold Tl, the corresponding pixel point is a non-edge point; if the gradient amplitude of a pixel point is greater than or equal to the lower edge threshold Tu, the corresponding pixel point is an edge point.

5. A method for positioning fire latitude and longitude coordinates according to claim 4, It is characterized in that The coordinate data are longitude and latitude coordinates; the coordinate data of the n known geographical locations are collected by measuring and recording the longitude and latitude coordinates of the n locations using surveying instruments or satellite remote sensing measurement methods; The method for obtaining the azimuth angle of the pan / tilt platform includes: Through manual control or preset programs, the pan-tilt monitoring device is directed to the n known geographical locations respectively, and the pan-tilt azimuth angle of the pan-tilt monitoring device corresponding to each known geographical location is recorded at the same time.

6. A method for positioning fire situation latitude and longitude coordinates according to claim 5, It is characterized in that The conversion model is created by: Preprocessing the collected n coordinate data and the corresponding PTZ azimuth angles to form training data; the preprocessing includes data cleaning, data formatting and standardization; Define the basic framework of the conversion model, which includes the expected compass deviation value calculation layer, the point estimation fitting layer and the azimuth fitting layer; Input the training data into the expected compass deviation value calculation layer to calculate the deviation values ​​of n coordinate data; The calculation formula for calculating the deviation value is: Wherein, g is the expected deviation value between the PTZ azimuth angle Y and the geographic azimuth angle; Jx is the longitude coordinate of the known geographic location; Jc is the latitude coordinate of the known geographic location; Wx is the longitude coordinate of the known coordinate position of the PTZ monitoring device; Wc is the latitude coordinate of the known coordinate position of the PTZ monitoring device; The point estimation fitting layer removes outliers from the expected deviation values ​​of the n coordinate data to obtain an accurate deviation value set; calculates the mean μ and standard deviation σ of the expected deviation value g in the accurate deviation value set; Set the deviation value threshold T1 to eliminate the expected deviation values ​​whose |g-μ is greater than T1·σ; take the average of the remaining expected deviation values ​​to obtain the final fitted compass deviation value; The azimuth fitting layer calculates the geographical azimuth of the known geographical location according to the compass deviation value and the PTZ azimuth of the PTZ monitoring device; The calculation formula of the fitting calculation is: C=y'+g'; wherein C is the geographical azimuth of the known geographical location; y' is the azimuth of the PTZ monitoring device; g' is the compass deviation value; that is, the calculation formula of the fitting calculation obtained is the conversion model.

7. A method for positioning fire latitude and longitude coordinates according to claim 6, It is characterized in that The method for identifying the target fire location includes: The PTZ monitoring device integrates a smoke detection model based on RGB images, a high temperature anomaly detection model based on thermal infrared images, and a combustion product detection model based on gas concentration; the integrated model outputs are weighted fused; The recording method of the azimuth and pitch angle data of the PTZ monitoring device includes: A position encoder is integrated in the PTZ monitoring device to obtain the PTZ azimuth angle; a gyroscope is integrated in the PTZ monitoring device to measure the pitch angle data; the position encoder and the gyroscope are discretely sampled at a fixed sampling frequency to obtain a sample value each time; N consecutive sample values ​​are constructed into an original data sequence; Performing error preprocessing on the original data sequence; the error preprocessing includes median filtering and mean operation; The median filtering process includes: Set a fixed sliding window, slide the sliding window on the original data, extract the median of the data in the sliding window as output, and obtain the data sequence after median filtering; The extracted formula is: y'(u)=med[x(uv),x(u-v+1),...,x(u+v)]; where y(u) is the output sequence; u is the index of the sequence; x(uv) is the value of the sequence v sampling periods ahead of x(u); 2v+1 is the width of the sliding window; med[] is the median operation; The mean operation is to average all the sample values ​​in the data sequence obtained after the median filtering; as real-time PTZ azimuth and pitch angle data; Substitute the obtained real-time PTZ azimuth y" into the conversion model to obtain the geographic azimuth C' of the target fire location.

8. A method for positioning fire latitude and longitude coordinates according to claim 7, It is characterized in that The method of obtaining the distance data between the PTZ monitoring device and the target fire location includes: The original monitoring images collected by the PTZ monitoring device are constructed into a monitoring image sequence in the order of time frames, and the monitoring image sequence is input into the pre-trained depth estimation model frame by frame; the depth estimation model performs pixel-level depth estimation on each frame of the image and outputs a depth map of each frame of the image; Locate the pixel area where the target fire occurs in the depth map; count the depth values ​​of all pixels in the pixel area and average them to obtain the average depth distance d'; The actual size S” of the pixel area on the imaging plane based on the focal length of the PTZ monitoring device and the target fire location known to the PTZ monitoring device; You can get the distance data from the target fire location to the PTZ monitoring equipment Wherein, F' is the focal length of the PTZ monitoring device.

9. A method for positioning fire latitude and longitude coordinates according to claim 8, It is characterized in that The training method of the depth estimation model includes: Collect U sets of RGB image pair datasets with depth ground truth; split the RGB image pair dataset into training set and validation set; Use the convolutional neural network model architecture as the basic framework of the depth estimation model; initialize the network weights of the depth estimation model; input the RGB image in the training set, and the label is the corresponding depth ground truth; define the loss function of the depth estimation model as the depth gradient loss function; select the Adam optimizer and initially set the hyperparameters; divide the training set into batches; iteratively train the depth estimation model in batches, Depth Gradient Loss Function Where N' represents the total number of pixels in the input image; H' represents the depth map predicted by the model; H" represents the depth ground truth map; and Represent the gradients of the predicted depth map in the horizontal and vertical directions respectively; and Represent the gradients of the true depth map in the horizontal and vertical directions respectively; Each time a batch is input to the depth estimation model, the function value of the depth gradient loss function is recorded. If the function value does not decrease in L consecutive iterations, the depth estimation model of the last round is saved; the current depth estimation model is evaluated using the validation set, and the parameters of the depth estimation model with the best performance are saved; The calculation method of the latitude and longitude coordinates of the target fire location includes: Obtain the precise value of the earth's radius R"; input the geographic azimuth, elevation angle data, distance data, precise value of the earth's radius, and known coordinates of the PTZ monitoring device at the target fire location into the coordinate calculation function to obtain the longitude and latitude coordinates of the target fire location; The coordinate calculation function is: Where P' is the pitch angle data; Wx' is the longitude coordinate of the target fire location; Jx' is the latitude coordinate of the target fire location.

10. A fire situation latitude and longitude coordinate positioning device, used to implement a fire situation latitude and longitude coordinate positioning method according to any one of claims 1 to 9, It is characterized in that include: A pan / tilt base (1), a portable handle (2), a transmission cabin (3), a thermal imaging camera (4), a laser ranging system (5), a visible light camera (6), an optical cabin (7), and a wiper (8).

Citation Information

Patent Citations

  • Fire point positioning method, device and system

    CN112330917A

  • High-accuracy target positioning method of unmanned plane on basis of multi-station measurement

    CN104501779A

  • Forest fire scenario positioning method based on digital tripod head and map

    CN107504961A

  • Accurate target positioning method

    CN111260870A

  • Method of constructing indoor two-dimensional semantic map with wall corner as critical feature based on robot platform

    US20220244740A1