没有合适的资源?快使用搜索试试~ 我知道了~
Matlab有关LevenbergMarquardt算法实现照相机调焦-HW5_LM_handout.pdf
需积分: 25 5 下载量 69 浏览量
2019-08-13
02:24:30
上传
评论
收藏 68KB PDF 举报
温馨提示
Matlab有关LevenbergMarquardt算法实现照相机调焦-HW5_LM_handout.pdf 列文伯格-马夸特算法的例子 采用Levenberg-Marquardt算法实现照相机调焦,包括matlab例子代码 HW5_LM_handout.pdf Figure8.jpg Levenberg-Marquardt算法实现照相机调焦
资源推荐
资源详情
资源评论
1
A Memo on How to Use the Levenberg-Marquardt Algorithm
for Refining Camera Calibration Parameters
Pradit Mittrapiyanuruk
Robot Vision Laboratory, Purdue University, West Lafayette, IN, USA
mitrapiy@purdue.edu
This short note briefly explains how to implement the Levenberg-Marquardt (LM)
algorithm in MATLAB for the minimization of the geometric distance given by Equation
(10) of the Zhang’s report. For students who are not familiar with the LM method, we
suggest you visit the Wikipedia page
http://en.wikipedia.org/wiki/Levenberg-Marquardt_algorithm
For a more elaborate discussion of the LM method, the following references may be
useful
- Appendix 6 in the Hartley & Zisserman’s Book
- Section 9.4 in the Chong & Zak’s Book (the official textbook for ECE580)
- K. Madsen et al, “Methods for non-linear least squares problems”, IMM Lecture Note
2004, available on the web at
http://www2.imm.dtu.dk/pubdb/views/edoc_download.php/3215/pdf/imm3215.pdf
In the rest of this note, I will first demonstrate how to use the LM method to solve a
simple curve fitting problem and then I will give some clues that may help you to apply
the LM algorithm for the refinement of the camera calibration parameters in Homework
5.
Example: Curve fitting with the LM algorithm
Problem: Fit a set of point data {x
i
,y
i
} (x
i
=0, 0.1, …, 2*PI) with the function
*
f(x) = a*cos(bx)+b*sin(ax)
where a and b are the parameters that we want to estimate by the LM method. The
problem of finding the optimum can be stated as follows
,
1 2
argmin
[ ...... ] [ ( ; , )]
T
a b
T
n i i i
where d d d and d y f x a b
= = −
d d
d
*
This example, taken from Wikipedia, is interesting because the complexity of the fitted function would
preclude a linear least square solution to the problem.
2
The LM algorithm requires that you supply it with the Jacobian of the vector d. The
Jacobian is merely a matrix representation of all the first derivatives of the components of
the vector. For the example, the Jacobian of the vector d is given by the matrix
∂
∂
∂
∂
∂
∂
∂
∂
=
b
d
a
d
..
..
..
b
d
a
d
nn
11
J
The above minimization can be carried out with the following MATLAB steps:
1. Using the MATLAB symbolic toolbox, find the analytic form of the Jacobian of one
row of d with respect to the parameters a and b
syms a b x y real;
f=( a * cos(b*x) + b * sin(a*x))
d=y-f;
Jsym=jacobian(d,[a b]);
This MATLAB code returns the following symbolic expression
Jsym =[ -cos(b*x)-b*cos(a*x)*x, a*sin(b*x)*x-sin(a*x)]
Note that in the above MATLAB script the variable Jsym is a single row of the Jacobian
matrix J shown above. That is
∂
∂
∂
∂
=
b
d
a
d
ii
Jsym
2. Generate the synthetic data from the curve function with some additional noise
a=100;
b=102;
x=[0:0.1:2*pi]';
y = a * cos(b*x) + b * sin(a*x);
% add random noise
y_input = y + 5*rand(length(x),1);
3. The main code for the LM algorithm for estimating a and b from the above data
% initial guess for the parameters
a0=100.5; b0=102.5;
剩余9页未读,继续阅读
资源评论
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- weixin小程序项目电子竞技信息交流平台+ssm.zip
- 基于MPC的三相变流器设计及仿真,仿真平台基于MATLAB Simulink搭建 内含仿真文件,源代码,设计文档,仿真图 设计文档包括建模,各部分仿真模块设计,控制算法详解
- weixin小程序项目电子购物系统的设计与实现+ssm.zip
- weixin小程序项目电影院订票选座小程序+ssm.zip
- weixin小程序项目大学生闲置物品交易平台的分析与设计+ssm.zip
- weixin小程序项目大学生心理健康服务+ssm.zip
- weixin小程序项目电影院订票选座系统设计及实现+ssm.zip
- weixin小程序项目宠物小程序+ssm.zip
- weixin小程序项目传染病防控宣传系统的设计与实现+springboot.zip
- weixin小程序项目大学生就业平台微信小程序+ssm.zip
- weixin小程序项目畅阅读微信小程序+ssm.zip
- 依据双碳而产生的模型,低碳优化调度 以系统运行维护成本,购能等方向作为优化目标 通过模型计算使各部分能达到最优值 考虑设备有燃气轮机、余热锅炉、燃气锅炉、热泵、电制冷机、储电系统
- 00-【管理制度】07-企业师带徒培训管理制度.doc
- 01-【师带徒协议】03-师带徒协议书.doc
- 01-【师带徒协议】02-师带徒协议书.doc
- 01-【师带徒协议】04-导师辅导协议书(师带徒协议书).docx
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功