フィルターのクリア

Info

この質問は閉じられています。 編集または回答するには再度開いてください。

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

1 回表示 (過去 30 日間)
salman khan
salman khan 2018 年 6 月 5 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
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 件のコメント
KSSV
KSSV 2018 年 6 月 5 日
What problem you face? What is your question?
salman khan
salman khan 2018 年 6 月 6 日
I have stereo image of a building and i want to estimate the height of this building using triangulate function

回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by