# Optimization of DG-LRG Water Extraction Algorithm Considering Polarization and Texture Information
## 3 Optimized Local Region Growth Algorithm Considering Polarization and Texture Information
### Local Region Growth Criteria Based on Polarization and Texture Information
#### 3.3.3 Local Optimization Based on PSO  
As the above objective function does not have an analytical solution, we use the Particle Swarm Optimization (PSO) algorithm to search for local regions and determine the optimal solution. Particle swarm optimization is an optimization algorithm based on swarm intelligence, which abstracts the solution of optimization problems into the optimal state of particle motion. For this algorithm, we need to set the initial particles size M, the speed of the initial particles are  
\[\mathrm{V}(0)=\left(\mathrm{V}_{1}(0),\ldots\ldots,\mathrm{V}_{\mathrm{M}}(0) \right), \tag{10}\]  
and the initial positions are  
\[\mathrm{X}(0)=\left(\mathrm{X}_{1}(0),\ldots\ldots,\mathrm{X}_{\mathrm{M}}(0) \right), \tag{11}\]  
where \(\mathrm{V}_{\mathrm{i}}(0)\) and \(\mathrm{X}_{\mathrm{i}}(0)\) represent the initial velocity and initial position of the \(\mathrm{i}\mathrm{th}\) particle, respectively. The updated formulas for the velocity and position vectors of the particles are  
\[\mathrm{V}_{\mathrm{i}}(\mathrm{t})=\mathrm{k}\left[\begin{matrix}\mathrm{V}_{ \mathrm{i}}(\mathrm{t}-1)+\mathrm{C}_{\mathrm{I}}\mathrm{rand}(\mathrm{P}_{ \mathrm{i}}(\mathrm{t}-1)-\mathrm{X}_{\mathrm{i}}(\mathrm{t}-1))\\ +\mathrm{C}_{\mathrm{2}}\mathrm{rand}(\mathrm{G}(\mathrm{t}-1)-\mathrm{X}_{ \mathrm{i}}(\mathrm{t}-1))\end{matrix}\right], \tag{12}\]  
\[X_{i}(t)=\left[\mathrm{X}_{\mathrm{i}}(\mathrm{t}-1)+\mathrm{V}_{\mathrm{i}}( \mathrm{t})\right], \tag{13}\]  
where [*] denotes the rounding function, \"rand\" represents a random value within [0, 1], \(\mathrm{V}_{\mathrm{i}}(\mathrm{t})\) is the update speed of particle i in the \(\mathrm{t}\mathrm{th}\) iteration, which is required to be in the range (\(-\mathrm{V}\mathrm{max}\), \(\mathrm{V}\mathrm{max}\)), and \(\mathrm{V}\mathrm{max}\) is the maximum update speed (set in advance). Furthermore, the parameter k is the contraction factor (in this experiment, k = 0.742), and \(\mathrm{C}_{1}\) and \(\mathrm{C}_{2}\) are learning factors. \(\mathrm{C}_{1}\) controls the ability of particles to learn from themselves, while \(\mathrm{C}_{2}\) controls the ability of particles to learn from groups. The initial state X(0) and initial velocity V(0) of the particle swarm can be randomly selected, but it is required that X(0) is within the solution space and V(0) is within (\(-\mathrm{V}\mathrm{max}\), \(\mathrm{V}\mathrm{max}\)). \(\mathrm{P}_{\mathrm{i}}(\mathrm{t})\) represents the optimal position that particle i passed through during the \(\mathrm{t}\mathrm{th}\) iteration, while G(t) represents the optimal position that all particles passed through during the \(\mathrm{t}\mathrm{th}\) iteration in the process of finding the optimal solution. The optimal solution obtained within each local region is used as the growth criterion for water extraction, and all growth regions are merged to obtain the final water extraction result.