资源简介
matlab代码
实现了matlab平台下的极线校正算法
很有效 界面友好
代码片段和文件信息
function val = bilinear_interpolate(im rc)
%BILINEAR_INTERPOLATE performs bilinear interpolation.
%
% val = bilinear_interpolate(im rc) returns the bilinearly interpolated
% pixel values at the given list of positions rc.
%
% Input arguments:
% - im should be a m-by-n-by-3 (colour) image or a m-by-n (grey scale) image.
% - rc should be a 2-by-k matrix where k is the number of positions
% whose values are to be computed via bilinear interpolation. The first
% row of the matrix should contain the row-coordinates and the second row the
% column-coordinates of these positions. It is important that all the
% (rowcolumn)-positions stored in the matrix rc are within the boundary
% of the image im.
%
% Output argument:
% - val is the output k-by-3 (if image im has 3 colour bands) or k-by-1
% (if image im is a grey scale image) matrix containing the interpolated pixel
% values.
%
%Created July 2002.
%Last modified September 2003.
%
%Copyright Du Huynh
%The University of Western Australia
%School of Computer Science and Software Engineering
nrows = size(im1); ncols = size(im2);
% number of bands (3 for coloured images; 1 for gray scale images)
nobands = size(im3);
% check that all the entries in matrix rc are within the boundary of image im.
if sum(rc(1:) < 1 | rc(1:) > nrows | rc(2:) < 1 | rc(2:) > ncols)
error(‘bilinear_interpolate: elements of the rc matrix must be within the image boundary‘);
end
% The four corner points used in the bilinear interpolation:
% c4 c3
% +--------+
% | |
% | o | (a point o which is stored in a column vector of rc
% | | and the two corner points used for its bilinear interpoation)
% +--------+
% c1 c2
% The row-column coordinate system is used. All the corner points c1 c2 c3
% and c4 are two vectors whose 1st components contains the row coordinates
% and 2nd components contains the column coordinates.
% note that we should have given a small margin for variable rc
% so that the four corner pixels surrounding rc are within the
% image boundary of im. This condition should be enforced in the
% caller of this function.
c4 = (floor(rc));
c2 = (ceil(rc));
c3 = ([c4(1:); c2(2:)]);
c1 = ([c2(1:); c4(2:)]);
% d(diffRC_idx) = (rc(diffRC_idx) - c1) ./ (c4 - c1 + eps);
%
% the interpolation procedure above fails for those points in
% rc whose x- or y- component is a whole number (in which case
% the respective components of these points in the c1 and c4 matrices
% would be the same. the formula for d below would cause a division
% by zero problem.
sameC_idx = find(c2(2:) == c4(2:));
sameR_idx = find(c2(1:) == c4(1:));
diffRC_idx = find(c2(1:) ~= c4(1:) & c2(2:) ~= c4(2:));
% now the formula for d can be safely applied...
d(:diffRC_idx) = (rc(:diffRC_idx) - c4(:diffRC_idx)) ./ ...
(c2(:diffRC_idx) - c4(:diffRC_idx) + eps);
d(2s
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 3888 2003-12-05 10:27 极线矫正_很有效\bilinear_interpolate.m
文件 1584 2003-09-22 19:55 极线矫正_很有效\calib1.dat
文件 31395 2002-07-16 17:26 极线矫正_很有效\calib1.jpg
文件 1584 2003-09-22 19:55 极线矫正_很有效\calib2.dat
文件 29239 2002-07-16 17:26 极线矫正_很有效\calib2.jpg
文件 4247 2003-12-11 16:28 极线矫正_很有效\example.m
文件 9290 2005-06-28 15:27 极线矫正_很有效\fundmatrix_nonlin.m
文件 2242 2003-12-08 18:50 极线矫正_很有效\index.html
文件 423 2003-12-11 16:23 极线矫正_很有效\in_range.m
文件 921654 2000-11-03 18:05 极线矫正_很有效\j1.bmp
文件 220 2003-09-20 00:30 极线矫正_很有效\j1.dat
文件 921654 2000-11-03 18:05 极线矫正_很有效\j2.bmp
文件 220 2003-09-20 00:30 极线矫正_很有效\j2.dat
文件 1333 2003-12-11 16:23 极线矫正_很有效\kb_input.m
文件 5738 2005-07-14 14:31 极线矫正_很有效\lmeds.m
文件 6956 2005-07-13 10:46 极线矫正_很有效\lmeds_options.m
文件 502 1999-04-28 16:24 极线矫正_很有效\pflat.m
文件 1635 2003-12-11 16:28 极线矫正_很有效\rectification_angle.m
文件 1993 2003-12-11 16:28 极线矫正_很有效\rectification_H.m
文件 2492 2004-01-18 20:38 极线矫正_很有效\rectification_transf.m
文件 3040 2012-12-26 14:34 极线矫正_很有效\rectify_im.asv
文件 3040 2012-12-26 14:35 极线矫正_很有效\rectify_im.m
文件 4339 2003-12-11 16:28 极线矫正_很有效\rectify_images.m
文件 377 2003-12-02 17:29 极线矫正_很有效\skew.m
..A.SH. 16384 2013-01-16 20:34 极线矫正_很有效\Thumbs.db
目录 0 2013-04-25 20:25 极线矫正_很有效
----------- --------- ---------- ----- ----
1975469 26
相关资源
- matlab中关于三维重建的源代码,《计
- 东南大学计算机视觉实验报告二图像
- 三维重建sfm
- 区域增长(Region Growing)算法Matlab代码
- 光场深度估计MATLAB源代码
- 基于计算机视觉的图像分割算法的研
- 运动目标检测算法Matlab
- MATLAB计算机视觉与深度学习实战 完整
- 《数字图像处理-刚萨雷斯》图片素材
- Pearson-Digital Image Processing, 4th.Editio
- 回归学习算法
- 计算机视觉、图像处理、硬币识别
- matlab开发-RungeKuttaNystrom
- 区域增长(Region Growing)算法Matlab代码
- 四元数法计算两个物体之间的相对位
- Fusiello极线校正 - 论文和Matlab程序
- 基于matlab的车辆分类(更改图片集的
- MATLAB联合双边滤波代码.zip
- GMM 本代码建立高斯混合模型(高斯多
- stero 立体匹配
- matlab开发-FastFFTFunction
- matlab开发-块正交匹配跟踪
- k-means聚类学习算法matlab源码
- NMF 非负矩阵分解 图像重构
评论
共有 条评论