✅作者简介:热爱科研的Matlab仿真开发者,修心和技术同步精进,代码获取、论文复现
✅作者简介:热爱科研的Matlab仿真开发者,擅长数据处理、建模仿真、程序设计、完整代码获取、论文复现及科研仿真。
🍎 往期回顾关注个人主页:Matlab科研工作室
🍊个人信条:格物致知,完整Matlab代码及仿真咨询内容私信。
🔥 内容介绍
1- Introduction
First, we introduce the articles used for this work and then we explain the implementations for the algorithms. Finally, we test and compare the results. The problems is follows: We have 2 images captured by the same or different cameras at different positions and rotations (poses). We want to estimate the relative orientation between these two poses from the 2 captured images. In this problem, we know the intrinsic parameters of the cameras, but we don’t have any knowledge about the scene. The general flow is like this:
·Estimate some camera poses with five-point algorithm as the initial solutions of the swarm algorithm. We do it by repeating the five-point algorithm multiple times by choosing random matched points.
·Then, we apply the Grey Wolf Optimizer over the solutions until certain iterations. We choose the alpha wolf as the best solution.
For finding the feature points and matching them, we use the SURF algorithm. For the fitness function we use an innovative way the calculated the distances of the match points on the assumed second camera
2- Improving Camera Pose Estimation Using Swarm Particle Algorithms
Camera pose estimation has been a common problem in the field of computer vision. There have been introduced many methods to solve it. They all propose valid solutions and estimate good poses for the cameras, but they may or may not be good enough. The proposed method in that article aims to improve those solutions by evolutionary algorithms (EA) or swarm algorithms (SA) to find the optimum solution in the search space.
It first describes some of the EA and SA algorithms that it wants to apply on the pose estimation including the Genetic Algorithm, Particle Swarm Optimization, Grey Wolf Optimization, Improved Grey Wolf Optimization, and Whal Optimization. Then, it compares the results of these algorithms on the SPIN Lab dataset by best obtained score, mean square error, and computation time. Finally, it concludes that the IGWO performs best in finding the optimum solution and requires most computation time.
1- An Efficient Solution to the Five-Point Relative Pose Problem
This article tries to find the essential matrix by giving five matched points between two images and knowing the intrinsic parameters of the cameras. It solves a tenth-degree polynomial equation to find the coefficients.
Note that in this report, we use a different five-point algorithm from what the Elashry and Toth [1] used in its experiments.
2- Grey Wolf Optimizer
This algorithm Mirjalili, Mirjalili [2] aims to simulate the hunting behavior of the grey wolfs who move in a pack usually consists of 5-12 members. It considers each wolf as candidate solution and the prey as the best solution trying to find. It first categorizes the wolfs into a hierarchy of ranks that determines how the wolfs will move in the search space. There are leader wolfs from the top to the bottom named alpha, beta, and delta wolfs. There is only one of each rank. They are considered as the best three solutions found so far. These leaders are assumed to know the most probable position for the prey. They are responsible for pursuing the solution and leading the pack. The other wolfs are called omega and the move according to the movement of the leaders and some randomness. They follow this pattern until they encircle and hunt the prey.
Figure 4: Hierarchy of grey wolf (dominance decreases from top down)
The method consists of different aspects:
2-1- Encircling
The wolves try to close the prey. So, they need to decrease their distance from the prey over time. It controls this closing with A and C vectors. The Xp is the position of the prey and the X(t) is the position of the wolf. On each iteration, the wolf updates its position to get closer to the prey.
1-1- Attacking
When the coefficient |A| is less than 1, is makes the wolf to close the prey. When it’s greater than 1, it makes the wolf to gets farther from the prey for searching and exploration. The a coefficient is decreasing from 2 to 0. So, the A is in the range [-a,a]. This means the |A| coefficient is slowly decreasing and finally causing the wolves to reach the prey.
1-2- Searching
When the |A| > 1, it forces the wolves to diverge and search for the prey. Also, the C coefficient has random values in the range [0, 2], so, sometimes the C > 1 and sometimes C < 1. This allows more randomness during exploration and allows avoiding the local optima better. This means the wolves sometimes close the prey and sometimes search for the prey.
1-3- Algorithm
The algorithm of the Grey Wolf Optimizer is as follows:
Initialize the grey wolf population Xi (i = 1, 2, ..., n)
Initialize a, A, and C
Calculate the fitness of each search agent
Xα=the best search agent
Xβ=the second best search agent
Xδ=the third best search agent
while (t < Max number of iterations)
for each search agent
Update the position of the current search agent by equation (3.7)
end for
Update a, A, and C
Calculate the fitness of all search agents
Update Xα, Xβ, and Xδ
t=t+1
end while
return Xα
First, an initial population of the wolves is created. Then we initialize the coefficients a, A, and C. Then we calculate the fitness of all the wolves and chose the best 3 candidates as the alpha, beta, and delta. Then, we start the iterations by first updating the positions of the wolves according to the leader wolves. Then we repeat updating the coefficients, calculating the fitness and choosing the new leaders. We repeat it until some criteria or maximum number of iterations. Then, the alpha is chosen as the best answer.
2- Fitness Function
To give a fitness value to each candidate relative pose, we need to define a value that describes how accurate is this pose if it was the pose for the second camera. The matched points found by the SURF algorithm tell us that they are the same points in the 3D space. So, we simulate reconstructing those points in the 3D space and examine how feasible it is. For each matched point in the first camera, we find a ray emitting from the camera origin toward a that pixel on hypothetical plane in front of that camera in the pinhole camera model. This ray will cross the real point the 3D space. We do the same for that matched point on the second image with assumed second camera pose. Then, we determine how close these to rays are by finding the distance between those lines. We repeat this process for all matched points and give the sum of those distances as the fitness value for that candidate relative pose (solution). Because the GWO algorithm tries to find a solution with the minimum fitness, the distance sum must also be minimized.
⛳️ 运行结果
🔗 参考文献
[1]Elashry, A. and C. Toth (2023). "IMPROVING CAMERA POSE ESTIMATION USING SWARM PARTICLE ALGORITHMS." Int. Arch. Photogramm. Remote Sens. Spatial Inf. Sci. XLVIII-M-3-2023: 87-93.
[2]Mirjalili, S., et al. (2014). "Grey wolf optimizer." Advances in engineering software 69: 46-61.
[3]Nister, D. (2004). "An efficient solution to the five-point relative pose problem." IEEE Transactions on Pattern Analysis and Machine Intelligence 26(6): 756-770.
[4]7 scenes data set. (n.d.). Retrieved from https://www.microsoft.com/en-us/research/project/rgb-d-dataset-7-scenes/
[5]SergioRAgostinho. "Five-Point Algorithm." from https://github.com/SergioRAgostinho/five_point_algorithm.
🎈 部分理论引用网络文献,若有侵权联系博主删除
👇 关注我领取海量matlab电子书和数学建模资料
🎁 私信完整代码和数据获取及论文数模仿真定制🌈
🌈 各类智能优化算法改进及应用
生产调度、经济调度、装配线调度、充电优化、车间调度、发车优化、水库调度、三维装箱、物流选址、货位优化、公交排班优化、充电桩布局优化、车间布局优化、集装箱船配载优化、水泵组合优化、解医疗资源分配优化、设施布局优化、可视域基站和无人机选址优化、背包问题、 风电场布局、时隙分配优化、 最佳分布式发电单元分配、多阶段管道维修、 工厂-中心-需求点三级选址问题、 应急生活物质配送中心选址、 基站选址、 道路灯柱布置、 枢纽节点部署、 输电线路台风监测装置、 集装箱调度、 机组优化、 投资优化组合、云服务器组合优化、 天线线性阵列分布优化、CVRP问题、VRPPD问题、多中心VRP问题、多层网络的VRP问题、多中心多车型的VRP问题、 动态VRP问题、双层车辆路径规划(2E-VRP)、充电车辆路径规划(EVRP)、油电混合车辆路径规划、混合流水车间问题、 订单拆分调度问题、 公交车的调度排班优化问题、航班摆渡车辆调度问题、选址路径规划问题、港口调度、港口岸桥调度、停机位分配、机场航班调度、泄漏源定位
🌈 机器学习和深度学习时序、回归、分类、聚类和降维
2.1 bp时序、回归预测和分类
2.2 ENS声神经网络时序、回归预测和分类
2.3 SVM/CNN-SVM/LSSVM/RVM支持向量机系列时序、回归预测和分类
2.4 CNN|TCN|GCN卷积神经网络系列时序、回归预测和分类
2.5 ELM/KELM/RELM/DELM极限学习机系列时序、回归预测和分类
2.6 GRU/Bi-GRU/CNN-GRU/CNN-BiGRU门控神经网络时序、回归预测和分类
2.7 ELMAN递归神经网络时序、回归\预测和分类
2.8 LSTM/BiLSTM/CNN-LSTM/CNN-BiLSTM/长短记忆神经网络系列时序、回归预测和分类
2.9 RBF径向基神经网络时序、回归预测和分类