登录
首页 » Matlab » 图像畸变校正

图像畸变校正

于 2022-06-12 发布 文件大小:367.95 kB
0 86
下载积分: 2 下载次数: 3

代码说明:

function gmodify(pic,uv,gm,og) %pic表示要处理的图像的路径文件名 %uv是一个二维矩阵,uv(:,1)代表上面提到的,uv(:,2)表示 %gm是一个二维矩阵,gm(j,:)代表在校正图空间上与uv(j,:)一一应的点 %og 代表对称中心,它是一个二维向量 a=imread(pic); b=double(a); n=size(gm(:,1)); for k=1:n%转换到以对称点为原点的空间关系并构造矩阵A A(k,:)=[1,gm(k,1)-og(1),gm(k,2)-og(2),(gm(k,1)-og(1)^2), (gm(k,1)-og(1))*(gm(k,2)-og(2)),(gm(k,2)-og(2) ^2)]; end [h,w]=size(b(:,:,1)); sp=zeros(h,w,3)+255; a0=pinv(A)* uv(:,2); %计算上面提到的地址映射的系数估计a b0=pinv(A)* uv(:,1); %计算上面中提到的地址映射的系数估计b for i=1:h %从理想图像矩阵出发处理 for j=1:w x=[1,j-og(1),i-og(2),(j-og(1))^2,(i-og(2))*(j-og(1)),(i-og(2))^2]; u=x*a0+og(2); % 逆向映射(j,i)到畸变图像矩阵(v,u) v=x*b0+og(1); if (u>1)&&(u1)&&(v

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • suijiguocheng
    这部分是用MATLAB产生随机过程的一系列源代码.含产生高斯分布随机变量,多变量高斯过程样本的产生,高斯--马尔科夫过程的产生等等..分别运行了这些程序.希望对大家有用(This is partly a random process generated by MATLAB source code of the series. Containing random variables have a Gaussian distribution, multivariate Gaussian process for selecting the sample, Gaussian- Markov process and so on .. have to run the procedure separately . everyone would like to be useful)
    2020-11-02 10:09:53下载
    积分:1
  • Sim
    very basic radar simulation
    2010-10-26 17:37:23下载
    积分:1
  • xinzifenxi
    因子分析求得共同度,因子贡献,因子贡献率,得分函数的系数(Factor analysis to achieve common degree, factor contribution coefficient factor contribution rate, scoring function)
    2014-09-02 19:06:14下载
    积分:1
  • dst_dct
    discrete sine or cosine transform using matlab
    2014-12-21 13:17:48下载
    积分:1
  • acontour---july-5--2006(1)
    Medicinal plants carry significant information for the development of human society and are considered as necessary resource for human well-being. Plants are of plenty of use as they form the base for food chain and a lot of medicines are derived plants. Plants are also vitally important for environmental protection. Two main plant aspects of plant taxonomy that play a vital role in these actions are the identification and classification of plants. Plant Identification is the determination of the identity of an unknown plant in comparison with previously collected specimen. The process of recognition connects the specimen with a botanical name. Once this connection is established, related details like name and other properties of the plant can be easily obtained.
    2015-03-16 15:53:08下载
    积分:1
  • Kalman
    this code give an implementation of kalman filter in matlab. the complete set of matlab tools useful for implementationof matlab are available with this file
    2012-01-31 18:17:10下载
    积分:1
  • The-The
    ICA MatLab Code Appendix D代码,或许对刚接触BSS的有点用(The ICA MatLab Code Appendix D Code, perhaps a little use on first contact BSS)
    2017-05-16 06:05:38下载
    积分:1
  • CWRU
    排列熵程序和实例,用于排列熵的学习和程序调试(Arrangement of entropy procedures and examples for the entropy of the learning and debugging process)
    2020-07-01 06:00:01下载
    积分:1
  • 功率谱
    说明:  利用此代码绘制声信号的功率谱,显示功率谱线。普通音频文件均可实现(Drawing power spectrum)
    2021-01-22 14:32:24下载
    积分:1
  • KFDA
    采用核费舍尔鉴别准则做的静态背景的运动目标分类(Fisher discriminant make use of nuclear static background moving target classification)
    2014-10-23 21:21:52下载
    积分:1
  • 696516资源总数
  • 106475会员总数
  • 7今日下载