Natural gas station personnel tracking method and device based on multi-feature fusion Camshift algorithm

By applying the Camshift algorithm based on multi-feature fusion in a natural gas station environment, the problem that traditional single-camera monitoring system is difficult to meet real-time monitoring and security management in complex environments is solved, and more efficient and accurate personnel tracking results are achieved.

CN119991732APending Publication Date: 2025-05-13ZHEJIANG OCEAN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411953363.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-27
Publication Date
2025-05-13

AI Technical Summary

Technical Problem

Traditional single-camera monitoring systems are difficult to meet the needs of real-time monitoring and safety management in natural gas station environments, mainly due to the particularity of spatial layout and the complexity of personnel activities.

Method used

The Camshift algorithm based on multi-feature fusion is adopted, through the complementary perspectives of multiple cameras and redundant information, the outline and color of the personnel targets are extracted on the video images of the natural gas station, and the spatial edge direction histogram and the color edge direction histogram are introduced to fusion, and the target is output based on the Camshift algorithm model.

Benefits of technology

It improves the accuracy and stability of personnel tracking in natural gas stations, and can more effectively identify and track personnel goals in complex environments to meet the needs of real-time monitoring and safety management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119991732A_ABST
    Figure CN119991732A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of energy exploitation safety, in particular to a natural gas station personnel tracking method and device based on a Camshift algorithm of multi-feature fusion, and can solve the problem that in a natural gas station environment, due to the particularity of spatial layout and the complexity of personnel activity, the personnel tracking efficiency is low to a certain extent. And a traditional single-camera monitoring system is often difficult to meet the requirements of real-time monitoring and safety management. The natural gas station personnel tracking method based on the multi-feature fusion Camshift algorithm comprises the following steps: performing contour and color feature extraction on a station video image personnel target by using visual angle complementation and information redundancy of a plurality of cameras; multi-feature information is introduced and fused; and outputting a target based on a Camshift algorithm model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of energy mining safety technology, and more specifically, to a natural gas station personnel tracking method and device based on a Camshift algorithm with multi-feature fusion. Background Art

[0002] Due to its low-carbon, high-efficiency, green and clean characteristics, natural gas occupies an irreplaceable position in the energy industry and has become one of the most important energy sources in the world.

[0003] As a key link in the natural gas supply chain, natural gas stations are responsible for storing and distributing natural gas, and play a vital role in energy security and stable supply. However, the safe operation of natural gas stations faces security challenges from many aspects, and an efficient monitoring system is needed to ensure safe operation.

[0004] However, in the natural gas station environment, due to the particularity of the spatial layout and the complexity of personnel activities, the traditional single-camera monitoring system often cannot meet the needs of real-time monitoring and security management. Summary of the invention

[0005] In order to solve the problem that in a natural gas station environment, due to the particularity of the spatial layout and the complexity of personnel activities, the traditional single-camera monitoring system often fails to meet the needs of real-time monitoring and security management, the present application provides a natural gas station personnel tracking method and device based on the Camshift algorithm with multi-feature fusion.

[0006] The embodiment of the present application is implemented as follows:

[0007] In a first aspect, the present application provides a natural gas station personnel tracking method based on a Camshift algorithm with multi-feature fusion, comprising:

[0008] By utilizing the complementary perspectives and information redundancy of multiple cameras, the contour and color features of personnel targets in the station video images are extracted;

[0009] Introduce and fuse multi-feature information;

[0010] Output target based on Camshift algorithm model.

[0011] In a possible implementation, the introducing and fusing multiple feature information includes fusing a spatial edge direction histogram and a color edge direction histogram.

[0012] In a possible implementation, the algorithm model is trained on the COCO dataset and a self-made natural gas station dataset to generate a natural gas station dataset to improve the accuracy of the model.

[0013] In a possible implementation, the outputting of the target based on the Camshift algorithm model further includes:

[0014] Adopting an adaptive weighted sum method to synthesize the best matching center of the spatial edge direction histogram and the color edge direction histogram;

[0015] Output target.

[0016] In a possible implementation, the Camshift algorithm further includes:

[0017] Feature extraction and histogram construction;

[0018] Iterative search of centroid position and determination of the best matching area;

[0019] Adaptive weighted sum optimization and convergence judgment;

[0020] Iterative updates and cycles.

[0021] In a possible implementation, the feature extraction and histogram construction further include:

[0022] For the input video image frame, the algorithm performs edge detection and color feature extraction operations to obtain the edge direction information and color information of the target;

[0023] The algorithm constructs the spatial edge direction histogram and color space histogram based on the extracted feature information and the spatial distribution of the target area. By analyzing the color and edge features of the target, it provides a rich information basis for subsequent target tracking.

[0024] In a possible implementation, the iterative search of the centroid position and the determination of the best matching area further include:

[0025] Within the target tracking window, the algorithm searches for the area that best matches the current target by continuously iteratively calculating the centroid position;

[0026] The algorithm uses similarities and to evaluate the degree of matching, and then determines the corresponding maximum similarity regions and, as well as their centroid position coordinates and. In order to seek the maximum similarity, the algorithm performs Taylor expansion on and respectively, and further accurately calculates the best matching center positions and, ensuring the accuracy and sensitivity of tracking.

[0027] In a possible implementation, the adaptive weighted sum optimization and convergence judgment further includes:

[0028] Determine the best matching center based on edge orientation and color model;

[0029] The algorithm uses an adaptive weighted sum method to combine the two best matching centers and calculate the optimal target position;

[0030] Check whether the current tracking result has converged based on the algorithm;

[0031] If convergence has not occurred, the algorithm uses an adaptive weighted sum method to combine the two best matching centers and calculate the optimal target position. The iterative calculation continues until convergence. The adaptive weighted mechanism allows the algorithm to dynamically adjust the weights of edge direction and color information according to actual conditions, thereby optimizing the tracking effect.

[0032] In a possible implementation, the iterative update and loop further includes:

[0033] After obtaining the optimal matching center position, the algorithm sets it as the center of the next video frame search window, and determines the new target area size accordingly;

[0034] Then the next frame of image is acquired again according to the algorithm, and tracking is performed iteratively based on the new search window size and centroid position, and this process is repeated until the end of the video.

[0035] In a second aspect, the present application provides a natural gas station personnel tracking device based on a Camshift algorithm with multi-feature fusion, comprising:

[0036] Feature extraction module: It is used to extract the contour and color features of personnel targets in the station video image by utilizing the complementary view angles and information redundancy of multiple cameras;

[0037] Feature fusion module: used to introduce and fuse multiple feature information;

[0038] Target output module: used to output targets based on the Camshift algorithm model.

[0039] The technical solution provided by this application can at least achieve the following beneficial effects:

[0040] The present application provides a method and device for tracking personnel in a natural gas station based on a Camshift algorithm with multi-feature fusion. By extracting features from image targets, the method mainly generates a color space distribution histogram and a spatial edge direction histogram, thereby capturing the color and contour features of the personnel target. Secondly, the weight coefficient is obtained by the similarity vector of the image features, and then the multi-feature fusion adaptive weight technology is used to obtain the personnel target in the image. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0042] Figure 1 It is a flowchart of a method for tracking personnel in a natural gas station using a Camshift algorithm based on multi-feature fusion, as shown in an exemplary embodiment of the present application;

[0043] Figure 2 It is a schematic diagram of the overall framework of Camshift algorithm personnel tracking based on multi-feature fusion shown in an exemplary embodiment of the present application;

[0044] Figure 3 is a schematic diagram of the location of surveillance cameras in a natural gas station shown in an exemplary embodiment of the present application;

[0045] Figure 4 is a schematic diagram of color space feature extraction and histogram shown in an exemplary embodiment of the present application;

[0046] Figure 5 It is a flowchart of a Camshift algorithm for multi-feature fusion shown in an exemplary embodiment of the present application;

[0047] Figure 6 It is a structural schematic diagram of a natural gas station personnel tracking device based on the Camshift algorithm of multi-feature fusion shown in an exemplary embodiment of the present application.

[0048] Reference numerals:

[0049] 1. Feature extraction module; 2. Feature fusion module; 3. Target output module. DETAILED DESCRIPTION

[0050] In order to make the purpose, implementation mode and advantages of the present application clearer, the exemplary implementation mode of the present application will be clearly and completely described below in conjunction with the drawings in the exemplary embodiments of the present application. Obviously, the described exemplary embodiments are only part of the embodiments of the present application, not all of the embodiments. It should be understood that the specific embodiments described here are only used to explain the present application and are not used to limit the present application.

[0051] It should be noted that the brief description of terms in this application is only for the convenience of understanding the embodiments described below, and is not intended to limit the embodiments of this application. Unless otherwise specified, these terms should be understood according to their common and usual meanings.

[0052] The terms "first", "second", "third", etc. in the specification and claims of this application and the above drawings are used to distinguish similar or similar objects or entities, and do not necessarily mean to limit a specific order or sequence, unless otherwise noted. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances.

[0053] The terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover but not exclude inclusion, for example, a product or device comprising a list of components is not necessarily limited to all the components expressly listed but may include other components not expressly listed or inherent to such product or device.

[0054] To facilitate the technical solution of the application, some concepts involved in the application are first explained below.

[0055] Camshift algorithm: The full name is Continuously Adaptive Mean-Shift, which is an improved target tracking method based on the MeanShift algorithm. It converts the image into a color probability distribution map through the color histogram model, and uses this probability distribution to adaptively adjust the size and position of the search window to achieve accurate tracking of the target.

[0056] Multi-feature fusion: is a technique used in image processing and CV. It is very useful for improving the performance of recognition, classification or detection tasks because it is universal in various tasks.

[0057] Adaptive weighting: is a method of dynamically adjusting weights to improve the performance of a model or the solution to an optimization problem. It is often used in fields such as machine learning, signal processing, control systems, and optimization. The core idea is to adaptively adjust weights based on changes in data or the environment to improve the accuracy of the model or the stability of the system.

[0058] MOTA: Multi-Object Tracking Accuracy, this metric combines three sources of error: false positives, missed targets, and identity switching

[0059] MOTP: Multi-Object Tracking Precision, this quality assurance combines the following two sources of error: the mismatch between the annotation and the predicted BBox.

[0060] Before explaining the Camshift algorithm natural gas station personnel tracking method based on multi-feature fusion provided in the embodiment of the present application, the application scenario and implementation environment of the embodiment of the present application are first introduced.

[0061] Due to its low-carbon, high-efficiency, green and clean characteristics, natural gas occupies an irreplaceable position in the energy industry and has become one of the most important energy sources in the world.

[0062] As a key link in the natural gas supply chain, natural gas stations are responsible for storing and distributing natural gas, and play a vital role in energy security and stable supply. However, the safe operation of natural gas stations faces security challenges from many aspects, and an efficient monitoring system is required to ensure safe operation. In the natural gas station environment, due to the particularity of the spatial layout and the complexity of personnel activities, traditional single-camera monitoring systems often cannot meet the needs of real-time monitoring and security management.

[0063] Some existing technologies use tracking methods based on particle filtering to estimate the state by simulating the target's motion model, but the process is relatively cumbersome. Hu et al. use a regression network based on deep learning to directly predict the position and size of the target, but can only perform calculation processing on a single feature and cannot perform fusion calculation processing on multiple features.

[0064] In addition, some scholars use information theory methods such as entropy or information gain to evaluate the importance of features and adjust the weights accordingly. However, the computational complexity of such methods is too large. In order to improve the efficiency and accuracy of tracking, Dhal et al. explored feature selection and fusion strategies. When the data has high dimensionality or sparsity, feature selection becomes more difficult.

[0065] If there is a high correlation or conflict between multiple features, fusion may lead to information redundancy or error. Khaire et al. use feature selection mechanism to eliminate redundant or inefficient features and retain the features that contribute most to tracking. In multi-feature fusion, different features contribute differently to the tracking target.

[0066] Some existing technologies have proposed learning-based methods to automatically adjust feature weights. Previous multi-feature fusion personnel tracking research has made certain progress in theory and model building, but in practical applications, especially in environments such as natural gas stations with high risks and complex equipment layouts, its performance is significantly limited.

[0067] The main problem is that the existing technology lacks the ability to adapt to multi-feature fusion computing in complex environments, especially when dealing with fast-moving or overlapping targets, its tracking accuracy and stability are insufficient. In addition, existing research often ignores environmental factors unique to natural gas stations, such as the complexity of equipment layout, which poses additional challenges to the practical application of personnel tracking technology. In order to improve the applicability of multi-feature fusion technology in natural gas stations, it is necessary to develop algorithms that can adapt to these special environmental conditions.

[0068] Based on this, the present application provides a natural gas station personnel tracking method and device based on the Camshift algorithm of multi-feature fusion. Through the improved Camshift personnel tracking algorithm, the spatial edge histogram is introduced, and the extraction of spatial edge features is additionally added, so as to better learn the characteristics of personnel targets and improve the accuracy of tracking personnel targets.

[0069] Next, the technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems will be described in detail through embodiments and in combination with the accompanying drawings. The embodiments may be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. Obviously, the described embodiments are part of the embodiments of the present application, not all of them.

[0070] Figure 1 It is a flowchart of a natural gas station personnel tracking method based on the Camshift algorithm of multi-feature fusion shown in an exemplary embodiment of the present application.

[0071] In an exemplary embodiment, Figure 1 As shown, a natural gas station personnel tracking method based on the Camshift algorithm of multi-feature fusion is provided. In this embodiment, the method may include the following steps:

[0072] Step 100: Using the complementary view angles and information redundancy of multiple cameras, contour and color features of personnel targets in the station video image are extracted.

[0073] Step 200: Introduce and fuse multiple feature information.

[0074] Step 300: Output the target based on the Camshift algorithm model.

[0075] Figure 2 : is a schematic diagram of the overall framework of Camshift algorithm personnel tracking based on multi-feature fusion shown in an exemplary embodiment of the present application, Figure 3 It is a schematic diagram of the locations of surveillance cameras in a natural gas station shown in an exemplary embodiment of the present application.

[0076] Specifically, if Figure 2 As shown:

[0077] (1) First, the complementary perspectives and information redundancy of multiple cameras are used to extract the contour and color features of personnel targets in the station video image, such as Figure 3 As shown;

[0078] (2) Secondly, multiple feature information is introduced and fused, including the spatial edge direction histogram and the color edge direction histogram. The algorithm uses an adaptive weighted sum method to synthesize the two best matching centers and finally outputs the target, thereby enhancing the adaptability and accuracy of the algorithm in complex environments.

[0079] (3) The algorithm model is trained on the COCO dataset and a self-made natural gas station dataset to generate a natural gas station dataset, which improves the accuracy of the model.

[0080] Figure 4 is a schematic diagram of color space feature extraction and histogram shown in an exemplary embodiment of the present application, Figure 5 It is a flowchart of a Camshift algorithm for multi-feature fusion shown in an exemplary embodiment of the present application.

[0081] In a possible implementation, the specific implementation process of this application is as follows:

[0082] 1. Feature extraction of personnel targets

[0083] Spatial histogram provides a rich representation of image features and captures the statistical characteristics of the image in a more comprehensive form by introducing high-order moment information.

[0084] Different from the traditional histogram, which only counts the distribution of characteristic values ​​(such as color, brightness, etc.), the spatial histogram adds the spatial distribution information of pixels, thus providing a deeper perspective for image analysis and processing.

[0085] The traditional histogram can be regarded as a special case of the spatial histogram, namely the zero-order spatial histogram, which mainly focuses on the global distribution of eigenvalues ​​and ignores the distribution pattern of eigenvalues ​​in space.

[0086] As an extension of this concept, the second-order spatial histogram not only considers the probability density function of the pixel in each feature subinterval, but also integrates the position information of the pixel in the image space, that is, the mean value μ of its spatial distribution b and covariance σ b .

[0087] These two high-order statistics respectively describe the average position of pixels in the bth feature subinterval in the image and the dispersion of their positions, providing additional description for the structure and shape of the image.

[0088] Therefore, the second-order spatial histogram of an image can be defined as a triplet h(b) = <h b ,μ b ,σ b >, where h b Represents the number or probability density of pixels in a specific feature subinterval, μb Describes the average spatial position of these pixels in the image, σ b It reflects their spatial distribution range.

[0089] This representation method enhances the expressive power of the histogram in describing image characteristics, so that it can not only capture the color or brightness distribution of the image, but also reveal the spatial structure and layout characteristics within the image.

[0090] By introducing the mean and covariance of spatial distribution, the second-order spatial histogram can provide more accurate and robust feature description for tasks such as image recognition, classification and retrieval.

[0091] The general histogram of an image is defined as:

[0092]

[0093] Among them, δ(·) is the Kronecker delta function. When the i-th pixel is located in the b-th subinterval, δ i,b =1, otherwise δ i,b =0; C is the normalization constant; b is the number of feature intervals; N is the total number of pixels.

[0094] For the second-order spatial histogram of an image, the spatial distribution mean vector and covariance matrix of any pixel point in the image are defined as:

[0095]

[0096] Among them, x i is the coordinate of the pixel point.

[0097] In order to compare two second-order spatial histograms, that is, for S = {h b ,μ b ,σ b} and S′={h b ′,μ b ′,σ b ′}, the phase velocity ρ of each b interval is defined as:

[0098]

[0099] Where T represents transpose, B is the number of characteristic subintervals, and η is the Gaussian normalization constant.

[0100] The similarity measurement function of the second-order spatial histogram of the image adds the spatial position information of the target area and enriches its feature description. Therefore, compared with the traditional histogram, its similarity measurement is more reliable and stable.

[0101] For the natural gas station personnel target in this section, the target features are extracted. The specific process is as follows Figure 4 As shown, feature extraction is performed first and then the histogram is output. Next, this paper mainly introduces the image from two aspects: color space and spatial edge distribution histogram.

[0102] (1) Color space distribution histogram

[0103] Since the RGB color space is highly sensitive to ambient lighting, slight changes in light may lead to inaccurate color recognition, thus affecting the tracking effect. In order to solve this problem and make full use of the importance of color information in video tracking, the HSV color space becomes a wise choice. The HSV color space separates the hue and saturation of the color from the brightness information, making the color representation more stable under different lighting conditions.

[0104] Some embodiments of the present application use an HSV color space histogram to model the color features of a target. In order to accurately quantify the color features, the HSV space is subdivided into B=8×8×8 subintervals. Through this detailed quantization, subtle differences in target colors can be captured and each pixel can be assigned an accurate color subinterval.

[0105] Next, the HSV values ​​of all pixels in the target area are counted, and the frequency of occurrence of pixels in each color sub-interval is calculated to construct the color histogram of the target.

[0106] Considering that pixels at different positions in the target area may contribute differently to the tracking results, a distance-based weight allocation mechanism is introduced.

[0107] Specifically, different weights are assigned according to the distance between each pixel in the target area and the center of the area. The closer the pixel is to the center, the higher its weight, and vice versa.

[0108] This strategy can ensure that when constructing the color histogram, the color features of the central area are more reflected, further improving the accuracy of color feature extraction and the effect of target tracking.

[0109] When constructing the color histogram, a distance-based pixel weight allocation mechanism is introduced to address the situation where pixels at different positions in the image area may contribute differently to the color histogram.

[0110] The purpose of this mechanism is to ensure that the color histogram reflects the color characteristics of the center of the region more accurately to improve the accuracy of color feature extraction. Its weight function is defined as:

[0111]

[0112] Where d represents the distance from any pixel to the center of the region.

[0113] The color distribution histogram is represented by c(y)={c b (y),b=1,2,…,B}, where the center point is at y.

[0114] In order to eliminate the impact of image scaling, normalization is performed:

[0115]

[0116] Among them, N represents the total number of pixels in the target area, that is, the number of pixels in the area of ​​size h×w, θ(x i ) represents pixel x i The subinterval index in the color histogram is used to determine the color interval in which the pixel is located.

[0117] In some embodiments of the present application, the color distribution histogram c(y) is expanded to propose a new model C b ,The model not only contains color distribution information, but also incorporates spatial information to improve the accuracy and richness of the model.

[0118] Specifically, C b The model consists of three parts: color histogram c b , and the mean vector μ of the corresponding subinterval pixel coordinates b and the covariance matrix σ b In this model, c b Continue to represent the color distribution of pixels in a specific subinterval b, and μ b and σ b They respectively describe the distribution characteristics of these pixels in space, μ b is the average value of the pixel coordinates in the subinterval, which provides the central tendency information of the pixel points in the image, σ b is the covariance matrix of the pixel coordinates, which reflects the shape and directionality of the pixel distribution and can capture the spatial distribution characteristics of the pixel. By combining color and spatial information, C b The model can more comprehensively describe the color distribution and spatial relationship of pixels in the image, thus providing a more accurate and detailed model for image analysis and processing.

[0119]

[0120] in, x i is the coordinate of the pixel point of the grayscale image, and y is the coordinate of the center point of the image.

[0121] In order to compare two color space histograms, that is, for C = {c b ,μ b ,σb} and C′={c b ′,μ b ′,σ b ′}, the similarity ρ of each b interval can be obtained c,b (y):

[0122]

[0123] Where T represents the transpose and η is the Gaussian normalization constant.

[0124] (2) Spatial edge direction histogram

[0125] The edge of an image refers to the place where the boundary between the target and the background in the image is clear, usually accompanied by a sharp change or discontinuity in brightness. These edges are composed of a series of pixels with clear directionality and intensity, which represent the rapid transition of grayscale in the local area of ​​the image. The histogram of edge direction can capture the details of the target contour. By analyzing the distribution of edges, it reveals the aggregation of edge directions and the structural characteristics of objects in a specific area. It is not greatly affected by changes in lighting conditions and differences in target color. In order to accurately identify the edges in the image, it is usually necessary to convert the original RGB color image into a grayscale image, which can be achieved through the HSV color space. In the grayscale image I (i, j), for each pixel (i, j), its gradient vector can be calculated to quantify the intensity and direction of the edge.

[0126] After processing, the edge information in the image can be detected and described more accurately.

[0127]

[0128] In image processing, an edge is the dividing line between an object in an image and the surrounding background, usually corresponding to a sudden change or discontinuity in brightness. The strength of an edge is measured by the degree of brightness change of a pixel in a specific direction. This change can be a rapid rise or fall in brightness, forming a significant feature in the image.

[0129] In order to describe these edge features, we usually focus on the horizontal direction of the gradient I h and vertical direction I v The two components of , and their transposed vector T. For each pixel in the image, the amplitude M(i, j) and direction D(i, j) of its edge can be calculated. The amplitude M(i, j) reflects the size of the edge strength, while the direction D(i, j) describes the direction of the edge in the image. These two parameters together constitute a complete description of the edge characteristics and provide key information for subsequent image analysis and processing.

[0130] This way, structures and shapes in images can be more accurately identified and understood.

[0131]

[0132] In some embodiments of the present application, the Sobel operator is used to identify edge features in an image. The two kernels of the Sobel operator are applied to the grayscale image I(i, j) respectively, and a convolution operation is performed to obtain the horizontal direction I h and vertical direction I v edge image.

[0133]

[0134] in,

[0135] In order to reduce the interference of noise in the image on the accuracy of edge detection, a threshold K=95 is set. This threshold is used to filter out edge points with gradient amplitudes lower than the set value, thereby reducing false detections and improving the accuracy of detection results.

[0136] The normalized edge direction histogram can more accurately reflect the edge distribution in the image and provide a reliable basis for subsequent edge detection and target structure analysis.

[0137] Next, for e b (i, j) is normalized to ensure that it is not affected by image scaling, and we get:

[0138]

[0139] In image processing, m and n represent the number of pixels in the horizontal and vertical directions of image I(i,j), respectively. b It refers to the number of pixels within a specific angle range whose gradient value δ is not zero.

[0140] By combining the edge direction histogram e b And the spatial information of the image, we can construct the spatial edge direction distribution histogram E b (y), which contains the pixel distribution characteristics of each angle interval and their coordinate mean vector μ b and the covariance matrix σ b , the value range of b is 1 to 16.

[0141] In order to evaluate the similarity between two images in the spatial edge direction, a matching measure ρ is defined e,b (y), used to compare two spatial edge direction histograms E = {e b ,μ b ,σ b} and E′={e b ′,μ b ′,σb ′}, by calculating the similarity ρ of each angle interval b e,b (y), which can quantify the degree of match between the two images in the edge direction.

[0142]

[0143] 2. Multi-feature fusion adaptive weight technology

[0144] In each frame of the video sequence, the algorithm aims to accurately locate these feature sets to track the moving target. As a traditional color feature tracking method, the Camshift algorithm has good robustness to the shape change, scale change and posture change of the target, but it is also susceptible to quality problems such as image noise and blur.

[0145] Since the Camshift algorithm mainly relies on color histograms for feature extraction, the tracking performance will be affected when there are interfering objects with similar colors in the scene. In order to improve the accuracy and robustness of tracking, we began to explore methods that combine multiple feature information. Information fusion technology can more effectively describe the target area by integrating the advantages of different features.

[0146] Common fusion methods include multiplicative fusion and weighted fusion, the latter of which is favored due to its smaller computational burden and simple implementation process. In weighted fusion, there are two strategies: fixed weight and adaptive weight.

[0147] Some embodiments of the present application use a multi-feature fusion method with adaptive weights, which dynamically adjusts the weights according to the similarity function of each frame image, and can obtain a comprehensive tracking result by combining the spatial histogram of color features and edge features. In this process, features with larger weights indicate that they are more similar to the target and contribute more significantly to the final tracking effect. This adaptive fusion strategy can be flexibly adjusted according to changes in image content, thereby improving the adaptability and performance of the tracking algorithm.

[0148] Assume that the target center coordinate of the tracking result based on the color space histogram is y c , the target center coordinate of the tracking result based on the spatial edge direction histogram is y e Considering the characteristics of fusion features, the target position is updated and two feature-based adaptive coefficients are defined as w and c and w e , then the coordinates of the optimal target center of the adaptive tracking result are:

[0149] y op =w c y c +w ey e (twenty one)

[0150] Among them, w c is the weight of the tracking result based on the color space histogram, w e is the weight of the tracking result based on the spatial edge direction histogram. The similarity vector is obtained from the color space histogram and the spatial edge direction histogram, and the normalized weight w is obtained. c and w e for:

[0151]

[0152] The adaptive weights can be dynamically adjusted according to the similarity of different features, thereby more effectively combining the contributions of different features to the target location and improving the accuracy and robustness of the tracking results.

[0153] The Camshift algorithm of multi-feature fusion combines the color features and edge direction features of the target to achieve efficient tracking of moving targets. The flowchart of the Camshift algorithm of multi-feature fusion is as follows: Figure 5 shown.

[0154] The steps of the algorithm are detailed as follows:

[0155] (1) Feature extraction and histogram construction.

[0156] First, for the input video image frame, the algorithm performs edge detection and color feature extraction operations to obtain the edge direction information and color information of the target. Then, the algorithm constructs the spatial edge direction histogram e(y) and the color space histogram c(y) based on the extracted feature information and the spatial distribution of the target area. This step is the basis of the multi-feature fusion Camshift algorithm. By analyzing the color and edge features of the target, it provides a rich information basis for subsequent target tracking.

[0157] (2) Iterative search of centroid position and determination of the best matching area.

[0158] Within the target tracking window, the algorithm searches for the area that best matches the current target by continuously iteratively calculating the center of mass position.

[0159] Specifically, the algorithm uses the similarity ρ e,b (y) and ρ c,b (y) to evaluate the matching degree and then determine the corresponding maximum similarity region Z e and Z c , and their centroid position coordinates y e and c In order to find the maximum similarity, the algorithm e,b (y) and ρc,b (y) Taylor expansion is performed to further accurately calculate the best matching center position y e and c , ensuring the accuracy and sensitivity of tracking. e,b (y) is used as an example to illustrate:

[0160] ρ e,b (y)≈ρ e,b (y0)+Γ e (y,y0)+Γ μ (y,y0)(24)

[0161]

[0162] Among them, y0 is the center position of the initial window.

[0163] make Get the best matching center position y e The calculation formula is:

[0164]

[0165]

[0166] Among them, ε is the normalization coefficient, R is the radius of the search window; g (t) is a kernel function. The closer the t value is to 0, the g (t) The larger the value.

[0167] (3) Adaptive weighted sum optimization and convergence judgment.

[0168] After determining the best matching center based on edge direction and color model, the algorithm uses an adaptive weighted sum method to combine the two best matching centers y e and c , and calculate the optimal target position y op .

[0169] The algorithm will check whether the current tracking result has converged. If not, it will return to step (2) and continue iterating until convergence. The adaptive weighting mechanism of this step allows the algorithm to dynamically adjust the weights of edge direction and color information according to actual conditions, thereby optimizing the tracking effect.

[0170] (4) Iterative updates and cycles.

[0171] Once the optimal matching center position y is obtained op, the algorithm sets it as the center of the search window for the next video frame and determines the new target area size accordingly. Then, the algorithm reacquires the next frame and iteratively tracks based on the new search window size and centroid position, and repeats this process until the end of the video.

[0172] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the instructions, these steps are not necessarily executed in sequence according to the order of the instructions. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flowcharts involved in the above-mentioned embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of the steps or stages in other steps.

[0173] Corresponding to the aforementioned embodiment of the natural gas station personnel tracking method based on the Camshift algorithm of multi-feature fusion, adopting the same technical concept, the present application also provides an embodiment of the natural gas station personnel tracking device based on the Camshift algorithm of multi-feature fusion.

[0174] Figure 6 It is a structural schematic diagram of a natural gas station personnel tracking device based on the Camshift algorithm of multi-feature fusion shown in an exemplary embodiment of the present application.

[0175] In an exemplary embodiment, Figure 6 As shown, the Camshift algorithm-based natural gas station personnel tracking device based on multi-feature fusion includes:

[0176] Feature extraction module 1: It is used to extract the features of contour and color of personnel targets in the station video image by utilizing the complementary view angles and information redundancy of multiple cameras;

[0177] Feature fusion module 2: used to introduce and fuse multiple feature information;

[0178] Target output module 3: used to output targets based on the Camshift algorithm model.

[0179] For the specific definition of the Camshift algorithm natural gas station personnel tracking device based on multi-feature fusion, please refer to the definition of the Camshift algorithm natural gas station personnel tracking method based on multi-feature fusion mentioned above, which will not be repeated here. Each module in the Camshift algorithm natural gas station personnel tracking device based on multi-feature fusion can be implemented in whole or in part by software, hardware and a combination thereof. The above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0180] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0181] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.

Claims

1. A natural gas station personnel tracking method based on Camshift algorithm with multi-feature fusion, characterized in that: include: By utilizing the complementary perspectives and information redundancy of multiple cameras, the contour and color features of personnel targets in the station video images are extracted; Introduce and fuse multi-feature information; Output target based on Camshift algorithm model.

2. The Camshift algorithm natural gas station personnel tracking method based on multi-feature fusion as claimed in claim 1 is characterized in that: The introducing and fusing of multiple feature information includes fusing a spatial edge direction histogram and a color edge direction histogram.

3. The Camshift algorithm natural gas station personnel tracking method based on multi-feature fusion as claimed in claim 1 is characterized in that: The algorithm model is trained on the COCO dataset and a self-made natural gas station dataset to generate a natural gas station dataset to improve the accuracy of the model.

4. The Camshift algorithm natural gas station personnel tracking method based on multi-feature fusion as claimed in claim 1 is characterized in that: The output target based on the Camshift algorithm model further includes: Adopting an adaptive weighted sum method to synthesize the best matching center of the spatial edge direction histogram and the color edge direction histogram; Output target.

5. The Camshift algorithm natural gas station personnel tracking method based on multi-feature fusion as claimed in claim 1 is characterized in that: The Camshift algorithm further comprises: Feature extraction and histogram construction; Iterative search of centroid position and determination of the best matching area; Adaptive weighted sum optimization and convergence judgment; Iterative updates and cycles.

6. The Camshift algorithm natural gas station personnel tracking method based on multi-feature fusion as claimed in claim 5 is characterized in that: The feature extraction and histogram construction further include: For the input video image frame, the algorithm performs edge detection and color feature extraction operations to obtain the edge direction information and color information of the target; The algorithm constructs the spatial edge direction histogram and color space histogram based on the extracted feature information and the spatial distribution of the target area. By analyzing the color and edge features of the target, it provides a rich information basis for subsequent target tracking.

7. The Camshift algorithm natural gas station personnel tracking method based on multi-feature fusion as claimed in claim 5 is characterized in that: The iterative search of the centroid position and the determination of the best matching area further include: Within the target tracking window, the algorithm searches for the area that best matches the current target by continuously iteratively calculating the centroid position; The algorithm uses similarities and to evaluate the degree of matching, and then determines the corresponding maximum similarity regions and , as well as their center of mass position coordinates and . In order to seek the maximum similarity, the algorithm performs Taylor expansion on and respectively, and further accurately calculates the best matching center positions and , ensuring the accuracy and sensitivity of tracking.

8. The Camshift algorithm natural gas station personnel tracking method based on multi-feature fusion as claimed in claim 5 is characterized in that: The adaptive weighted sum optimization and convergence judgment further includes: Determine the best matching center based on edge orientation and color model; The algorithm uses an adaptive weighted sum method to combine the two best matching centers and calculate the optimal target position; Check whether the current tracking result has converged based on the algorithm; If convergence has not occurred, the algorithm uses an adaptive weighted sum method to combine the two best matching centers and calculate the optimal target position. The iterative calculation continues until convergence. The adaptive weighted mechanism allows the algorithm to dynamically adjust the weights of edge direction and color information according to actual conditions, thereby optimizing the tracking effect.

9. The Camshift algorithm natural gas station personnel tracking method based on multi-feature fusion as claimed in claim 5 is characterized in that: The iterative update and cycle further includes: After obtaining the optimal matching center position, the algorithm sets it as the center of the next video frame search window, and determines the new target area size accordingly; Then the next frame of image is acquired again according to the algorithm, and tracking is performed iteratively based on the new search window size and centroid position, and this process is repeated until the end of the video.

10. A natural gas station personnel tracking device based on Camshift algorithm with multi-feature fusion, characterized in that: include: Feature extraction module: It is used to extract the contour and color features of personnel targets in the station video image by utilizing the complementary view angles and information redundancy of multiple cameras; Feature fusion module: used to introduce and fuse multiple feature information; Target output module: used to output targets based on the Camshift algorithm model.