Borrar filtros
Borrar filtros

Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

I want to estimate the hieght of buliding using triangulate function in Matlab. can anyone short out this problem matlab

1 visualización (últimos 30 días)
clc; close all; clearvars
I1Color=imread('DSC_0132.jpg');
I2Color=imread('DSC_0133.jpg');
I1=rgb2gray(I1Color);
I2=rgb2gray(I2Color);
figure;subplot(121);imshow(I1);subplot(122); imshow(I2);
figure;
points1 = detectSURFFeatures(I1,'MetricThreshold',1000);
points2 = detectSURFFeatures(I2,'MetricThreshold',1000);
%%Extract features.
[f1, vpts1] = extractFeatures(I1, points1);
[f2, vpts2] = extractFeatures(I2, points2);
%%Match features.
indexPairs = matchFeatures(f1, f2, 'MaxRatio',0.4,'Unique',true) ;
matchedPoints1 = vpts1(indexPairs(:, 1));
matchedPoints2 = vpts2(indexPairs(:, 2));
%Visualize candidate matches.
f=18e-3/3.92e-6;
intrinsics = cameraIntrinsics([4591.8 4591.8],[3000 2000],size(I1));
cameraParams = cameraParameters('IntrinsicMatrix',intrinsics.IntrinsicMatrix);
%[tform,inlierpoints1,inlierpoints2] = estimateGeometricTransform(matchedPoints2, matchedPoints1,'projective');
[E,inliersIndex] = estimateEssentialMatrix(matchedPoints1,matchedPoints2,cameraParams);
inliers1=matchedPoints1(inliersIndex);
inliers2=matchedPoints2(inliersIndex);
[relativeOrientation,relativeLocation] = relativeCameraPose(E,cameraParams,inliers1,inliers2);
stereoParams = stereoParameters(cameraParams,cameraParams,relativeOrientation,relativeLocation*8);
point3d = triangulate([3628 2779;2664 628], [3165 2630;3221 509], stereoParams);
distanceInMeters = norm(point3d)/1000;
distanceAsString = sprintf('%0.2f meters', distanceInMeters);
  2 comentarios
salman khan
salman khan el 6 de Jun. de 2018
I have stereo image of a building and i want to estimate the height of this building using triangulate function

Respuestas (0)

La pregunta está cerrada.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by