Computer Vision News - October 2019

23 Conclusion VSfM is an easy and intuitive software for generating 3-D reconstruction. It executes state of the art SfM algorithm and produces high-quality reconstructions. It does not require programming knowledge, though it enables the user to export the model for further research, using any desired programming language. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 4 4 function [groundKs,groundRs,groundTs,files]= parse (file) fid = fopen(sprintf( ‘%s’ ,file)); tline = fgets(fid); tline = fgets(fid); tline = fgets(fid); numOfCameras=str2num(tline); tline = fgets(fid); cams= zeros (numOfCameras, 8 ); files=cell(numOfCameras, 1 ); for i = 1 :numOfCameras C = strsplit(tline); fileName=C{ 1 }; files{ i }=fileName; cams( i ,:)=[str2double(C{ 2 }) str2double(C{ 3 }) str2double(C{ 4 }) str- 2double(C{ 5 }) str2double(C{ 6 }) str2double(C{ 7 }) str2double(C{ 8 }) str2dou- ble(C{ 9 })]; tline = fgets(fid); end fclose(fid); groundKs=cell(numOfCameras, 1 ); groundRs=cell(numOfCameras, 1 ); groundTs=cell(numOfCameras, 1 ); for i = 1 : length (files) curFile=files{ i }; cam=cams( i , 2 : 8 ); focal=cams( i , 1 ); im=imread(curFile); groundKs{ i }=[focal 0 size (im, 2 ) / 2 ; 0 focal size (im, 1 ) / 2 ; 0 0 1 ]; curQ=cam([ 1 2 3 4 ]); curt=cam( 5 : 7 ); groundRs{ i }=quaternion2Rotmatrix(curQ) ’ ; groundTs{ i }=curt ’ ; end end function [ R1 ] = quaternion2Rotmatrix ( q ) qq=quaternion( real (q)); R1=RotationMatrix(qq); end Visual SfM

RkJQdWJsaXNoZXIy NTc3NzU=