资源简介
这个代码用于数字图像处理中的图像拼接,几幅具有公共区域的图像可以拼接成一幅全图。
代码片段和文件信息
% Load images.
buildingDir = fullfile(toolboxdir(‘vision‘) ‘visiondata‘ ‘building‘);
buildingScene = imageDatastore(buildingDir);
% Display images to be stitched
montage(buildingScene.Files)
% Read the first image from the image set.
I = readimage(buildingScene 1);
% Initialize features for I(1)
grayImage = rgb2gray(I);
points = detectSURFFeatures(grayImage);
[features points] = extractFeatures(grayImage points);
% Initialize all the transforms to the identity matrix. Note that the
% projective transform is used here because the building images are fairly
% close to the camera. Had the scene been captured from a further distance
% an affine transform would suffice.
numImages = numel(buildingScene.Files);
tforms(numImages) = projective2d(eye(3));
% Iterate over remaining image pairs
for n = 2:numImages
% Store points and features for I(n-1).
pointsPrevious = points;
featuresPrevious = features;
% Read I(n).
I = readimage(buildingScene n);
% Detect and extract SURF features for I(n).
grayImage = rgb2gray(I);
points = detectSURFFeatures(grayImage);
[features points] = extractFeatures(grayImage points);
% Find correspondences between I(n) and I(n-1).
indexPairs = matchFeatures(features featuresPrevious ‘Unique‘ true);
matchedPoints = points(indexPairs(:1) :);
matchedPointsPrev = pointsPrevious(indexPairs(:2) :);
% Estimate the transformation between I(n) and I(n-1).
tforms(n) = estimateGeometricTransform(matchedPoints matchedPointsPrev...
‘projective‘ ‘Confidence‘ 99.9 ‘MaxNumTrials‘ 2000);
% Compute T(1) * ... * T(n-1) * T(n)
tforms(n).T = tforms(n-1)
相关资源
- 图像处理/图像分割实验/prewitt/robert
- 基于Graphcut的图像分割(Matlab)
- 蚁群算法用于图像的边缘检测
- matlab图像拼接
- 图像处理/图像分割实验/(自动)阈值
- 图像去噪的matlab代码
- ssim.m结构相似性代码matlab
- 图像滤波Matlab代码
- sfla
- Image_Steg
- image2data 曲线坐标提取
- RSIHE RSIHE算法(Recursive sub-image histog
- final-report-n-ppt
-
Matlab ba
sed DIC code Version 1 130814 - Color transfer between images 非常经典的彩
- image-forgery-with-siftand-ransac
- 仿生图像增强法(image enchance)
- 图像质量评价(image quality)代码
- matlab仿真的图像序列的柱面全景拼接
- matlab 用于核pca(KPCA)的库函数
- 图像的灰度直方图计算Matlab代码一
- matlab2017a的imageLabeler标注后的roi区域裁
- 利用Matlab提取图片中的数据pdf+源码
-
imageLabeler标记工具txt或者xm
l与matl - 基于TV模型的image inpainting算法
- BLS-GSM matlab
- Image Forgery Detection 定位出JPEG重压缩图
- shadow_detective CVPR2011论文“Single-Image
- image retrieval 基于颜色形状纹理特征的
- image-texture-features 图像纹理特征提取
评论
共有 条评论