A Method and Device for Optimizing Video Sensor Coverage Based on a 3D Perception Model
By employing a hybrid optimization strategy based on particle swarm optimization and gradient algorithms using a 3D perception model, the problems of overlapping coverage and blind spots of video sensors in 3D space were solved, achieving more efficient monitoring area coverage and improving the effectiveness of camera deployment.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-01
- Publication Date
- 2026-03-13
AI Technical Summary
Existing video sensor coverage algorithms have overlapping and blind spots in three-dimensional space, making it difficult to achieve the expected coverage quality. Furthermore, traditional two-dimensional models cannot be directly applied to three-dimensional space, affecting the camera placement effect.
A video sensor coverage optimization method based on a 3D perception model is adopted. It utilizes a hybrid optimization strategy of particle swarm optimization and gradient algorithm. An initial population is generated through elite back learning. Combined with adaptive inertial weights and an improved gradient iteration formula, the position of the camera and the main sensing direction are optimized to improve the coverage.
It significantly improved the coverage of the monitored area, reduced overlapping areas and blind spots, enhanced the uniformity of camera distribution and coverage effect, and shortened the convergence time of the algorithm.
Smart Images

Figure CN115879181B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of machine learning technology, specifically relating to a method and apparatus for optimizing video sensor coverage based on a three-dimensional perception model. Background Technology
[0002] With the continuous deployment of large-scale video surveillance systems, the development of intelligent layout algorithms has become an important research area in computer vision. Video surveillance has wide applications in environmental monitoring, healthcare, transportation hubs, and critical infrastructure. In natural scenes, how to scientifically and rationally deploy cameras to improve their coverage has attracted much attention from researchers.
[0003] Surveillance cameras are video sensors that monitor and collect visual information from the physical environment. They mainly include sensor-based omnidirectional perception models and directional perception models. Both of these models are performed in two-dimensional space. Therefore, when the camera is in three-dimensional space, the traditional two-dimensional perception model is affected by spatial factors, and the corresponding coverage algorithm cannot be directly applied to practical applications, which has an adverse effect on the deployment of cameras.
[0004] Therefore, there is an urgent need to improve the perception model in existing technologies that is affected by two-dimensional space. Summary of the Invention
[0005] To address the aforementioned problems in the existing technology, this invention provides a video sensor coverage optimization method and apparatus based on a three-dimensional perception model. The technical problem to be solved by this invention is achieved through the following technical solution:
[0006] In a first aspect, the present invention provides a video sensor coverage optimization method based on a three-dimensional perception model, comprising:
[0007] Acquire the monitoring area A, which contains L cameras;
[0008] Construct a 3D perception model of the i-th camera and obtain the coverage range of the camera in the area to be monitored, A; obtain the coverage range of L cameras in the area to be monitored, A.
[0009] Discretize the area A to be monitored to obtain the set of discretized target points Ω; obtain the set of target points H(t) covered by L cameras in the area to be monitored.
[0010] Based on the target point set Ω and the target point set H(t), obtain the coverage rate of the area to be monitored A;
[0011] The coverage of the area to be monitored is optimized based on the particle swarm optimization algorithm and the gradient algorithm; among them, the initial population of the particle swarm optimization algorithm is generated using elite back-learning.
[0012] Obtain the optimized coverage of the area to be monitored.
[0013] Secondly, the present invention also provides a video sensor coverage optimization device based on a three-dimensional perception model, comprising:
[0014] The data acquisition module is used to acquire data about the area to be monitored, A, which includes L cameras.
[0015] The model building module is used to build a 3D perception model of the i-th camera and obtain the coverage range of the camera in the area to be monitored, A; and to obtain the coverage range of L cameras in the area to be monitored, A.
[0016] The data processing module is used to discretize the area to be monitored A and obtain the discretized target point set Ω; and to obtain the target point set H(t) covered by L cameras in the area to be monitored.
[0017] The data calculation module is used to obtain the coverage of the area A to be monitored based on the target point set Ω and the target point set H(t);
[0018] The data optimization module is used to optimize the coverage of the area to be monitored based on the particle swarm optimization algorithm and the gradient algorithm; among them, the initial population of the particle swarm optimization algorithm is generated using elite back-learning.
[0019] The results acquisition module is used to obtain the optimized coverage of the area to be monitored.
[0020] The beneficial effects of this invention are:
[0021] This invention provides a video sensor coverage optimization method and apparatus based on a 3D perception model. Addressing the video sensor coverage problem, it utilizes a 3D perception model to describe the coverage range of a single camera and proposes a hybrid optimization algorithm combining particle swarm optimization (PSO) and gradient optimization. First, it improves the traditional PSO algorithm by using elite back-learning to generate the initial population and adding adaptive inertia weights. Then, it constructs a new gradient iteration formula based on the coverage optimization model and provides a method for calculating partial increments to reduce time complexity. Finally, it embeds the improved gradient algorithm into the PSO iteration process. Specifically, it uses the historical best value of each individual during the PSO iteration process as the initial value for iterative optimization, enhancing the local search capability of the PSO and accelerating the algorithm's convergence speed.
[0022] The present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description
[0023] Figure 1 This is a flowchart of a video sensor coverage optimization method based on a three-dimensional perception model provided in an embodiment of the present invention;
[0024] Figure 2 This is a schematic diagram of a three-dimensional perception model provided in an embodiment of the present invention;
[0025] Figure 3 This is a schematic diagram of a video sensor coverage optimization device based on a three-dimensional perception model provided in an embodiment of the present invention;
[0026] Figure 4(a) is an initial random deployment diagram of the cameras provided in an embodiment of the present invention;
[0027] Figure 4(b) is a deployment diagram of the standard particle swarm algorithm provided in an embodiment of the present invention;
[0028] Figure 4(c) is a deployment diagram of the bee colony algorithm provided in an embodiment of the present invention;
[0029] Figure 4(d) is a PSG deployment diagram provided in an embodiment of the present invention;
[0030] Figure 5 These are iterative curves of the three algorithms provided in the embodiments of the present invention;
[0031] Figure 6(a) is a schematic diagram of the random deployment of simulation results provided in an embodiment of the present invention;
[0032] Figure 6(b) is a schematic diagram of the simulation result JABC provided by the embodiment of the present invention;
[0033] Figure 6(c) is a schematic diagram of the simulation result PSO provided by an embodiment of the present invention;
[0034] Figure 6(d) is a schematic diagram of the simulation result PSG provided by the embodiment of the present invention;
[0035] Figure 7 This is a schematic diagram illustrating the relationship between the number of cameras and coverage provided in an embodiment of the present invention. Detailed Implementation
[0036] The present invention will be further described in detail below with reference to specific embodiments, but the implementation of the present invention is not limited thereto.
[0037] In existing technologies, Ma et al. first proposed a three-dimensional perception model based on sensor node location, main sensing direction, horizontal sensing range, and vertical sensing range in 2009, and proposed a region coverage enhancement algorithm based on virtual potential field analysis. Xiao et al. orthogonally decomposed the main sensing direction into pitch and yaw angles, adjusted the node pitch angle according to the node's own position and the monitoring area, and adjusted the node yaw angle based on particle swarm optimization to reduce node sensing overlap and blind spots, thereby enhancing the region coverage of the monitoring scene. Fu et al. proposed a probabilistically heuristic binary particle swarm optimization algorithm to solve the camera network layout problem, deploying cameras in three-dimensional space while limiting the monitoring area to a two-dimensional ground plane. Altahir et al. addressed the camera layout problem by using circles, isosceles trapezoids, triangles, and sectors as sensor coverage areas, respectively, and performed layout based on their proposed model and evaluated the results. Zhuang Yaoming et al., based on the sensor's 3D model, introduced the Levy flight strategy and multi-dimensional optimization strategy to optimize the camera's rotation angle, using an improved cuckoo algorithm for optimization. Comparison with other algorithms showed that the improved algorithm achieved better experimental results, but significant overlap and blind spots in camera coverage still exist. Currently, the randomness of video sensor node distribution makes it difficult to achieve the expected coverage quality, resulting in numerous overlapping coverage areas.
[0038] In view of this, the present invention provides a video sensor coverage optimization method based on a three-dimensional perception model, which can effectively improve the coverage of the monitoring area by adjusting the position of the camera and the main sensing direction.
[0039] Please see Figure 1 , Figure 1 This is a flowchart of a video sensor coverage optimization method based on a three-dimensional perception model provided in an embodiment of the present invention. The video sensor coverage optimization method based on a three-dimensional perception model provided in this application includes:
[0040] S101. Obtain the area to be monitored, A, which includes L cameras;
[0041] S102. Construct a 3D perception model of the i-th camera and obtain the coverage range of the camera in the area to be monitored, A; obtain the coverage range of L cameras in the area to be monitored, A.
[0042] S103. Discretize the area to be monitored A to obtain the set of discretized target points Ω; obtain the set of target points H(t) covered by L cameras in the area to be monitored.
[0043] S104. Based on the target point set Ω and the target point set H(t), obtain the coverage rate of the area to be monitored A;
[0044] S105. Optimize the coverage of the area to be monitored based on the particle swarm optimization algorithm and the gradient algorithm; wherein, the initial population of the particle swarm optimization algorithm is generated using elite back-learning.
[0045] S106. Obtain the optimized coverage of the area to be monitored.
[0046] For details, please continue to see Figure 1 As shown, in this embodiment, for the video sensor coverage problem, a 3D perception model is used to describe the coverage range of a single camera, and a hybrid optimization algorithm of particle swarm optimization and gradient optimization is proposed. First, an initial population is generated using elite back-learning, and adaptive inertia weights are added to improve the traditional particle swarm optimization algorithm. Then, a new gradient iteration formula is constructed based on the coverage optimization model, and a method for calculating the partial increment is given to reduce the time complexity. Finally, the improved gradient algorithm is embedded into the particle swarm iteration. Specifically, the historical best value of each individual in the particle swarm iteration process is used as the initial value of the improved gradient algorithm for iterative optimization, thereby improving the local search capability of the particle swarm and accelerating the convergence speed of the algorithm.
[0047] In an optional embodiment of the present invention, please refer to Figure 2 , Figure 2 This is a schematic diagram of a three-dimensional perception model provided in an embodiment of the present invention. Constructing the three-dimensional perception model of the i-th camera includes:
[0048] Obtain the position S(x,y,z) of the i-th camera in 3D space;
[0049] Obtain the main sensing direction C = (γ, θ) of the i-th camera; where γ is the pitch angle and θ is the rotation angle; the main sensing direction is decomposed into a horizontal component and a vertical component.
[0050] Obtain the horizontal field of view 2α and the vertical field of view 2β of the i-th camera;
[0051] The three-dimensional perception model of the i-th camera is constructed using its position S(x,y,z) in three-dimensional space, the main sensing direction C=(γ,θ), the horizontal field of view 2α, and the vertical field of view 2β.
[0052] In an optional embodiment of the present invention, the coverage area A of the i-th camera in the area A to be monitored is obtained. i (t) includes:
[0053] Based on the 3D perception model of the i-th camera, obtain the coverage range of the annular sector, that is, the coverage range of the camera in the area A to be monitored;
[0054] Based on the coverage area of the annular sector, the target points within the camera's coverage area are obtained, expressed as follows:
[0055]
[0056] Where p is any point p(x0,y0) in space, r1 is the first radius of the annular sector, r2 is the second radius of the annular sector, and s' is the projection point s'(x,y) of the i-th camera on the horizontal plane. The horizontal component of the primary perception direction.
[0057] In an optional embodiment of the present invention, obtaining the coverage of the area to be monitored includes:
[0058] Obtain the discrete target point set Ω = {1, 2, ..., G} of the monitoring area A, where G is the number of target points; determine whether the j-th target point in the target point set Ω is covered by any camera. If it is covered, it is represented as 1; otherwise, it is represented as 0. The expression is as follows:
[0059]
[0060] Where i∈{1,2,…,L}, and t is the state variable of the i-th camera;
[0061] Obtain the set H of target points covered by i cameras in the area A to be monitored. i (t), whose expression is:
[0062] H i (t)={j|a ij (t)=1,j∈Ω};
[0063] Obtain the set H(t) of target points covered by L cameras in the area A to be monitored, expressed as:
[0064]
[0065] The coverage rate of the area to be monitored, A, is obtained by the following expression:
[0066]
[0067] The problem of optimizing the coverage of the area to be monitored, A, is transformed into the following expression:
[0068]
[0069] Here, Q is the feasible region of the state variable t.
[0070] In an optional embodiment of the present invention, the initial population for generating a particle swarm optimization algorithm using elite back-learning includes:
[0071] In the solution space, N particles are randomly generated as the initial population, and the number of individuals in the population is X. o (o=1,2,…,N):
[0072] Obtain the reverse population corresponding to the initial population
[0073] The initial population X o Fitness value and reverse population The fitness values of the individuals are compared, and the population with the higher fitness value is selected as the final initial population. The expression for this is:
[0074]
[0075] Where, f(X) o ) represents the fitness value of the initial population. This represents the fitness value of the reverse population.
[0076] In an optional embodiment of the present invention, the method further includes: introducing adaptive inertia weights into the particle swarm algorithm;
[0077] The adaptive inertia weight for each particle in the population is obtained, and its expression is:
[0078]
[0079] in, Let $\int_i$ be the inertia weight corresponding to particle $o$ in the $k$-th iteration. The maximum fitness value of all individuals in the k-th iteration. Let $\frac{ ... w represents the fitness value of particle o in the k-th iteration. max w is the maximum value of the inertia weight. min This represents the minimum value of the inertia weight.
[0080] During each iteration, the population particles update their own velocity and state variables, expressed as follows:
[0081]
[0082] Where o is any swarm particle (o = 1, 2, ..., N), n is any camera parameter, w is the inertial weight, h1 and h2 are acceleration factors, and b1 and b2 are uniformly distributed random numbers between 0 and 1. Let $\frac{0}{k+1}$ be the velocity of particle $o$ in the population at the (k+1)th iteration. Let $\mathbf(t)$ be the state variable of the $o$-th particle in the $k+1$-th iteration. For the historical optimal point of the population particles, This is the global optimum found so far for the population particles.
[0083] In an optional embodiment of the present invention, the expression for the gradient algorithm is:
[0084]
[0085] Among them, t (e) For the current point, t (e+1) Let λ be the next point, λ be the iteration step size, and Δf(t) be the iteration step size. (e) ) is a partial increment, where Δf(t) (e) )=(Δf1(t (e) ),Δf2(t (e) ),…,Δf s (t (e) ), where s is the dimension of the partial increment, and the expression for the c-th partial increment is:
[0086] Δf c (t (e) )=f(t (e) +Δt c z c )-f(t (e) );
[0087] Where, Δt c z represents the increment of each component in the independent variable. c Let be an s-dimensional vector with the c-th component being 1 and all other components being 0. Q′ represents the area to be monitored.
[0088] In an optional embodiment of the present invention, the c-th partial increment Δf(t) (e) The expression for obtaining ) is:
[0089] Δf c (t (e) )=Y1(t (e) )-Y2(t (e) )
[0090]
[0091]
[0092] Among them, Y1(t) (e) ) is t = t (e) The target point that is not covered by any camera at time t = t (e) +Δt c z c The number of target points covered by the l-th camera is the net increase in coverage; Y2(t) (e) ) represents the target point that is only covered by the l-th camera at t=t (e) +Δt c zc The number of target points that are not covered by it is the net reduction in the number of target points covered, Ω un (t (e) () represents a target point that is not covered by any camera. For a target point that is only covered by the l-th camera, a lj Let be the target point covered by the l-th camera, and j be the j-th target point.
[0093] Based on the same inventive concept, please refer to Figure 3 , Figure 3 This is a schematic diagram of a video sensor coverage optimization device based on a three-dimensional perception model provided in an embodiment of the present invention. The present invention also proposes a video sensor coverage optimization device based on a three-dimensional perception model, applied to the video sensor coverage optimization method based on a three-dimensional perception model provided in the above embodiments of the present invention. For specific implementation details, please refer to the above description, which will not be repeated here. The device includes:
[0094] Data acquisition module 201 is used to acquire the area to be monitored, A, which includes L cameras;
[0095] The model building module 202 is used to build a 3D perception model of the i-th camera, obtain the coverage range of the camera in the area to be monitored A, and obtain the coverage range of L cameras in the area to be monitored A.
[0096] Data processing module 203 is used to discretize the area to be monitored A and obtain the discretized target point set Ω; and to obtain the target point set H(t) covered by L cameras in the area to be monitored.
[0097] The data calculation module 204 is used to obtain the coverage of the area A to be monitored based on the target point set Ω and the target point set H(t);
[0098] The data optimization module 205 is used to optimize the coverage of the area to be monitored based on the particle swarm optimization algorithm and the gradient algorithm; wherein, the initial population of the particle swarm optimization algorithm is generated using elite back-learning.
[0099] The result acquisition module 206 is used to obtain the optimized coverage of the area to be monitored.
[0100] In an optional embodiment of the present invention, video sensor coverage optimization is achieved through the following process.
[0101] Construct a 3D perception model;
[0102] Specifically, the monitoring area A is acquired, which includes L cameras. Each camera has K variables, such as camera position, rotation direction, and pitch angle. The L cameras have a total of m = K·L variables, and t = (t1, t2, ..., t...). m Let t be the state variable of the camera, where t (i-1)K+1 ,t (i-1)K+2 ,…,t iK Let A be the coverage area of the i-th camera in the area A to be monitored. i (t), taking the first camera as an example, its spatial perception model is given. The camera perception model is a simplified model based on the principles of pinhole imaging and perspective projection.
[0103] Obtain the position S(x,y,z) of the i-th camera in 3D space; obtain the main sensing direction C = (γ,θ) of the i-th camera; where γ is the pitch angle and θ is the rotation angle; the main sensing direction is decomposed into horizontal and vertical components; obtain the horizontal field of view 2α and the vertical field of view 2β of the i-th camera; construct the 3D perception model of the i-th camera using the position S(x,y,z), the main sensing direction C = (γ,θ), the horizontal field of view 2α, and the vertical field of view 2β.
[0104] It should be noted that in existing technologies, the coverage area of a camera is an isosceles trapezoid, while in this embodiment, the camera coverage area is a ring-shaped sector. This means that the main sensing direction of the 3D perception model is decomposed into horizontal and vertical components. When only the horizontal component is considered, the model degenerates into a directionally adjustable 2D sector-shaped perception model. Due to the constraint of the main sensing direction in the vertical direction, the sector-shaped coverage area formed on the 2D horizontal plane is divided into two parts: a blind zone and a covered area. In this embodiment, the blind zone is a sector-shaped area with radius r1, and the covered area is a ring-shaped sector D1D2D3D4, with corresponding coordinates as follows:
[0105] D1(x+r1cos(θ+α),y+r1sin(θ+α))
[0106] D2(x+r1cos(θ-α),y+r1sin(θ-α))
[0107] D3(x+r2cos(θ-α),y+r2sin(θ-α));
[0108] D4(x+r2cos(θ+α),y+r2sin(θ+α))
[0109] Wherein, the inner radius r1 and outer radius r2 of the annular sector region are respectively:
[0110] r1 = z × tan(γ - β)
[0111] r2 = z × tan(γ + β);
[0112] For any target point p(x0, y0) in space, if the target point is covered by the camera at any time, the following two conditions must be met:
[0113] 1. The Euclidean distance between point p(x0,y0) and the projection point s'(x,y) of the camera on the horizontal plane is no greater than r2 and no less than r1; that is, r1≤d(s',p)≤r;
[0114] 2. The horizontal component of the main perceived direction The included angle is no greater than α; that is, in,
[0115] By restricting the target point, the coverage area A of the i-th camera in the area to be monitored is obtained. i (t), whose expression is:
[0116]
[0117] Similarly, using the method described above, the total coverage area of L cameras can be obtained.
[0118] Obtain the coverage rate of the area to be monitored, A;
[0119] Specifically, to efficiently calculate camera coverage, the continuous area coverage problem is transformed into the coverage of a discrete set of target points within the area; that is, the area to be monitored, A, is discretized to obtain the discrete set of target points Ω, where G is the number of target points. If a target point falls within the sensing area of any camera, it is covered by at least one camera, and the probability of the target point being monitored is 1; otherwise, it is 0. When the camera state variable is t, the state in which target point j is covered by a camera is represented by a:
[0120]
[0121] Where i∈{1,2,…,L};
[0122] Obtain the set H of target points in the monitoring area A that are covered by i cameras. i (t), whose expression is:
[0123] H i (t)={j|a ij (t)=1,j∈Ω};
[0124] Obtain the set H(t) of target points covered by L cameras in the area A to be monitored, expressed as:
[0125]
[0126] Obtain the set of target points in the monitored area A that are covered by the i-th camera and cannot be covered by other cameras. Its expression is:
[0127]
[0128] When the camera state variable is t, the coverage rate f of the entire monitored area A is represented by the ratio of the total number of covered target points to the total number of target points in monitored area A, and its expression is:
[0129]
[0130] Where |·| represents the number of elements in the set;
[0131] Furthermore, the coverage optimization problem is transformed into the following expression:
[0132]
[0133] Here, Q is the feasible region of the state variable t.
[0134] Improved particle swarm optimization and gradient descent algorithms;
[0135] Specifically, the problem of covering optimization is difficult to solve due to the large dimensionality of the variables. In this embodiment, the problem is solved by improving the particle swarm optimization algorithm and embedding an improved gradient method.
[0136] The standard Particle Swarm Optimization (PSO) algorithm is an optimization algorithm that uses each feasible solution to an optimization problem as a bird in the search space, called a particle. In each iteration, a particle updates itself by tracking the individual best point (pbest) and the swarm best point (gbest).
[0137] First, an initial population for the particle swarm optimization algorithm is generated using elite back-learning.
[0138] Before optimizing the algorithm iteration, population information is usually generated randomly. Due to the lack of prior knowledge, the random initial population distribution is chaotic and somewhat blind, which affects the optimization speed to some extent. To solve the problem of the impact of the random distribution of the initial population on the algorithm performance, this embodiment uses an elite back-learning strategy to generate a new initial population to improve the algorithm's solution performance.
[0139] In the solution space, N particles are randomly generated as the initial population, and the number of individuals in the population is X. o (o=1,2,…,N):
[0140] Obtain the reverse population corresponding to the initial population
[0141] The initial population X o Fitness value and reverse population The fitness values of the individuals are compared, and the population with the higher fitness value is selected as the final initial population. The expression for this is:
[0142]
[0143] Where, f(X) o f(X) represents the fitness value of the initial population. o * ) represents the fitness value of the reverse population.
[0144] Secondly, adaptive inertia weights are introduced into the particle swarm algorithm;
[0145] In standard particle swarm optimization (PSO) algorithms, the inertia weight is typically a constant. A larger inertia weight *w* is beneficial for global search, while a smaller inertia weight *w* is beneficial for local search. A suitable inertia weight can balance the capabilities of both global and local search. In this embodiment, the PSO algorithm introduces an adaptive inertia weight, making its value related to the fitness value. When an individual's fitness value is less than the average fitness value, it indicates that the individual is far from the maximum value, requiring an expanded search range; in this case, a larger inertia weight is used. Conversely, when an individual's fitness value is greater than the average fitness value, it indicates that the individual is close to the maximum value, requiring a narrowed search range for local search; in this case, a smaller inertia weight is used. In each iteration, each particle corresponds to an adaptive inertia weight, the expression of which is:
[0146]
[0147] in, Let $\int_i$ be the inertia weight corresponding to particle $o$ in the $k$-th iteration. The maximum fitness value of all individuals in the k-th iteration. Let $\frac{ ... Let be the fitness value of particle o in the k-th iteration.
[0148] During each iteration, the population particles update their own velocity and state variables, expressed as follows:
[0149]
[0150] Where o is any swarm particle (o = 1, 2, ..., N), n is any camera parameter (n = (1, 2, ..., m), w is the inertial weight, h1 and h2 are acceleration factors, and b1 and b2 are uniformly distributed random numbers between 0 and 1. Let $\frac{0}{k+1}$ be the velocity of particle $o$ in the population at the (k+1)th iteration. Let $\mathbf(t)$ be the state variable of the $o$-th particle in the $k+1$-th iteration. For the historical optimal point of the population particles, v is the global optimum found so far for swarm particles. o =(v o1 ,v o2 ,…,v om ), u o =(u o1 ,u o2 ,…,u om ).
[0151] Finally, the gradient algorithm was improved;
[0152] Specifically, in this embodiment, based on the current solution, an increment is assigned to the independent variable, and the partial increment of the objective function is calculated. The direction of iteration is determined according to the sign of the partial increment.
[0153] Set the current point as
[0154] Where, Δt c z represents the increment of each component in the independent variable. c Let be an s-dimensional vector with the c-th component being 1 and all other components being 0. Then the c-th partial increment can be expressed as Δf. c (t (e) )=f(t (e) +Δt c z c )-f(t (e) To avoid the iteration process exceeding the feasible region, it is stipulated that when... When, Δf c (t (e) Given that ) = 0, the iterative algorithm is constructed as follows:
[0155]
[0156] Δf c (t (e) )=f(t (e) +Δt c z c )-f(t (e) );
[0157] Wherein, f(t) in the above formula (e) +Δt cz c ) and f(t) (e) The result can be directly calculated using the monitored area A mentioned above. However, each iteration requires judging whether each target point is covered when calculating each partial increment, resulting in high time complexity for calculating Δf using this method. This application uses the following method to calculate the partial increment Δf. c First, let the c-th component of the independent variable be a parameter of the l-th camera, where...
[0158]
[0159] Calculate the difference between the following two parts: one part is the target points that are not covered by any camera at the initial time, assuming the camera parameters at the initial time are t. (e) , in t c There is an increment Δt c Afterwards, the number of these target points covered by the l-th camera is Y1, and the camera parameters at this time are t. (e) +Δt c e c The other part consists of target points initially covered only by the l-th camera, at time t. c After the increment, the number of these target points that are not covered by the l-th camera is Y2.
[0160] Therefore, Ω un (t (e) H represents the target point that is not covered by any camera. l 0 (t (e) () represents the target point that is only covered by the l-th camera.
[0161] The c-th partial increment Δf(t) (e) The expression for obtaining ) is:
[0162] Δf c (t (e) )=Y1(t (e) )-Y2(t (e) )
[0163]
[0164]
[0165] Among them, Y1(t) (e) ) is t = t (e) The target point that is not covered by any camera at time t = t (e) +Δt c z c The number of target points covered by the l-th camera is the net increase in coverage; Y2(t)(e) ) is the number of target points that are only covered by the l-th camera and are not covered by it at t = t (e) +Δt c z c when, which is the number of target points with a net reduction in coverage.
[0166] The improved gradient algorithm is as follows:
[0167] Input parameters: maximum number of iterations mb, fitness value increment threshold η = 0.0001, step size threshold ε = 0.01, fitness function is known.
[0168] Output: various parameters of the camera and the fitness value.
[0169] Function [t * , f * = Igradient(t) is the value of each parameter after iterative optimization with the parameter t of the camera as the initial value of the improved gradient algorithm.
[0170] Step 1, e = 0, t (0) = t.
[0171] Step 2, if e < mb, go to Step 3 after execution; otherwise, go to Step 6.
[0172] Step 3, calculate Δf(t (e) ).
[0173] Step 4,
[0174] Step 5, if f(t (e+1) ) > f(t (e) ) + η, then t (e+1) = t (e) , e = e + 1, go to Step 2 after execution; otherwise λ = λ / 2, if λ > ε, meet the condition and go to Step 4, if λ ≤ ε, go to Step 6.
[0175] Step 6, output the parameter t * = t (e+1) and the fitness value f * = f(t * ).
[0176] In summary, the process of finding the optimal coverage rate using the improved particle swarm algorithm and the improved gradient algorithm (PSG) is as follows.
[0177] A global search is performed using an improved particle swarm optimization (PSO) algorithm. When the conditions set by the PSO algorithm (a certain number of iterations or a certain precision) are met, the currently obtained individual historical optimal point (or swarm optimal point) is used as the initial value for the improved gradient algorithm for iterative optimization. After the conditions set by the improved gradient algorithm are met, the currently updated individual historical optimal point (or swarm optimal point) is used for PSO iteration. After the conditions set by the PSO algorithm are met again, the result of the PSO algorithm is used as the initial value for the improved gradient algorithm for optimization, and the result of the improved gradient algorithm is used for PSO iteration. This process is repeated until the termination condition of the PSO algorithm is met, and the current swarm extreme value is output as the optimal value of the objective function. The specific steps of the hybrid algorithm are as follows:
[0178] Step 1: Initialize the target points, including G, the state variables of the L cameras are t, the population size is N particles, randomly initialize the initial value of the population, use formula (2) to generate a new initial population, set the maximum number of iterations of the population mc, it = 0, and the threshold μ = 0.01.
[0179] Step 2: Use formula (1) to calculate the current fitness value of each particle and find the historical best value pbest for each individual. o (o=1,2,…,N) and the global optimum gbest.
[0180] Step 3: If it ≤ mc, proceed to step 4; otherwise, proceed to step 7.
[0181] Step 4: For particle numbers o, from 1 to N.
[0182] Step 4.1: Update the particle's state variables using formula (3), calculate the particle's current fitness value, and update pbest. o And gbest.
[0183] Step 4.2, put pbest o As initial values for improving the gradient algorithm, iterative optimization.
[0184] Step 5 The global optimum at this moment is obtained by using the historical optima of individuals in the population. Compare And the fitness value of gbest, if but Otherwise, pbest o =pbest o , gbest = gbest.
[0185] Step 6: it = it + 1, after which proceed to step 3.
[0186] Step 7: Output the global optimum gbest.
[0187] In an optional embodiment of the present invention, in order to verify the effect of the PSG algorithm provided in the above embodiment on camera coverage, a simulation experiment was conducted using MATLAB R2018b, and a comparative experiment was conducted with random deployment, improved artificial bee colony (JABC) algorithm and particle swarm (PSO) algorithm, thereby demonstrating that the algorithm provided in this embodiment is effective in camera coverage optimization.
[0188] Due to the large number of optimization parameters in the 3D model, and considering that the camera installation height is usually no less than 3.5m, and that cameras of the same model generally have the same installation height, the height z and pitch angle γ of each camera will be fixed in the experiment. The camera parameters used are shown in Table 1. In the following experiments, each camera has three parameters to be optimized. In the xoy plane, two parameters are related to the position, and the other is the rotation angle θ, corresponding to λ values of (0.75, 0.75, 0.09). The experiment uses irregular quadrilaterals and regular annexes as the monitoring area. Isomorphic cameras are randomly deployed in the monitoring area, and the initial position and orientation of each camera are random. This invention will improve the camera coverage by adjusting the sensing direction and position of each camera.
[0189] Table 1 Camera Parameters
[0190]
[0191] Experiment 1 uses an irregular quadrilateral as the monitoring area. Four points are selected within a 40m × 40m matrix as the vertices of the irregular quadrilateral. In the experiment, these four vertices are (9, 3), (35, 0), (37, 40), and (2, 37). Ten cameras are randomly placed within the rectangular area on a horizontal surface 5m high. Given r² = 5 × tan(γ + β), (γ + β) < 90°. The selected cameras have a vertical field of view of 2β of 53°, therefore the pitch angle should not exceed 63.5°. The experiment uses a pitch angle of 45° and a rotation angle θ ∈ [0, 2π]. The simulation results are shown in Figure 4. Figure 4(a) shows the initial random deployment of the cameras provided in this embodiment, Figure 4(b) shows the standard particle swarm algorithm deployment provided in this embodiment, Figure 4(c) shows the bee colony algorithm deployment provided in this embodiment, and Figure 4(d) shows the PSG deployment provided in this embodiment.
[0192] from Figures 4(a) to 4(d)As shown, compared to the initial conditions, the coverage of the camera optimized by the Particle Swarm Optimization (PSO) and Bee Swarm Optimization (BSO) algorithms is improved to some extent. However, overlapping coverage areas and blind spots still exist in the monitoring area due to uneven camera distribution. After optimization by the algorithm in this embodiment, the camera distribution is more uniform, and the overlapping coverage areas and blind spots are greatly reduced. The coverage rate of the PSG algorithm provided in this embodiment is 94.96%, which is 11.04% higher than the JABC algorithm and 14.22% higher than the PSO algorithm. It can be clearly seen from Figure 4(d) that the area coverage effect of the improved algorithm is significantly improved compared to the other two algorithms. In addition, to compare the convergence speed of the algorithms, please refer to [link to relevant documentation]. Figure 5 , Figure 5 The graphs show the iteration curves of the three algorithms provided in this embodiment of the invention. As can be seen from the graphs, the algorithm provided in this embodiment has the fastest convergence speed and the highest algorithm accuracy.
[0193] Experiment 2 uses a regular circular ring as the monitoring area; the inner radius of the ring, i.e., the blind zone radius, is r1, and the outer radius is r2. The horizontal field of view 2α of the camera is set to 60°. The circular area is covered by six annular sectors with a central angle of 60°, achieving 100% coverage in the ideal state. To verify the effectiveness of the algorithm provided in this embodiment in camera coverage, six cameras are randomly deployed. The PSG algorithm is used to optimize the parameters of the randomly deployed cameras. The coverage is compared with the ideal state, and also with random deployment, the JABC algorithm, and the PSO algorithm. Please continue reading... Figures 6(a) to 6(d) As shown, Figure 6(a) is a schematic diagram of random deployment of simulation results provided in an embodiment of the present invention, Figure 6(b) is a schematic diagram of JABC simulation results provided in an embodiment of the present invention, Figure 6(c) is a schematic diagram of PSO simulation results provided in an embodiment of the present invention, and Figure 6(d) is a schematic diagram of PSG simulation results provided in an embodiment of the present invention. See Table 2 for further details.
[0194] Table 2 Coverage of the same number of nodes using different algorithms
[0195]
[0196] Under the same conditions of the number of cameras, parameters, and number of iterations, as shown in Figure 6, the PSG algorithm covers almost the entire monitoring area. Compared with the PSO algorithm and the JABC algorithm, the PSG algorithm has the advantages of covering a larger area and having a better coverage effect.
[0197] To further verify the effectiveness of the PSG algorithm in camera coverage, the Experiment 1 scenario was used again. The coverage rate of the PSG algorithm was compared with that of two other algorithms under different numbers of cameras, with other parameters remaining constant. The experimental results are shown in Table 3. To facilitate comparison of the differences in the algorithm's coverage optimization effect under varying camera numbers, the relationship between the number of cameras and coverage rate was plotted as a curve. Please refer to [link to relevant documentation]. Figure 7 , Figure 7 This is a schematic diagram illustrating the relationship between the number of cameras and coverage provided in an embodiment of the present invention.
[0198] Table 3 Coverage rates for different quantities
[0199]
[0200] From Table 3 and Figure 7 It can be seen that the coverage is low when the number of cameras is small, and the coverage increases as the number of cameras increases; regardless of the number of cameras, the coverage of the PSG algorithm is higher than that of the JABC and PSO algorithms. Figure 7 As shown, the slope of the broken line represents the camera utilization rate. With an increase in the number of cameras, the utilization rate decreases across the board, and the coverage rate increases slowly. This is because, with the monitoring area remaining constant and the number of nodes increasing, more overlapping coverage areas are created, a phenomenon consistent with reality. However, the utilization rate of the PSG algorithm decreases at a lower rate than that of JABC and PSO, indicating that the PSG algorithm has stronger overall search capabilities and, under the same conditions, exhibits better camera utilization and coverage.
[0201] In this embodiment, a hybrid algorithm combining improved particle swarm optimization and improved gradient optimization is applied to solve the video sensor coverage enhancement problem, taking into account the camera's unique 3D directed perception model. This algorithm utilizes the global search characteristics of particle swarm optimization and the local search characteristics of gradient optimization, using the historical extreme points of each individual as the initial values for the improved gradient algorithm during iteration. This enhances the local search capability of the particle optimization algorithm and accelerates its convergence speed. Furthermore, experimental results show that the algorithm provided in this embodiment outperforms traditional algorithms in both improving video sensor coverage and algorithm convergence, effectively improving camera coverage.
[0202] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations are intended to cover non-exclusive inclusion, such that an article or device comprising a list of elements includes not only those elements but also other elements not expressly listed. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the article or device comprising said element. Terms such as "connected" or "linked" are not limited to physical or mechanical connections but can include electrical connections, whether direct or indirect. The orientations or positional relationships indicated by terms such as "upper," "lower," "left," and "right" are based on the orientations or positional relationships shown in the accompanying drawings and are used only for the convenience of describing the invention and for simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be construed as limiting the invention.
[0203] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features or characteristics described may be combined in any suitable manner in one or more embodiments or examples. In addition, those skilled in the art can combine and integrate the different embodiments or examples described in this specification.
[0204] The above description, in conjunction with specific preferred embodiments, provides a further detailed explanation of the present invention. It should not be construed that the specific implementation of the present invention is limited to these descriptions. For those skilled in the art, various simple deductions or substitutions can be made without departing from the concept of the present invention, and all such modifications and substitutions should be considered within the scope of protection of the present invention.
Claims
1. A video sensor coverage optimization method based on a three-dimensional perception model, characterized in that, include: Obtain the area to be monitored The area to be monitored Includes One camera; Construct the first A 3D perception model of a camera is obtained to capture the image of the camera in the area to be monitored. Coverage range; Get One camera is in the area to be monitored. Coverage range; The area to be monitored Discretize to obtain the discretized target point set. ; Obtain the area to be monitored Set of target points covered by a camera ; Based on the target point set and target point set Obtain the area to be monitored. Coverage rate; Based on the particle swarm optimization algorithm and gradient algorithm, the coverage of the area to be monitored is optimized, including: The initial population for the particle swarm optimization algorithm is generated using elite back-learning, including... One particle, set the maximum number of iterations. Adaptive inertia weights and thresholds Each particle includes The parameters of the camera to be optimized; For the current iteration number Update the velocity and state variables of each particle, calculate the current fitness value of each particle based on the updated state variables, and find the 0th to 1st fitness value. The historical optimal point of each particle in each iteration and the global optimum Wherein, the fitness value is the area to be monitored. Coverage rate; The optimal point of each particle's history Used as initial values for iterative optimization in gradient algorithms. Set the maximum number of iterations. Fitness value increment threshold and step size threshold ; Regarding the current iteration number of the gradient algorithm Calculate the coverage rate of the area to be monitored corresponding to the first... The partial increment is expressed as follows: ; in, The increments of each component in the independent variable are given. For the first One component is 1, and all other components are 0. dimensional vector, , The area to be monitored; wherein, the first Individual partial increment The expression for obtaining it is: ; in, for The target point that was not covered by any camera, and When was the first The number of target points covered by each camera is the net increase in coverage. For only the first The target points covered by the cameras are The number of target points that are not covered by it is the net reduction in the number of target points covered. For target points that are not covered by any camera, For only the first The target point covered by each camera For the first The target point covered by each camera For the first One target point; Based on the sign of the partial increment, the direction of gradient algorithm iteration is determined, and the algorithm moves along the gradient direction, expressed as: ; in, For the current point, For the next point, The iteration step size, It is a partial increment, among which, , The dimension is biased towards incrementality; if ,but , If the gradient algorithm iteration continues, proceed to the next iteration; otherwise... ,if If so, continue moving along the gradient direction; if Then output and fitness value ; Obtain the historical optimal point for each particle The corresponding gradient optimization optimal point Igradient Calculate the gradient optimization global optimum among all particles. ,if ,but , ;otherwise, , ; Execute the next iteration number The process continues until convergence or the maximum number of iterations is reached, obtaining the optimized coverage of the monitored area.
2. The video sensor coverage optimization method based on a three-dimensional perception model according to claim 1, characterized in that, The construction of the first The 3D perception model of each camera includes: Get the The position of each camera in three-dimensional space ; Get the The main sensing direction of each camera ;in, The pitch angle, Let be the rotation angle; where the main sensing direction is decomposed into a horizontal component and a vertical component; Get the The horizontal field of view of each camera and vertical field of view ; Using position in three-dimensional space Main perception direction Horizontal field of view and vertical field of view Construct the first A 3D perception model of a camera.
3. The video sensor coverage optimization method based on a three-dimensional perception model according to claim 1, characterized in that, The acquisition of the first One camera is in the area to be monitored. Coverage in include: According to the A 3D perception model of a camera is used to obtain the coverage area of a ring-shaped sector, that is, the area covered by the camera in the area to be monitored. Coverage range; Based on the coverage area of the annular sector, the target points within the camera's coverage area are obtained, expressed as follows: ; in, For any point in space , The first radius of the annular sector. The second radius of the annular sector. For the first The projection point of each camera on the horizontal plane , , The horizontal component of the primary perception direction.
4. The video sensor coverage optimization method based on a three-dimensional perception model according to claim 1, characterized in that, The process of obtaining the coverage of the area to be monitored includes: Obtain the area to be monitored Discretized target point set , The number of target points; determine the target point set. The first in Whether a target point is covered by any camera is represented by 1 if it is covered and 0 otherwise. The expression is as follows: ; in, , For the first The state variables of each camera; Obtain the area to be monitored China Set of target points covered by a camera Its expression is: ; Obtain the area to be monitored China Set of target points covered by a camera Its expression is: ; Obtain the area to be monitored The coverage rate is expressed as: ; The area to be monitored The coverage optimization problem is transformed into the following expression: ; in, State variables The feasible domain.
5. The video sensor coverage optimization method based on a three-dimensional perception model according to claim 1, characterized in that, The initial population generated using the elite back-learning particle swarm optimization algorithm includes: In the solution space, random generation 10 particles form the initial population, and the population consists of 10 individuals. , : Obtain the reverse population corresponding to the initial population ; Initial population Fitness value and reverse population The fitness values of the individuals are compared, and the population with the higher fitness value is selected as the final initial population. The expression for this is: ; in, This represents the fitness value of the initial population. This represents the fitness value of the reverse population.
6. The video sensor coverage optimization method based on a three-dimensional perception model according to claim 1, characterized in that, It also includes: incorporating adaptive inertia weights into the particle swarm algorithm; The adaptive inertia weight for each particle in the population is obtained, and its expression is: ; in, For the first Sub-iteration particles The corresponding inertia weight, For the first The maximum fitness value of all individuals in the next iteration. For the first The average fitness value of all individuals in the next iteration. For the first Sub-iteration particles fitness value, This represents the maximum value of the inertia weight. This represents the minimum value of the inertia weight. During each iteration, the population particles update their own velocity and state variables, expressed as follows: ; in, For any group of particles, , For any camera parameter, For inertial weights, and These are acceleration factors, and A random number uniformly distributed between 0 and 1. For the first Population particles in the next iteration speed, For the first During the nth iteration The state variables of each particle For the historical optimal point of the population particles, It represents the global optimum of the population particles.
7. A video sensor coverage optimization device based on a three-dimensional perception model, used to implement the video sensor coverage optimization method based on a three-dimensional perception model as described in any one of claims 1 to 6, characterized in that, include: The data acquisition module is used to acquire the area to be monitored. The area to be monitored Includes One camera; The model building module is used to build the first... A 3D perception model of a camera is obtained to capture the image of the camera in the area to be monitored. Coverage range; Get One camera is in the area to be monitored. Coverage range; The data processing module is used to process the area to be monitored. Discretize to obtain the discretized target point set. ; Obtain the area to be monitored Set of target points covered by a camera ; The data calculation module is used to calculate the target point set. and target point set Obtain the area to be monitored. Coverage rate; The data optimization module is used to optimize the coverage of the area to be monitored based on the particle swarm optimization algorithm and the gradient algorithm, including: The initial population for the particle swarm optimization algorithm is generated using elite back-learning, including... One particle, set the maximum number of iterations. Adaptive inertia weights and thresholds Each particle includes The parameters of the camera to be optimized; For the current iteration number Update the velocity and state variables of each particle, calculate the current fitness value of each particle based on the updated state variables, and find the 0th to 1st fitness value. The historical optimal point of each particle in each iteration and the global optimum Wherein, the fitness value is the area to be monitored. Coverage rate; The optimal point of each particle's history Used as initial values for iterative optimization in gradient algorithms. Set the maximum number of iterations. Fitness value increment threshold and step size threshold ; Regarding the current iteration number of the gradient algorithm ,calculate The parameters to be optimized for the first camera correspond to the first... The partial increment is expressed as follows: ; in, The increments of each component in the independent variable are given. For the first One component is 1, and all other components are 0. dimensional vector, , The area to be monitored; wherein, the first Individual partial increment The expression for obtaining it is: ; in, for The target point that was not covered by any camera, and When was the first The number of target points covered by each camera is the net increase in coverage. For only the first The target points covered by the cameras are The number of target points that are not covered by it is the net reduction in the number of target points covered. For target points that are not covered by any camera, For only the first The target point covered by each camera For the first The target point covered by each camera For the first One target point; Based on the sign of the partial increment, the direction of gradient algorithm iteration is determined, and the algorithm moves along the gradient direction, expressed as: ; in, For the current point, For the next point, The iteration step size, It is a partial increment, among which, , The dimension is biased towards incrementality; if ,but , If the gradient algorithm iteration continues, proceed to the next iteration; otherwise... ,if If so, continue moving along the gradient direction; if Then output and fitness value ; Obtain the historical optimal point for each particle The corresponding gradient optimization optimal point Igradient Calculate the gradient optimization global optimum among all particles. ,if ,but , ;otherwise, , ; Execute the next iteration number Continue until convergence or the maximum number of iterations is reached; The results acquisition module is used to obtain the optimized coverage of the area to be monitored.
Citation Information
Patent Citations
Hybrid global optimization method
CN108133258A
Remote sensing and monitoring global target space coverage optimization method
CN113453183A
PID controller parameter setting method, system and device and storage medium
CN114637191A
Multi-sensor network collaborative deployment method and device based on improved particle swarm optimization
CN114827929A