You are on page 1of 2

clear; frameStart = 1; %10; %1; frameEnd = 50; %180; %50; %150; %24; %20; %10; %174; fileStart = '.

/room/room'; fileEnd = '.bmp'; minMatches = 2; %4; %3; confidenceThreshold = 0.9; minFrameDistance = 1; maxFrameDistance = 50; %24; %15; %0; %15; scaleFactor = sqrt(2); nLevels = 15; nInterLevels = 2; %24; nStartLevel = 15; %2; %15; nStartInterLevel = 2; %24; %2; sigmaInit = 0.5; alphaConfidence = 0.7; sigmaFactorWS = 4.08; sigmaFactorWindowSize = 6; maxSearchDistance = 1; maxNumItersPerLevel = 5; smallMedianLevelFilterSize = 1; bigMedianLevelFilterSize = 9; dampingVariationFactor = 0.7; minDampingWeight = 1/6; consistencyThreshold = 2; %0.6; %1; %2; useSegmentation = 0; isRectified = 0; threshRANSAC = 1; nPointsSubsetCam = 6; scaleFactor3D = 2; %1; residualThreshold = 2; leftFlowPath = './room/data/leftFlow'; rightFlowPath = './room/data/rightFlow'; leftConfidencePath = './room/data/leftConfidence'; rightConfidencePath = './room/data/rightConfidence'; leftConsistentMaskPath = './room/data/leftConsistentMask'; rightConsistentMaskPath = './room/data/rightConsistentMask'; useInhomTriangulation = true; forwardFrameStep = 5; %1; backwardFrameStep = 1; allowBackwards = false; %true; comparisonGRICthresh = 0; %-0.02; %-0.05; %-0.07; %-0.05; % -0.02 selfCalibrationEnabled = true; %false; [PsM, X, Xinhom, faces, colors, frames, matchedPoints, isMatched, Ps] = triangulateAndCalibrateSequence(frameStart, frameEnd, fileStart, fileEnd,

minMatches, confidenceThreshold, minFrameDistance, maxFrameDistance, scaleFactor, nLevels, nInterLevels, nStartLevel, nStartInterLevel, sigmaInit, alphaConfidence, sigmaFactorWS, sigmaFactorWindowSize, maxSearchDistance, maxNumItersPerLevel, smallMedianLevelFilterSize, bigMedianLevelFilterSize, dampingVariationFactor, minDampingWeight, consistencyThreshold, useSegmentation, isRectified, threshRANSAC, nPointsSubsetCam, scaleFactor3D, residualThreshold, leftFlowPath, rightFlowPath, leftConfidencePath, rightConfidencePath, leftConsistentMaskPath, rightConsistentMaskPath, useInhomTriangulation, forwardFrameStep, backwardFrameStep, allowBackwards, comparisonGRICthresh, selfCalibrationEnabled); save('./room/roomMulti.mat'); display3Dobject(Xinhom, faces, colors);

display3Dobject(Xinhom, faces2, colors2); figure; plot3(Xinhom(:,1), Xinhom(:,2), Xinhom(:,3), '.r'); [T, invT] = transformToCanonicalCamera(P) [Choms, Cinhoms, pRays, pPoints, Ks, Rs] = decomposeAllCameras(PsM); [C, Cinhom, pRay, pPoint, K, R] = decomposeCameraMatrix(P) figure; quiver3(Cinhoms(:,1),Cinhoms(:,2),Cinhoms(:,3),pRays(:,1),pRays(:,2),pRays(:,3))

You might also like