├── ConvertVoxelList2Voxel3D.m ├── CreateVisualHull.m ├── DataLoader.m ├── InitializeVoxels.m ├── README.md ├── VisualHull.m ├── assets ├── temple_fov.png ├── temple_fov_intersection.png ├── temple_fov_union.png ├── temple_sparse_ring.png ├── temple_vh_001.png ├── temple_vh_002.png ├── temple_vh_003.png ├── temple_vh_004.png ├── temple_vh_005.png ├── temple_vh_006.png ├── temple_vh_007.png ├── temple_vh_008.png ├── temple_vh_009.png ├── temple_vh_01.png ├── temple_vh_010.png ├── temple_vh_011.png ├── temple_vh_012.png ├── temple_vh_013.png ├── temple_vh_014.png ├── temple_vh_015.png ├── temple_vh_016.png ├── temple_vh_017.png ├── temple_vh_018.png ├── temple_vh_019.png ├── temple_vh_020.png ├── temple_vh_021.png ├── temple_vh_022.png ├── temple_vh_023.png ├── temple_vh_024.png ├── temple_vh_025.png ├── temple_vh_026.png ├── temple_vh_027.png ├── temple_vh_028.png ├── temple_vh_029.png ├── temple_vh_030.png ├── temple_vh_031.png ├── temple_vh_032.png ├── temple_vh_033.png ├── temple_vh_034.png ├── temple_vh_035.png ├── temple_vh_036.png ├── temple_vh_037.png ├── temple_vh_038.png ├── temple_vh_039.png ├── temple_vh_040.png ├── temple_vh_041.png ├── temple_vh_042.png ├── temple_vh_043.png ├── temple_vh_044.png ├── temple_vh_045.png ├── temple_vh_046.png ├── temple_vh_047.png ├── temple_vh_048.png ├── temple_vh_049.png ├── temple_vh_050.png ├── temple_vh_051.png ├── temple_vh_052.png ├── temple_vh_053.png ├── temple_vh_054.png ├── temple_vh_055.png ├── temple_vh_056.png ├── temple_vh_057.png ├── temple_vh_058.png ├── temple_vh_059.png ├── temple_vh_060.png ├── temple_vh_061.png ├── temple_vh_062.png ├── temple_vh_063.png ├── temple_vh_064.png ├── temple_vh_065.png ├── temple_vh_066.png ├── temple_vh_067.png ├── temple_vh_068.png ├── temple_vh_069.png ├── temple_vh_070.png ├── temple_vh_071.png ├── temple_vh_072.png ├── temple_vh_073.png ├── temple_vh_074.png ├── temple_vh_075.png ├── temple_vh_076.png ├── temple_vh_077.png ├── temple_vh_078.png ├── temple_vh_079.png ├── temple_vh_080.png ├── temple_vh_081.png ├── temple_vh_082.png ├── temple_vh_083.png ├── temple_vh_084.png ├── temple_vh_085.png ├── temple_vh_086.png ├── temple_vh_087.png ├── temple_vh_088.png ├── temple_vh_089.png ├── temple_vh_090.png ├── temple_vh_091.png ├── temple_vh_092.png ├── temple_vh_093.png ├── temple_vh_094.png ├── temple_vh_095.png ├── temple_vh_096.png ├── temple_vh_097.png ├── temple_vh_098.png ├── temple_vh_099.png ├── temple_vh_100.png ├── temple_vh_60.png ├── temple_vh_90.png └── temple_vh_slice_animation.png ├── dinoSparseRing ├── README.txt ├── Thumbs.db ├── dinoSR0001.png ├── dinoSR0002.png ├── dinoSR0003.png ├── dinoSR0004.png ├── dinoSR0005.png ├── dinoSR0006.png ├── dinoSR0007.png ├── dinoSR0008.png ├── dinoSR0009.png ├── dinoSR0010.png ├── dinoSR0011.png ├── dinoSR0012.png ├── dinoSR0013.png ├── dinoSR0014.png ├── dinoSR0015.png ├── dinoSR0016.png ├── dinoSR_ang.txt ├── dinoSR_good_silhouette_images.txt └── dinoSR_par.txt ├── main_old.m ├── main_visual_hull.m ├── patch2stl.m └── templeSparseRing ├── README.txt ├── templeSR0001.png ├── templeSR0002.png ├── templeSR0003.png ├── templeSR0004.png ├── templeSR0005.png ├── templeSR0006.png ├── templeSR0007.png ├── templeSR0008.png ├── templeSR0009.png ├── templeSR0010.png ├── templeSR0011.png ├── templeSR0012.png ├── templeSR0013.png ├── templeSR0014.png ├── templeSR0015.png ├── templeSR0016.png ├── templeSR_ang.txt └── templeSR_par.txt /ConvertVoxelList2Voxel3D.m: -------------------------------------------------------------------------------- 1 | %% Convert voxel list to 3D grid 2 | % 3 | % input: voxels_number - number of voxels in each dimension 4 | % voxel_size - size of the voxel in each dimension 5 | % voxel - List of voxels Nx4 6 | % 7 | % output: voxel3D - 3D grid of voxels 8 | function [voxel3D] = ConvertVoxelList2Voxel3D(voxels_number, voxel) 9 | voxel3D = reshape(voxel(:,4),voxels_number([2,1,3])); -------------------------------------------------------------------------------- /CreateVisualHull.m: -------------------------------------------------------------------------------- 1 | %% Create Visual Hull 2 | % 3 | % input: silhouettes - object silhouettes 4 | % voxels - array of voxel coordinates VoxelsNbx4 5 | % each line represents coordinates of a voxel center 6 | % [X, Y, Z, 1] 7 | % K - intrinsic parameters of the camera 8 | % M - array of poses of 3x4xFramesNumber 9 | % depth_range - min and max distance of the 10 | % accepted voxels wrt camera 11 | % display_projected_voxels - draw projected voxels on the silhouet image 12 | % default - 0 13 | % 14 | % output: voxels - array of voxels data VoxelsNbx4 15 | % each line represents 16 | % coordinates (X, Y, Z) 17 | % of a voxel center and 18 | % a accumulated image data 19 | % cumulCount - column vector containing how many 20 | % intensity values were acccumulated 21 | % for each voxel [VoxelsNbx1] 22 | function [voxels, cumulCount] = CreateVisualHull(silhouettes, voxels, K, M, depth_range, display_projected_voxels) 23 | 24 | if ~exist('display_projected_voxels', 'var') 25 | display_projected_voxels = 0; 26 | end 27 | 28 | if(display_projected_voxels == 1) 29 | fid = figure; 30 | else 31 | fid = -1; 32 | end 33 | 34 | object_points3D = [voxels(:,1)'; voxels(:,2)'; voxels(:,3)'; ones(1, length(voxels))]; 35 | voxels(:, 4) = zeros(size(voxels(:, 4))); 36 | 37 | voxel_inds = {}; 38 | img_vals = {}; 39 | 40 | dmin = depth_range(1); 41 | dmax = depth_range(2); 42 | 43 | img_size = size(silhouettes); 44 | 45 | % parfor(i = 1:size(M,3)) 46 | for i = 1:size(M,3) 47 | 48 | r = M(1:3, 1:3, i); 49 | t = M(1:3, 4, i); 50 | 51 | if t == [0;0;0] 52 | continue; 53 | end 54 | 55 | center = [-(r')* t; 1]; % center of field curvature set to camera center 56 | % center = [(r')*([35;0;40]-t); 1]; % actual center of field curvature 57 | 58 | cam_center = repmat(center, 1, size(object_points3D,2)); 59 | 60 | KM = [K]*M(1:3, 1:4, i); 61 | 62 | % projecting voxels centers to image 63 | points2D = KM*object_points3D; 64 | points2D = points2D./[points2D(3,:); points2D(3,:); points2D(3,:)]; 65 | 66 | cur_silhouette = silhouettes(:,:,i); 67 | 68 | % mask to locate bright pixels 69 | pixThresh = mean(cur_silhouette(:)) + std(cur_silhouette(:)); 70 | cur_mask = cur_silhouette > pixThresh; 71 | saliencyFlag = zeros(1,size(points2D,2),'logical'); 72 | for ii = 1:size(points2D,2) 73 | if points2D(2,ii) > 1 && points2D(2,ii) < img_size(1) && ... 74 | points2D(1,ii) > 1 && points2D(1,ii) < img_size(2) 75 | saliencyFlag(ii) = cur_mask(round(points2D(2,ii)),round(points2D(1,ii))); 76 | end 77 | end 78 | 79 | % bypass saliency test 80 | saliencyFlag = ones(1,size(points2D,2),'logical'); 81 | 82 | d = sqrt(sum((cam_center - object_points3D).^2, 1)); 83 | pts_ind = find(... %d > dmin & d < dmax ... 84 | points2D(2,:) > 1 & points2D(2,:) < img_size(1) ... 85 | & points2D(1,:) > 1 & points2D(1,:) < img_size(2) ... 86 | & saliencyFlag); 87 | 88 | pi = points2D(1,pts_ind); 89 | pj = points2D(2,pts_ind); 90 | 91 | 92 | [img_val, ind, object_points_cam] = GetSilhouetVals([pi;pj], cur_silhouette); 93 | 94 | ind = pts_ind(ind); 95 | 96 | voxel_inds{i} = ind; 97 | img_vals{i} = img_val; 98 | 99 | % display_projected_voxels = 1; 100 | if(display_projected_voxels) 101 | figure(fid), 102 | imagesc(cur_silhouette);title(i);hold on 103 | plot(object_points_cam(1,:), object_points_cam(2,:), '.g');hold off 104 | pause; 105 | end 106 | end 107 | 108 | cumulCount = zeros(size(voxels,1),1); 109 | 110 | for i=1:size(voxel_inds,2) 111 | ind = voxel_inds{i}; 112 | img_val = img_vals{i}; 113 | voxels(ind, 4) = voxels(ind, 4) + img_val; 114 | cumulCount(ind) = cumulCount(ind) + 1; 115 | % voxels(ind, 4) = max(voxels(ind, 4), img_val); 116 | end 117 | 118 | end 119 | 120 | function [img_val, ind, object_points_cam] = GetSilhouetVals(points2D, silhouette) 121 | img_size = size(silhouette); 122 | 123 | pi = floor(points2D(1,:)); 124 | pj = floor(points2D(2,:)); 125 | a = (points2D(1,:) - pi)'; 126 | b = (points2D(2,:) - pj)'; 127 | 128 | object_points_cam = floor([points2D(1,:); points2D(2,:)]); 129 | 130 | ind_bad = []; 131 | 132 | % increase counter of each voxel for object pixel 133 | ind_img = int32(sub2ind(img_size(1:2), object_points_cam(2,:)', object_points_cam(1,:)')); 134 | ind_img(ind_bad) = []; 135 | img_val = silhouette(uint32(ind_img)); 136 | 137 | ind_img2 = int32(sub2ind(img_size(1:2), object_points_cam(2,:)'+1, object_points_cam(1,:)')); 138 | ind_img2(ind_bad) = []; 139 | img_val2 = silhouette(uint32(ind_img2)); 140 | 141 | ind_img3 = int32(sub2ind(img_size(1:2), object_points_cam(2,:)', object_points_cam(1,:)'+1)); 142 | ind_img3(ind_bad) = []; 143 | img_val3 = silhouette(uint32(ind_img3)); 144 | 145 | ind_img4 = int32(sub2ind(img_size(1:2), object_points_cam(2,:)'+1, object_points_cam(1,:)'+1)); 146 | ind_img4(ind_bad) = []; 147 | img_val4 = silhouette(uint32(ind_img4)); 148 | % 149 | ind = 1:size(object_points_cam, 2); 150 | ind(ind_bad) = []; 151 | img_val = (1-a(ind)).*(1-b(ind)).*img_val+... 152 | (a(ind)).*(1-b(ind)).*img_val3+... 153 | (1-a(ind)).*(b(ind)).*img_val2+... 154 | (a(ind)).*(b(ind)).*img_val4; 155 | 156 | 157 | end 158 | 159 | -------------------------------------------------------------------------------- /DataLoader.m: -------------------------------------------------------------------------------- 1 | classdef DataLoader 2 | %DATALOADER - loads images and camera params jhkj lkj kjjnl 3 | 4 | properties 5 | data_dir = ''; 6 | file_base = ''; 7 | PathBase = ''; 8 | N = 0; 9 | imgs = []; 10 | K = []; 11 | M = []; 12 | KM = []; 13 | 14 | MinBound = []; 15 | MaxBound = []; 16 | end 17 | 18 | methods 19 | function obj = DataLoader(data_dir) 20 | %DATALOADER - loads images and camera params 21 | obj.data_dir = data_dir; 22 | 23 | params_str = '_par.txt'; 24 | files = dir([data_dir '*' params_str]); 25 | if length(files) ~= 1 26 | disp('Cannot find parametrs files') 27 | return; 28 | end 29 | obj.file_base = files(1).name(1:end-length(params_str)); 30 | 31 | obj.PathBase = [obj.data_dir obj.file_base]; 32 | end 33 | 34 | function obj = LoadCameraParams(obj) 35 | %LoadCameraParams - loads intrinsi and extrinsic parameters of 36 | % each camera from file 37 | 38 | fid = fopen([obj.PathBase '_par.txt'], 'r'); 39 | res = textscan(fid,'%d'); 40 | obj.N = res{1,1}; 41 | for i=1:obj.N 42 | textscan(fid,'%s',1); 43 | res = textscan(fid,'%f', 21); 44 | tmp =res{1}'; 45 | obj.K(:,:,i) = reshape(tmp(1:9), 3, 3)'; 46 | R = reshape(tmp(10:18), 3, 3)'; 47 | t = tmp(19:21)'; 48 | obj.M(:,:,i) = [R t]; 49 | obj.KM(:,:,i) = obj.K(:,:,i)*[R t]; 50 | end 51 | fclose(fid); 52 | 53 | end 54 | 55 | function obj = LoadImages(obj) 56 | %LoadImages - loads images from disk 57 | 58 | for i=1:obj.N 59 | obj.imgs(:,:,:,i) = imread([obj.data_dir obj.file_base num2str(i, '%04i') '.png']); 60 | end 61 | 62 | end 63 | 64 | 65 | function [obj] = CalcFOVUnion(obj, xx, yy, zz) 66 | %CalcFOVUnion - calc intersection of cameras field of view (FOV) 67 | 68 | nGrid = 101; 69 | if ~exist('xx', 'var') 70 | xx = linspace(-1, 1, nGrid); 71 | end 72 | 73 | if ~exist('yy', 'var') 74 | yy = linspace(-1, 1, nGrid); 75 | end 76 | 77 | if ~exist('zz', 'var') 78 | zz = linspace(-1, 1, nGrid); 79 | end 80 | 81 | [X, Y, Z] = meshgrid(xx, yy, zz); 82 | QP = [X(:) Y(:) Z(:)]; 83 | index_intersect = ones([size(QP,1), 1]); 84 | 85 | % iterate over each view 86 | for camera_ind=1:obj.N 87 | r = obj.M(1:3, 1:3, camera_ind); 88 | t = obj.M(1:3, 4, camera_ind); 89 | 90 | fx = obj.K(1, 1, camera_ind); 91 | fy = obj.K(2, 2, camera_ind); 92 | ox = obj.K(1, 3, camera_ind); 93 | oy = obj.K(2, 3, camera_ind); 94 | 95 | img_size = double([size(obj.imgs,1) size(obj.imgs,2)]); 96 | x_px = [0 0 img_size(2) img_size(2)]; 97 | y_px = [0 img_size(1) 0 img_size(1)]; 98 | 99 | cc = -(r')* t; 100 | verts = cc'; 101 | 102 | % iterate over each corner of the image plane 103 | for i=1:length(x_px) 104 | P0 = []; 105 | P0(1,1) = (x_px(i)-ox)/fx; 106 | P0(2,1) = (y_px(i)-oy)/fy; 107 | P0(3,1) = 1; 108 | 109 | P1 = r'* P0 -r'* t; 110 | verts = [verts; P1(1), P1(2), P1(3)]; 111 | end 112 | 113 | P = verts; 114 | T = [1 2 3 4;1 3 4 5]; 115 | TR = triangulation(T, P); 116 | index_intersect = (~isnan(pointLocation(TR, QP))) & index_intersect; 117 | end 118 | 119 | obj.MinBound = min(QP(index_intersect,:)); 120 | obj.MaxBound = max(QP(index_intersect,:)); 121 | 122 | end 123 | 124 | function [] = PlotBoudningVolume(obj, face_color, face_alpha) 125 | %PlotBoudningVolume - plot minimal cube that copntains intersection 126 | %of all FOVs 127 | 128 | if ~exist('face_color', 'var') 129 | face_color = 'green'; 130 | end 131 | 132 | if ~exist('face_alpha', 'var') 133 | face_alpha = 0.1; 134 | end 135 | 136 | minb = obj.MinBound; 137 | maxb = obj.MaxBound; 138 | 139 | verts = [minb(1), minb(2), minb(3); 140 | maxb(1), minb(2), minb(3); 141 | maxb(1), maxb(2), minb(3); 142 | minb(1), maxb(2), minb(3); 143 | 144 | minb(1), minb(2), maxb(3); 145 | maxb(1), minb(2), maxb(3); 146 | maxb(1), maxb(2), maxb(3); 147 | minb(1), maxb(2), maxb(3);]; 148 | 149 | faces = [1 2 3; 150 | 1 3 4; 151 | 152 | 5 6 7; 153 | 5 7 8; 154 | 155 | 1 4 8; 156 | 1 8 5; 157 | 158 | 2 3 7; 159 | 2 7 6; 160 | 161 | 1 2 6; 162 | 1 6 5; 163 | 164 | 4 3 7; 165 | 4 7 8; 166 | ]; 167 | 168 | h = patch('Vertices', verts, 'Faces', faces,'FaceColor', face_color, 'FaceAlpha', face_alpha); 169 | end 170 | 171 | 172 | function [] = PlotFOV(obj, inds, face_color, face_alpha) 173 | %PlotFOV - displays camera field ofview 174 | 175 | if ~exist('inds', 'var') 176 | inds = [1:obj.N]; 177 | else 178 | if isempty(inds) 179 | inds = [1:obj.N]; 180 | end 181 | end 182 | 183 | if ~exist('face_color', 'var') 184 | face_color = 'blue'; 185 | end 186 | 187 | if ~exist('face_alpha', 'var') 188 | face_alpha = 0.25; 189 | end 190 | 191 | % iterate over each view 192 | for camera_ind=inds 193 | r = obj.M(1:3, 1:3, camera_ind); 194 | t = obj.M(1:3, 4, camera_ind); 195 | 196 | fx = obj.K(1, 1, camera_ind); 197 | fy = obj.K(2, 2, camera_ind); 198 | ox = obj.K(1, 3, camera_ind); 199 | oy = obj.K(2, 3, camera_ind); 200 | 201 | img_size = double([size(obj.imgs,1) size(obj.imgs,2)]); 202 | x_px = [0 0 img_size(2) img_size(2)]; 203 | y_px = [0 img_size(1) 0 img_size(1)]; 204 | 205 | cc = -(r')* t; 206 | 207 | plot3(cc(1), cc(2), cc(3), 'sb'); 208 | text(cc(1), cc(2), cc(3), num2str(camera_ind), 'FontSize', 22, 'Color', 'r'); 209 | verts = cc'; 210 | 211 | % iterate over each corner of the image plane 212 | for i=1:length(x_px) 213 | P0 = []; 214 | P0(1,1) = (x_px(i)-ox)/fx; 215 | P0(2,1) = (y_px(i)-oy)/fy; 216 | P0(3,1) = 1; 217 | 218 | P1 = r'* P0 -r'* t; 219 | 220 | line([cc(1) P1(1)], [cc(2) P1(2)], [cc(3) P1(3)], 'Color', 'b', 'LineWidth', 2); 221 | verts = [verts; P1(1), P1(2), P1(3)]; 222 | end 223 | 224 | faces = [0 1 3; 0 1 2; 0 2 4; 0 4 3]+1; 225 | h= patch('Vertices', verts, 'Faces', faces,'FaceColor', face_color); 226 | set(h,'FaceAlpha', face_alpha); 227 | axis equal 228 | end 229 | 230 | end 231 | 232 | end 233 | end 234 | 235 | -------------------------------------------------------------------------------- /InitializeVoxels.m: -------------------------------------------------------------------------------- 1 | %% Initialize Voxels 2 | % 3 | % input: xlim - min and max volume limit in X axis 4 | % ylim - min and max volume limit in Y axis 5 | % zlim - min and max volume limit in Z axis 6 | % voxel_size - size of voxel in 3D 7 | % 8 | % output: voxel - array of voxel coordinates VoxelsNbx4 9 | % each line represents coordinates of a 10 | % voxel center [X, Y, Z, 1] 11 | % voxel3Dx - 3D grid coordinates of X dimension 12 | % voxel3Dy - 3D grid coordinates of Y dimension 13 | % voxel3Dz - 3D grid coordinates of Z dimension 14 | % voxels_number_act - number of created voxels 15 | function [voxel, voxel3Dx, voxel3Dy, voxel3Dz, voxels_number_act] = InitializeVoxels(xlim, ylim, zlim, voxel_size) 16 | 17 | 18 | voxels_number(1) = abs(xlim(2)-xlim(1))./voxel_size(1); 19 | voxels_number(2) = abs(ylim(2)-ylim(1))./voxel_size(2); 20 | voxels_number(3) = abs(zlim(2)-zlim(1))./voxel_size(3); 21 | voxels_number_act = floor(voxels_number); 22 | total_number = round(prod(voxels_number_act)); 23 | 24 | voxel = ones(total_number, 4, 'single'); 25 | 26 | sx = xlim(1); 27 | ex = xlim(1) + (voxels_number_act(1)-1)*voxel_size(1); 28 | sy = ylim(1); 29 | ey = ylim(1) + (voxels_number_act(2)-1)*voxel_size(2); 30 | sz = zlim(1); 31 | ez = zlim(1) + (voxels_number_act(3)-1)*voxel_size(3); 32 | 33 | if(ex>sx) 34 | x_step = voxel_size(1); 35 | else 36 | x_step = -voxel_size(1); 37 | end 38 | 39 | if(ey>sy) 40 | y_step = voxel_size(2); 41 | else 42 | y_step = -voxel_size(2); 43 | end 44 | 45 | if(ez>sz) 46 | z_step = voxel_size(3); 47 | else 48 | z_step = -voxel_size(3); 49 | end 50 | 51 | 52 | [voxel3Dx, voxel3Dy, voxel3Dz] = meshgrid(sx:x_step:ex, ... 53 | sy:y_step:ey, ... 54 | sz:z_step:ez); 55 | 56 | voxel(:,1) = voxel3Dx(:); 57 | voxel(:,2) = voxel3Dy(:); 58 | voxel(:,3) = voxel3Dz(:); 59 | 60 | 61 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Visual Hull Matlab 2 | 3 | Visual Hull (VH) extraction from calibrate images using Matlab. 4 | --- 5 | ## Temple Sparse Ring 6 | ### VH after applying Marching Cube Algorithm 7 | ![Temple Sparse](./assets/temple_sparse_ring.png) 8 | 9 | ### Camera Field of View (FOV) 10 | ![Plot of 3 FOV](./assets/temple_fov.png) 11 | 12 | ### Intersection of all cameras FOV 13 | ![Intersection all cameras FOV](./assets/temple_fov_union.png) 14 | 15 | ### Slices of VH 16 | ![Slice of VH at Z=1](./assets/temple_vh_slice_animation.png) 17 | 18 | 19 | ## To run algorithm 20 | ```Matlab 21 | main_visual_hull.m 22 | ``` 23 | 24 | --- 25 | ## Datasets 26 | 27 | https://vision.middlebury.edu/mview/data/ 28 | 29 | --- 30 | 31 | More details can be found at http://vision.gel.ulaval.ca/~visualhull/ 32 | -------------------------------------------------------------------------------- /VisualHull.m: -------------------------------------------------------------------------------- 1 | classdef VisualHull 2 | %VisualHull - allows to construct visual hull from a set of images 3 | 4 | properties 5 | data_dir = ''; 6 | file_base = ''; 7 | N = 0; 8 | 9 | silhouettes = []; 10 | DataLoader = []; 11 | 12 | voxels = []; 13 | voxel3Dx = []; 14 | voxel3Dy = []; 15 | voxel3Dz = []; 16 | voxels_number = []; 17 | voxels_voted = []; 18 | end 19 | 20 | methods 21 | function obj = VisualHull(data_loader) 22 | %VisualHull - constructs visual hull from a set of images 23 | obj.DataLoader = data_loader; 24 | end 25 | 26 | function [obj] = ExtractSilhoueteFromImages(obj, silhouette_threshold) 27 | %ExtractSilhoueteFromImages - extract an object silhouette from 28 | %images loaded by data loader using image thresholding 29 | 30 | for i=1:obj.DataLoader.N 31 | img = obj.DataLoader.imgs(:,:,:,i); 32 | ch1 = img(:,:,1) > silhouette_threshold; 33 | ch2 = img(:,:,2) > silhouette_threshold; 34 | ch3 = img(:,:,3) > silhouette_threshold; 35 | obj.silhouettes(:,:,i) = (ch1+ch2+ch3)>0; 36 | end 37 | end 38 | 39 | function obj = CreateVoxelGrid(obj, voxel_nb) 40 | %CreateVoxelGrid crerate a grid of voxels using bounds estimated 41 | %from interesction of cameras FOV 42 | 43 | xlim = [obj.DataLoader.MinBound(1) obj.DataLoader.MaxBound(1)]; 44 | ylim = [obj.DataLoader.MinBound(2) obj.DataLoader.MaxBound(2)]; 45 | zlim = [obj.DataLoader.MinBound(3) obj.DataLoader.MaxBound(3)]; 46 | 47 | if ~exist('voxel_nb', 'var') 48 | voxel_nb = [100, 100, 100]; 49 | end 50 | 51 | voxel_size = [diff(xlim)/voxel_nb(1), diff(ylim)/voxel_nb(2), diff(zlim)/voxel_nb(3)]; 52 | [obj.voxels, obj.voxel3Dx, obj.voxel3Dy, obj.voxel3Dz, obj.voxels_number] = InitializeVoxels(xlim, ylim, zlim, voxel_size); 53 | end 54 | 55 | function obj = ProjectVoxelsToSilhouette(obj, disp_proj_voxels) 56 | %ProjectVoxelsToSilhouette - project voxels to each object 57 | %silhouette and accumlate all the votes 58 | 59 | if ~exist('display_projected_voxels', 'var') 60 | disp_proj_voxels = 0; 61 | end 62 | 63 | disp_proj_voxels = 0; 64 | camera_depth_range = [-1 1]; 65 | K = obj.DataLoader.K(:,:,1); 66 | M = obj.DataLoader.M; 67 | 68 | [obj.voxels_voted] = CreateVisualHull(obj.silhouettes, obj.voxels, K, M, camera_depth_range, disp_proj_voxels); 69 | end 70 | 71 | function [] = ShowVH3D(obj, error_amount) 72 | %ShowVH3D show visula hull in 3D 73 | 74 | if ~exist('error_amount', 'var') 75 | error_amount = 5; 76 | end 77 | maxv = max(obj.voxels_voted(:,4)); 78 | iso_value = maxv - round(((maxv)/100)*error_amount)-0.5; 79 | disp(['max number of votes:' num2str(maxv)]) 80 | disp(['threshold for marching cube:' num2str(iso_value)]); 81 | 82 | [voxel3D] = ConvertVoxelList2Voxel3D(obj.voxels_number, obj.voxels_voted); 83 | [faces, verts, colors] = isosurface(obj.voxel3Dx, obj.voxel3Dy, obj.voxel3Dz, voxel3D, iso_value, obj.voxel3Dz); 84 | 85 | p=patch('vertices', verts, 'faces', faces, ... 86 | 'facevertexcdata', colors, ... 87 | 'facecolor','flat', ... 88 | 'edgecolor', 'interp'); 89 | 90 | set(p,'FaceColor', [0.5 0.5 0.5], 'FaceLighting', 'flat',... 91 | 'EdgeColor', 'none', 'SpecularStrength', 0, 'AmbientStrength', 0.4, 'DiffuseStrength', 0.6); 92 | 93 | set(gca,'DataAspectRatio',[1 1 1], 'PlotBoxAspectRatio',[1 1 1],... 94 | 'PlotBoxAspectRatioMode', 'manual'); 95 | 96 | axis vis3d; 97 | 98 | light('Position',[1 1 0.5], 'Visible', 'on'); 99 | light('Position',[1 -1 0.5], 'Visible', 'on'); 100 | light('Position',[-1 1 0.5], 'Visible', 'on'); 101 | light('Position',[-1 -1 0.5], 'Visible', 'on'); 102 | 103 | ka = 0.1; kd = 0.4; ks = 0; 104 | material([ka kd ks]) 105 | 106 | axis equal; 107 | axis tight 108 | % axis off 109 | grid on 110 | 111 | cameratoolbar('Show') 112 | cameratoolbar('SetMode','orbit') 113 | cameratoolbar('SetCoordSys','y') 114 | end 115 | 116 | 117 | function [fv] = CalcIsosurface(obj, error_amount) 118 | %CalcIsosurface - extract isosurface data from voxel grid using 119 | % maximum nuber of votes - error amount 120 | 121 | maxv = max(obj.voxels_voted(:,4)); 122 | iso_value = maxv - round(((maxv)/100)*error_amount)-0.5; 123 | 124 | disp(['max number of votes:' num2str(maxv)]) 125 | disp(['threshold for marching cube:' num2str(iso_value)]); 126 | 127 | [voxel3D] = ConvertVoxelList2Voxel3D(obj.voxels_number, obj.voxels_voted); 128 | fv = isosurface(obj.voxel3Dx, obj.voxel3Dy, obj.voxel3Dz, voxel3D, iso_value, obj.voxel3Dz); 129 | end 130 | 131 | function [] = ShowVH2DGrid(obj, img_rot_angle) 132 | %ShowVH2DGrid - show slices of a voxel grid one at a time 133 | 134 | if ~exist('img_rot_angle', 'var') 135 | img_rot_angle = 0; 136 | end 137 | 138 | %display voxel grid 139 | voxels_voted1 = (reshape(obj.voxels_voted(:,4), size(obj.voxel3Dx))); 140 | maxv = max(obj.voxels_voted(:)); 141 | % fid = figure; 142 | for j=1:size(voxels_voted1,3) 143 | % figure(fid), 144 | img = (squeeze(voxels_voted1(:,:,j))); 145 | if img_rot_angle >0 146 | img = imrotate(img, img_rot_angle); 147 | end 148 | imagesc(img, [0 maxv]), title([num2str(j), ' - press any key to continue']), axis equal, 149 | pause, 150 | end 151 | end 152 | 153 | function [] = SaveVH2DGrid(obj, path, img_rot_angle, resolution_dpi) 154 | %ShowVH2DGrid - show slices of a voxel grid one at a time 155 | 156 | if ~exist('img_rot_angle', 'var') 157 | img_rot_angle = 0; 158 | end 159 | 160 | if ~exist('resolution_dpi', 'var') 161 | resolution_dpi = 150; 162 | end 163 | 164 | fid = figure; 165 | 166 | %display voxel grid 167 | voxels_voted1 = (reshape(obj.voxels_voted(:,4), size(obj.voxel3Dx))); 168 | maxv = max(obj.voxels_voted(:)); 169 | % fid = figure; 170 | for j=1:size(voxels_voted1,3) 171 | % figure(fid), 172 | img = (squeeze(voxels_voted1(:,:,j))); 173 | if img_rot_angle >0 174 | img = imrotate(img, img_rot_angle); 175 | end 176 | img_filename = [path, num2str(j, '%03d'), '.png' ]; 177 | imagesc(img, [0 maxv]); 178 | % title([num2str(j, '%03d')]), axis equal; 179 | % saveas(fid, img_filename) 180 | % ax = gca; 181 | exportgraphics(fid,img_filename, 'Resolution', resolution_dpi); 182 | 183 | 184 | end 185 | 186 | close(fid); 187 | end 188 | 189 | function [] = SaveGeoemtry2STL(obj, filename, error_amount) 190 | %SaveGeoemtry2STL - save geometry to stl file 191 | 192 | if ~exist('display_projected_voxels', 'var') 193 | cdate = datestr(now, 'yyyy.mm.dd'); 194 | filename = [obj.DataLoader.PathBase '_VH_' cdate '.stl']; 195 | end 196 | 197 | if ~exist('error_amount', 'var') 198 | error_amount = 5; 199 | end 200 | fv = CalcIsosurface(obj, error_amount); 201 | patch2stl(filename, fv); 202 | end 203 | 204 | end 205 | end 206 | 207 | -------------------------------------------------------------------------------- /assets/temple_fov.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/assets/temple_fov.png -------------------------------------------------------------------------------- /assets/temple_fov_intersection.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/assets/temple_fov_intersection.png -------------------------------------------------------------------------------- /assets/temple_fov_union.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/assets/temple_fov_union.png -------------------------------------------------------------------------------- /assets/temple_sparse_ring.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/assets/temple_sparse_ring.png -------------------------------------------------------------------------------- /assets/temple_vh_001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/assets/temple_vh_001.png -------------------------------------------------------------------------------- /assets/temple_vh_002.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/assets/temple_vh_002.png -------------------------------------------------------------------------------- /assets/temple_vh_003.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/assets/temple_vh_003.png -------------------------------------------------------------------------------- /assets/temple_vh_004.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/assets/temple_vh_004.png -------------------------------------------------------------------------------- /assets/temple_vh_005.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/assets/temple_vh_005.png -------------------------------------------------------------------------------- /assets/temple_vh_006.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/assets/temple_vh_006.png -------------------------------------------------------------------------------- /assets/temple_vh_007.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/assets/temple_vh_007.png -------------------------------------------------------------------------------- /assets/temple_vh_008.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/assets/temple_vh_008.png -------------------------------------------------------------------------------- /assets/temple_vh_009.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/assets/temple_vh_009.png -------------------------------------------------------------------------------- /assets/temple_vh_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/assets/temple_vh_01.png -------------------------------------------------------------------------------- /assets/temple_vh_010.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/assets/temple_vh_010.png -------------------------------------------------------------------------------- /assets/temple_vh_011.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/assets/temple_vh_011.png -------------------------------------------------------------------------------- /assets/temple_vh_012.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/assets/temple_vh_012.png -------------------------------------------------------------------------------- /assets/temple_vh_013.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/assets/temple_vh_013.png -------------------------------------------------------------------------------- /assets/temple_vh_014.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/assets/temple_vh_014.png -------------------------------------------------------------------------------- /assets/temple_vh_015.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/assets/temple_vh_015.png -------------------------------------------------------------------------------- /assets/temple_vh_016.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/assets/temple_vh_016.png -------------------------------------------------------------------------------- /assets/temple_vh_017.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/assets/temple_vh_017.png -------------------------------------------------------------------------------- /assets/temple_vh_018.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/assets/temple_vh_018.png -------------------------------------------------------------------------------- /assets/temple_vh_019.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/assets/temple_vh_019.png -------------------------------------------------------------------------------- /assets/temple_vh_020.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/assets/temple_vh_020.png -------------------------------------------------------------------------------- /assets/temple_vh_021.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/assets/temple_vh_021.png -------------------------------------------------------------------------------- /assets/temple_vh_022.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/assets/temple_vh_022.png -------------------------------------------------------------------------------- /assets/temple_vh_023.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/assets/temple_vh_023.png -------------------------------------------------------------------------------- /assets/temple_vh_024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/assets/temple_vh_024.png -------------------------------------------------------------------------------- /assets/temple_vh_025.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/assets/temple_vh_025.png -------------------------------------------------------------------------------- /assets/temple_vh_026.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/assets/temple_vh_026.png -------------------------------------------------------------------------------- /assets/temple_vh_027.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/assets/temple_vh_027.png -------------------------------------------------------------------------------- /assets/temple_vh_028.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/assets/temple_vh_028.png -------------------------------------------------------------------------------- /assets/temple_vh_029.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/assets/temple_vh_029.png -------------------------------------------------------------------------------- /assets/temple_vh_030.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/assets/temple_vh_030.png -------------------------------------------------------------------------------- /assets/temple_vh_031.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/assets/temple_vh_031.png -------------------------------------------------------------------------------- /assets/temple_vh_032.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/assets/temple_vh_032.png -------------------------------------------------------------------------------- /assets/temple_vh_033.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/assets/temple_vh_033.png -------------------------------------------------------------------------------- /assets/temple_vh_034.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/assets/temple_vh_034.png -------------------------------------------------------------------------------- /assets/temple_vh_035.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/assets/temple_vh_035.png -------------------------------------------------------------------------------- /assets/temple_vh_036.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/assets/temple_vh_036.png -------------------------------------------------------------------------------- /assets/temple_vh_037.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/assets/temple_vh_037.png -------------------------------------------------------------------------------- /assets/temple_vh_038.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/assets/temple_vh_038.png -------------------------------------------------------------------------------- /assets/temple_vh_039.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/assets/temple_vh_039.png -------------------------------------------------------------------------------- /assets/temple_vh_040.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/assets/temple_vh_040.png -------------------------------------------------------------------------------- /assets/temple_vh_041.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/assets/temple_vh_041.png -------------------------------------------------------------------------------- /assets/temple_vh_042.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/assets/temple_vh_042.png -------------------------------------------------------------------------------- /assets/temple_vh_043.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/assets/temple_vh_043.png -------------------------------------------------------------------------------- /assets/temple_vh_044.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/assets/temple_vh_044.png -------------------------------------------------------------------------------- /assets/temple_vh_045.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/assets/temple_vh_045.png -------------------------------------------------------------------------------- /assets/temple_vh_046.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/assets/temple_vh_046.png -------------------------------------------------------------------------------- /assets/temple_vh_047.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/assets/temple_vh_047.png -------------------------------------------------------------------------------- /assets/temple_vh_048.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/assets/temple_vh_048.png -------------------------------------------------------------------------------- /assets/temple_vh_049.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/assets/temple_vh_049.png -------------------------------------------------------------------------------- /assets/temple_vh_050.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/assets/temple_vh_050.png -------------------------------------------------------------------------------- /assets/temple_vh_051.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/assets/temple_vh_051.png -------------------------------------------------------------------------------- /assets/temple_vh_052.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/assets/temple_vh_052.png -------------------------------------------------------------------------------- /assets/temple_vh_053.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/assets/temple_vh_053.png -------------------------------------------------------------------------------- /assets/temple_vh_054.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/assets/temple_vh_054.png -------------------------------------------------------------------------------- /assets/temple_vh_055.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/assets/temple_vh_055.png -------------------------------------------------------------------------------- /assets/temple_vh_056.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/assets/temple_vh_056.png -------------------------------------------------------------------------------- /assets/temple_vh_057.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/assets/temple_vh_057.png -------------------------------------------------------------------------------- /assets/temple_vh_058.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/assets/temple_vh_058.png -------------------------------------------------------------------------------- /assets/temple_vh_059.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/assets/temple_vh_059.png -------------------------------------------------------------------------------- /assets/temple_vh_060.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/assets/temple_vh_060.png -------------------------------------------------------------------------------- /assets/temple_vh_061.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/assets/temple_vh_061.png -------------------------------------------------------------------------------- /assets/temple_vh_062.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/assets/temple_vh_062.png -------------------------------------------------------------------------------- /assets/temple_vh_063.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/assets/temple_vh_063.png -------------------------------------------------------------------------------- /assets/temple_vh_064.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/assets/temple_vh_064.png -------------------------------------------------------------------------------- /assets/temple_vh_065.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/assets/temple_vh_065.png -------------------------------------------------------------------------------- /assets/temple_vh_066.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/assets/temple_vh_066.png -------------------------------------------------------------------------------- /assets/temple_vh_067.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/assets/temple_vh_067.png -------------------------------------------------------------------------------- /assets/temple_vh_068.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/assets/temple_vh_068.png -------------------------------------------------------------------------------- /assets/temple_vh_069.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/assets/temple_vh_069.png -------------------------------------------------------------------------------- /assets/temple_vh_070.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/assets/temple_vh_070.png -------------------------------------------------------------------------------- /assets/temple_vh_071.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/assets/temple_vh_071.png -------------------------------------------------------------------------------- /assets/temple_vh_072.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/assets/temple_vh_072.png -------------------------------------------------------------------------------- /assets/temple_vh_073.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/assets/temple_vh_073.png -------------------------------------------------------------------------------- /assets/temple_vh_074.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/assets/temple_vh_074.png -------------------------------------------------------------------------------- /assets/temple_vh_075.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/assets/temple_vh_075.png -------------------------------------------------------------------------------- /assets/temple_vh_076.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/assets/temple_vh_076.png -------------------------------------------------------------------------------- /assets/temple_vh_077.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/assets/temple_vh_077.png -------------------------------------------------------------------------------- /assets/temple_vh_078.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/assets/temple_vh_078.png -------------------------------------------------------------------------------- /assets/temple_vh_079.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/assets/temple_vh_079.png -------------------------------------------------------------------------------- /assets/temple_vh_080.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/assets/temple_vh_080.png -------------------------------------------------------------------------------- /assets/temple_vh_081.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/assets/temple_vh_081.png -------------------------------------------------------------------------------- /assets/temple_vh_082.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/assets/temple_vh_082.png -------------------------------------------------------------------------------- /assets/temple_vh_083.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/assets/temple_vh_083.png -------------------------------------------------------------------------------- /assets/temple_vh_084.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/assets/temple_vh_084.png -------------------------------------------------------------------------------- /assets/temple_vh_085.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/assets/temple_vh_085.png -------------------------------------------------------------------------------- /assets/temple_vh_086.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/assets/temple_vh_086.png -------------------------------------------------------------------------------- /assets/temple_vh_087.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/assets/temple_vh_087.png -------------------------------------------------------------------------------- /assets/temple_vh_088.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/assets/temple_vh_088.png -------------------------------------------------------------------------------- /assets/temple_vh_089.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/assets/temple_vh_089.png -------------------------------------------------------------------------------- /assets/temple_vh_090.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/assets/temple_vh_090.png -------------------------------------------------------------------------------- /assets/temple_vh_091.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/assets/temple_vh_091.png -------------------------------------------------------------------------------- /assets/temple_vh_092.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/assets/temple_vh_092.png -------------------------------------------------------------------------------- /assets/temple_vh_093.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/assets/temple_vh_093.png -------------------------------------------------------------------------------- /assets/temple_vh_094.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/assets/temple_vh_094.png -------------------------------------------------------------------------------- /assets/temple_vh_095.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/assets/temple_vh_095.png -------------------------------------------------------------------------------- /assets/temple_vh_096.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/assets/temple_vh_096.png -------------------------------------------------------------------------------- /assets/temple_vh_097.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/assets/temple_vh_097.png -------------------------------------------------------------------------------- /assets/temple_vh_098.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/assets/temple_vh_098.png -------------------------------------------------------------------------------- /assets/temple_vh_099.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/assets/temple_vh_099.png -------------------------------------------------------------------------------- /assets/temple_vh_100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/assets/temple_vh_100.png -------------------------------------------------------------------------------- /assets/temple_vh_60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/assets/temple_vh_60.png -------------------------------------------------------------------------------- /assets/temple_vh_90.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/assets/temple_vh_90.png -------------------------------------------------------------------------------- /assets/temple_vh_slice_animation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/assets/temple_vh_slice_animation.png -------------------------------------------------------------------------------- /dinoSparseRing/README.txt: -------------------------------------------------------------------------------- 1 | dinoSparseRing data set -- 16 views sampled on a ring 2 | 3 | The object is an untextured, matte, ceramic dinosaur against a black background. 4 | Note that the object is partially outside the field of view in some images. Also, there are some dark shadows on the object--be conservative if using thresholding to detect background pixels. 5 | 6 | The (tight) bounding box for the dino model is 7 | (-0.061897 -0.018874 -0.057845) 8 | (0.010897 0.068227 0.015495) 9 | 10 | -------------------------- 11 | Created by Steve Seitz, James Diebel, Daniel Scharstein, Brian Curless, and Rick Szeliski 12 | 13 | This directory contains images with camera calibration parameters. 14 | 15 | The images were captured using the Stanford spherical light field gantry, and calibrated by the above people. 16 | 17 | *.png: images in png format 18 | *_par.txt: camera parameters. There is one line for each image. The format for each line is: 19 | "imgname.png k11 k12 k13 k21 k22 k23 k31 k32 k33 r11 r12 r13 r21 r22 r23 r31 r32 r33 t1 t2 t3" 20 | The projection matrix for that image is given by K*[R t] 21 | The image origin is top-left, with x increasing horizontally, y vertically 22 | *_ang.txt: latitude, longitude angles for each image. Not needed to compute scene->image mapping, but may be helpful for visualization. 23 | *_good_silhouette_images.txt: list of images that we could process to get good silhouettes. 24 | 25 | Note that (lat, lon) corresponds to the same image as (-lat, 180 + lon), rotated 180 degrees in the image plane. While it would therefore be sufficient in principle to capture only positive latitude images, in practice some images are not useable because of shadows where the gantry occludes the light source. Because the gantry is in a different configuration for positive vs. negative latitude images, this gives us two chances to capture each viewpoint without shadows. It is for this reason that some images may have positive and others negative latitudes. This also explains why some images may appear to be "upside-down" (in fact they're rotated 180 degrees). 26 | 27 | Some multiview stereo algorithms start from the visual hull after extracting per-image silhouettes. In our own experiments, we had success computing conservative visual hulls using the *_good_silhouette_images.txt images. To extract silhouettes from these images, we 28 | 29 | 1. thresholded at 0.19 (where color values range from 0 to 1), 30 | 2. dilated by 10 pixels 31 | 3. eroded by 7 pixels 32 | 33 | All of these operations are straightforward in Matlab. You are free to use this recipe. 34 | 35 | -------------------------------------------------------------------------------- /dinoSparseRing/Thumbs.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/dinoSparseRing/Thumbs.db -------------------------------------------------------------------------------- /dinoSparseRing/dinoSR0001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/dinoSparseRing/dinoSR0001.png -------------------------------------------------------------------------------- /dinoSparseRing/dinoSR0002.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/dinoSparseRing/dinoSR0002.png -------------------------------------------------------------------------------- /dinoSparseRing/dinoSR0003.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/dinoSparseRing/dinoSR0003.png -------------------------------------------------------------------------------- /dinoSparseRing/dinoSR0004.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/dinoSparseRing/dinoSR0004.png -------------------------------------------------------------------------------- /dinoSparseRing/dinoSR0005.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/dinoSparseRing/dinoSR0005.png -------------------------------------------------------------------------------- /dinoSparseRing/dinoSR0006.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/dinoSparseRing/dinoSR0006.png -------------------------------------------------------------------------------- /dinoSparseRing/dinoSR0007.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/dinoSparseRing/dinoSR0007.png -------------------------------------------------------------------------------- /dinoSparseRing/dinoSR0008.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/dinoSparseRing/dinoSR0008.png -------------------------------------------------------------------------------- /dinoSparseRing/dinoSR0009.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/dinoSparseRing/dinoSR0009.png -------------------------------------------------------------------------------- /dinoSparseRing/dinoSR0010.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/dinoSparseRing/dinoSR0010.png -------------------------------------------------------------------------------- /dinoSparseRing/dinoSR0011.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/dinoSparseRing/dinoSR0011.png -------------------------------------------------------------------------------- /dinoSparseRing/dinoSR0012.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/dinoSparseRing/dinoSR0012.png -------------------------------------------------------------------------------- /dinoSparseRing/dinoSR0013.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/dinoSparseRing/dinoSR0013.png -------------------------------------------------------------------------------- /dinoSparseRing/dinoSR0014.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/dinoSparseRing/dinoSR0014.png -------------------------------------------------------------------------------- /dinoSparseRing/dinoSR0015.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/dinoSparseRing/dinoSR0015.png -------------------------------------------------------------------------------- /dinoSparseRing/dinoSR0016.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/dinoSparseRing/dinoSR0016.png -------------------------------------------------------------------------------- /dinoSparseRing/dinoSR_ang.txt: -------------------------------------------------------------------------------- 1 | -74.347826 172.173913 dinoSR0001.png 2 | -74.347826 148.695652 dinoSR0002.png 3 | -74.347826 125.217391 dinoSR0003.png 4 | -74.347826 101.73913 dinoSR0004.png 5 | -74.347826 78.26087 dinoSR0005.png 6 | -74.347826 54.782609 dinoSR0006.png 7 | -74.347826 31.304348 dinoSR0007.png 8 | -74.347826 7.826087 dinoSR0008.png 9 | -74.347826 -15.652174 dinoSR0009.png 10 | -74.347826 -39.130435 dinoSR0010.png 11 | -74.347826 -62.608696 dinoSR0011.png 12 | -74.347826 -86.086957 dinoSR0012.png 13 | -74.347826 -109.565217 dinoSR0013.png 14 | -74.347826 -133.043478 dinoSR0014.png 15 | -74.347826 -156.521739 dinoSR0015.png 16 | -74.347826 -180.0 dinoSR0016.png 17 | -------------------------------------------------------------------------------- /dinoSparseRing/dinoSR_good_silhouette_images.txt: -------------------------------------------------------------------------------- 1 | dinoSR0001.png 2 | dinoSR0002.png 3 | dinoSR0003.png 4 | dinoSR0004.png 5 | dinoSR0005.png 6 | dinoSR0007.png 7 | dinoSR0008.png 8 | dinoSR0009.png 9 | dinoSR0010.png 10 | dinoSR0011.png 11 | dinoSR0012.png 12 | dinoSR0013.png 13 | dinoSR0014.png 14 | dinoSR0015.png 15 | dinoSR0016.png 16 | -------------------------------------------------------------------------------- /dinoSparseRing/dinoSR_par.txt: -------------------------------------------------------------------------------- 1 | 16 2 | dinoSR0001.png 3310.400000 0.000000 316.730000 0.000000 3325.500000 200.550000 0.000000 0.000000 1.000000 -0.14396457836077139000 0.96965263281337499000 0.19760617153779569000 -0.90366580603479685000 -0.04743335255026152200 -0.42560419233334673000 -0.40331536459778505000 -0.23984130575212276000 0.88306936201487163000 -0.010415508744 -0.0294278883669 0.673097816109 3 | dinoSR0002.png 3310.400000 0.000000 316.730000 0.000000 3325.500000 200.550000 0.000000 0.000000 1.000000 -0.23143687262851170000 0.96422332027030622000 0.12926937165558827000 -0.65860811165749811000 -0.05749426020475298400 -0.75028640486482034000 -0.71601208187197274000 -0.25878137856376976000 0.64835049619606955000 -0.0143392676288 -0.0315356332107 0.659314086504 4 | dinoSR0003.png 3310.400000 0.000000 316.730000 0.000000 3325.500000 200.550000 0.000000 0.000000 1.000000 -0.28437648559126744000 0.95818717180552493000 0.03174117685280887500 -0.30447985736374050000 -0.05887271324279850400 -0.95069715013877931000 -0.90907810612855156000 -0.28002026823733883000 0.30848995461910772000 -0.0181396767412 -0.0277593369636 0.645855774902 5 | dinoSR0004.png 3310.400000 0.000000 316.730000 0.000000 3325.500000 200.550000 0.000000 0.000000 1.000000 -0.29401781384102649000 0.95254363718061841000 -0.07882994806514329000 0.10008332165785941000 -0.05134047099598639700 -0.99365293826058598000 -0.95054606727387558000 -0.30004129466721602000 -0.08023903828591291700 -0.021187474226 -0.0187242689354 0.634951273531 6 | dinoSR0005.png 3310.400000 0.000000 316.730000 0.000000 3325.500000 200.550000 0.000000 0.000000 1.000000 -0.25876447372510059000 0.94822715832320814000 -0.18413591973560506000 0.48809489134507961000 -0.03614470332115014800 -0.87204127006075205000 -0.83354981633995029000 -0.31552942785272814000 -0.45347173237683847000 -0.022978013659 -0.00592643278493 0.628406121531 7 | dinoSR0006.png 3310.400000 0.000000 316.730000 0.000000 3325.500000 200.550000 0.000000 0.000000 1.000000 -0.18445361863808038000 0.94595244621195196000 -0.26674045813558944000 0.79530893787266643000 -0.01580148462641393200 -0.60599827900975589000 -0.57746127839962313000 -0.32392018428954944000 -0.74940926036560773000 -0.023214822329 0.00851514014266 0.627304047594 8 | dinoSR0007.png 3310.400000 0.000000 316.730000 0.000000 3325.500000 200.550000 0.000000 0.000000 1.000000 -0.08338944722911310900 0.94609614197942327000 -0.31296611393889306000 0.97085774118013590000 0.00632080735562845670 -0.23957467325849086000 -0.22468292908270854000 -0.32382424357508255000 -0.91905103946950217000 -0.0218586899664 0.0222092512892 0.631827530638 9 | dinoSR0008.png 3310.400000 0.000000 316.730000 0.000000 3325.500000 200.550000 0.000000 0.000000 1.000000 0.02769409788772111600 0.94863445285422510000 -0.31515896329964094000 0.98567438705285304000 0.02655922106302938800 0.16655807969272288000 0.16637311017687328000 -0.31525749132326808000 -0.93430822517618106000 -0.0191341614402 0.032888465352 0.641227584108 10 | dinoSR0009.png 3310.400000 0.000000 316.730000 0.000000 3325.500000 200.550000 0.000000 0.000000 1.000000 0.13040409226215816000 0.95314709192435443000 -0.27295591992471341000 0.83730557380822779000 0.04156273259821786900 0.54515357504151063000 0.53095679761230619000 -0.29963838808815157000 -0.79265457236327796000 -0.0154923570967 0.0387845458454 0.653947771602 11 | dinoSR0010.png 3310.400000 0.000000 316.730000 0.000000 3325.500000 200.550000 0.000000 0.000000 1.000000 0.20773408219460512000 0.95888686815084223000 -0.19334485395770235000 0.55031782360679693000 0.04884709954828619200 0.83352495546947669000 0.80870131461201522000 -0.27955310435503949000 -0.51754472439450017000 -0.0115362774261 0.0389212350981 0.667881917561 12 | dinoSR0011.png 3310.400000 0.000000 316.730000 0.000000 3325.500000 200.550000 0.000000 0.000000 1.000000 0.24687996910258325000 0.96490340431639521000 -0.08950755861736174600 0.17222982161524675000 0.04720619538171529800 0.98392443791612039000 0.95361844651938554000 -0.25832730915868130000 -0.15453065428161436000 -0.00792095980974 0.0332759004593 0.680722842344 13 | dinoSR0012.png 3310.400000 0.000000 316.730000 0.000000 3325.500000 200.550000 0.000000 0.000000 1.000000 0.24136007885803201000 0.97020049801291686000 0.02136285683511320000 -0.23435560427802821000 0.03691171674209103900 0.97144926729660463000 0.94171319159119948000 -0.23947551445521581000 0.23628071251718805000 -0.00524501913431 0.0227832817537 0.690344379027 14 | dinoSR0013.png 3310.400000 0.000000 316.730000 0.000000 3325.500000 200.550000 0.000000 0.000000 1.000000 0.19208838346748064000 0.97390107013119698000 0.12090875365304035000 -0.60211708293559318000 0.01966819746967938400 0.79816506039694313000 0.77495680106296283000 -0.22611915179071745000 0.59017983305303656000 -0.00395153071793 0.00918072010801 0.695153418505 15 | dinoSR0014.png 3310.400000 0.000000 316.730000 0.000000 3325.500000 200.550000 0.000000 0.000000 1.000000 0.10722315794998927000 0.97539238987661836000 0.19264758954063826000 -0.87016165622960684000 -0.00166922681646456020 0.49276375089511210000 0.48096035030627776000 -0.22046973183084473000 0.84856904123286236000 -0.00425466689932 -0.00527950884591 0.694353692934 16 | dinoSR0015.png 3310.400000 0.000000 316.730000 0.000000 3325.500000 200.550000 0.000000 0.000000 1.000000 0.00081616679574048404 0.97442752820786405000 0.22470103004948633000 -0.99410718398935161000 -0.02356756030268754300 0.10581289727836769000 0.10840301080819337000 -0.22346267154279231000 0.96866490777520942000 -0.00610423526503 -0.018203117484 0.68807761848 17 | dinoSR0016.png 3310.400000 0.000000 316.730000 0.000000 3325.500000 200.550000 0.000000 0.000000 1.000000 -0.10951399718548831000 0.97116624441025123000 0.21176174987744156000 -0.95343108813509980000 -0.04240093389221950800 -0.29861718464681830000 -0.28102814225222095000 -0.23460240775428165000 0.93058227149100015000 -0.00919398909617 -0.0274502483048 0.677364371223 18 | -------------------------------------------------------------------------------- /main_old.m: -------------------------------------------------------------------------------- 1 | clear all 2 | % data_dir = 'templeRing/'; 3 | % data_dir = 'templeSparseRing/'; 4 | % data_dir = 'dinoRing/'; 5 | data_dir = 'dinoSparseRing/'; 6 | 7 | T = 20; %threshold to get object silhouette 8 | 9 | params_str = '_par.txt'; 10 | files = dir([data_dir '*' params_str]); 11 | if length(files) ~= 1 12 | disp('Cannot find parametrs files') 13 | return; 14 | end 15 | file_base = files(1).name(1:end-length(params_str)); 16 | 17 | %% 1 load camera params 18 | fid = fopen([data_dir file_base '_par.txt'], 'r'); 19 | res = textscan(fid,'%d'); 20 | N = res{1,1}; 21 | for i=1:N 22 | textscan(fid,'%s',1); 23 | res = textscan(fid,'%f', 21); 24 | tmp =res{1}'; 25 | K = reshape(tmp(1:9), 3, 3)'; 26 | R = reshape(tmp(10:18), 3, 3)'; 27 | t = tmp(19:21)'; 28 | M(:,:,i) = [R t]; 29 | KM(:,:,i) = K*[R t]; 30 | end 31 | fclose(fid); 32 | 33 | %% 2 load images 34 | for i=1:N 35 | imgs(:,:,:,i) = imread([data_dir file_base num2str(i, '%04i') '.png']); 36 | end 37 | 38 | %% 3 compute silhouettes 39 | for i=1:size(imgs,4) 40 | ch1 = imgs(:,:,1,i)>T; 41 | ch2 = imgs(:,:,2,i)>T; 42 | ch3 = imgs(:,:,3,i)>T; 43 | silhouettes(:,:,i) = (ch1+ch2+ch3)>0; 44 | end 45 | 46 | %% 4 create voxel grid 47 | 48 | switch file_base 49 | case 'dinoSR' 50 | % dinoSR bounding box 51 | xlim = [-0.07 0.02]; 52 | ylim = [-0.02 0.07]; 53 | zlim = [-0.07 0.02]; 54 | case 'dinoR' 55 | % dinoR bounding box 56 | xlim = [-0.03 0.06]; 57 | ylim = [0.022 0.11]; 58 | zlim = [-0.02 0.06]; 59 | 60 | case 'templeSR' 61 | % templeSR bounding box 62 | xlim = [-0.15 0.05]; 63 | ylim = [-0.05 0.2]; 64 | zlim = [-0.1 0.1]; 65 | 66 | case 'templeR' 67 | % templeR bounding box 68 | xlim = [-0.05 0.11]; 69 | ylim = [-0.04 0.15]; 70 | zlim = [-0.1 0.06]; 71 | 72 | otherwise 73 | xlim = [-0.08 0.11]; 74 | ylim = [-0.03 0.18]; 75 | zlim = [-0.1 0.06]; 76 | end 77 | 78 | voxel_nb = [100, 100, 100]; 79 | voxel_size = [diff(xlim)/voxel_nb(1), diff(ylim)/voxel_nb(2), diff(zlim)/voxel_nb(3)]; 80 | [voxels, voxel3Dx, voxel3Dy, voxel3Dz, voxels_number] = InitializeVoxels(xlim, ylim, zlim, voxel_size); 81 | 82 | 83 | %% 5 project voxel to silhouette 84 | display_projected_voxels = 0; 85 | camera_depth_range = [-1 1]; 86 | [voxels_voted] = CreateVisualHull(silhouettes, voxels, K, M, camera_depth_range, display_projected_voxels); 87 | 88 | % display voxel grid 89 | % voxels_voted1 = (reshape(voxels_voted(:,4), size(voxel3Dx))); 90 | % maxv = max(voxels_voted(:)); 91 | % fid = figure; 92 | % for j=1:size(voxels_voted1,3) 93 | % figure(fid), imagesc((squeeze(voxels_voted1(:,:,j))), [0 maxv]), title([num2str(j), ' - press any key to continue']), axis equal, 94 | % pause, 95 | % end 96 | 97 | %% 6 apply marching cube algorithm and display the result 98 | error_amount = 5; 99 | maxv = max(voxels_voted(:,4)); 100 | iso_value = maxv-round(((maxv)/100)*error_amount)-0.5; 101 | disp(['max number of votes:' num2str(maxv)]) 102 | disp(['threshold for marching cube:' num2str(iso_value)]); 103 | 104 | [voxel3D] = ConvertVoxelList2Voxel3D(voxels_number, voxels_voted); 105 | 106 | [fv] = isosurface(voxel3Dx, voxel3Dy, voxel3Dz, voxel3D, iso_value, voxel3Dz); 107 | [faces, verts, colors] = isosurface(voxel3Dx, voxel3Dy, voxel3Dz, voxel3D, iso_value, voxel3Dz); 108 | 109 | fid = figure; 110 | 111 | p=patch('vertices', verts, 'faces', faces, ... 112 | 'facevertexcdata', colors, ... 113 | 'facecolor','flat', ... 114 | 'edgecolor', 'interp'); 115 | 116 | set(p,'FaceColor', [0.5 0.5 0.5], 'FaceLighting', 'flat',... 117 | 'EdgeColor', 'none', 'SpecularStrength', 0, 'AmbientStrength', 0.4, 'DiffuseStrength', 0.6); 118 | 119 | set(gca,'DataAspectRatio',[1 1 1], 'PlotBoxAspectRatio',[1 1 1],... 120 | 'PlotBoxAspectRatioMode', 'manual'); 121 | 122 | axis vis3d; 123 | 124 | light('Position',[1 1 0.5], 'Visible', 'on'); 125 | light('Position',[1 -1 0.5], 'Visible', 'on'); 126 | light('Position',[-1 1 0.5], 'Visible', 'on'); 127 | light('Position',[-1 -1 0.5], 'Visible', 'on'); 128 | 129 | ka = 0.1; kd = 0.4; ks = 0; 130 | material([ka kd ks]) 131 | 132 | axis equal; 133 | axis tight 134 | % axis off 135 | grid on 136 | 137 | cameratoolbar('Show') 138 | cameratoolbar('SetMode','orbit') 139 | cameratoolbar('SetCoordSys','y') 140 | 141 | %% 7 save VH to stl file 142 | % cdate = datestr(now, 'yyyy.mm.dd'); 143 | % filename = [data_dir file_base '_VH_' cdate '.stl']; 144 | % patch2stl(filename, fv); -------------------------------------------------------------------------------- /main_visual_hull.m: -------------------------------------------------------------------------------- 1 | clear all 2 | 3 | %dataset path 4 | data_dir = 'templeSparseRing/'; 5 | % data_dir = 'dinoSparseRing/'; 6 | 7 | % paremeters 8 | silhouette_thresold = 20; 9 | voxel_grid_size_xyz = [100, 100, 100]; 10 | 11 | %load data 12 | DL = DataLoader(data_dir); 13 | DL = DL.LoadCameraParams(); 14 | DL = DL.LoadImages(); 15 | DL = DL.CalcFOVUnion(); 16 | 17 | %calc visual hull 18 | VH = VisualHull(DL); 19 | VH = VH.ExtractSilhoueteFromImages(silhouette_thresold); 20 | VH = VH.CreateVoxelGrid(voxel_grid_size_xyz); 21 | VH = VH.ProjectVoxelsToSilhouette(); 22 | 23 | % show results 24 | figure; 25 | VH.ShowVH3D(); 26 | % hold on; 27 | % DL.PlotFOV([1 2 3]); 28 | 29 | figure; 30 | VH.ShowVH3D(); 31 | hold on; 32 | DL.PlotFOV([], 'blue', 0.1); 33 | DL.PlotBoudningVolume('green', 1); 34 | 35 | figure; VH.ShowVH2DGrid(180); 36 | 37 | % save results to stl file 38 | % VH.SaveGeoemtry2STL() -------------------------------------------------------------------------------- /patch2stl.m: -------------------------------------------------------------------------------- 1 | function patch2stl(filename,p,mode) 2 | %PATCH2STL Write STL file from patch (vertices/faces) data. 3 | % PATCH2STL('filename',p) writes a stereolithography (STL) file 4 | % for a patch mesh defined by P. P must be a structure with 'VERTICES' 5 | % and 'FACES' fields. 6 | % 7 | % PATCH2STL(...,'mode') may be used to specify the output format. 8 | % 9 | % 'binary' - writes in STL binary format (default) 10 | % 'ascii' - writes in STL ASCII format 11 | % 12 | % Example: 13 | % 14 | % tmpvol = zeros(20,20,20); % Empty voxel volume 15 | % tmpvol(8:12,8:12,5:15) = 1; % Turn some voxels on 16 | % fv = isosurface(tmpvol, 0.99); % Create the patch object 17 | % patch2stl('test.stl',fv) % Save to binary .stl 18 | 19 | % Based on surf2stl by Bill McDonald 20 | % 21 | % Author: Sven Holcombe, 07-30-08 22 | 23 | error(nargchk(2,3,nargin)); 24 | 25 | if (ischar(filename)==0) 26 | error( 'Invalid filename'); 27 | end 28 | 29 | if (nargin < 3) 30 | mode = 'binary'; 31 | elseif (strcmp(mode,'ascii')==0) 32 | mode = 'binary'; 33 | end 34 | 35 | if (~(isfield(p,'vertices') && isfield(p,'faces'))) 36 | error( 'Variable p must be a faces/vertices structure' ); 37 | end 38 | 39 | if strcmp(mode,'ascii') 40 | % Open for writing in ascii mode 41 | fid = fopen(filename,'w'); 42 | else 43 | % Open for writing in binary mode 44 | fid = fopen(filename,'wb+'); 45 | end 46 | 47 | if (fid == -1) 48 | error('patch2stl:cannotWriteFile', 'Unable to write to %s', filename); 49 | end 50 | 51 | title_str = sprintf('Created by patch2stl.m %s',datestr(now)); 52 | 53 | if strcmp(mode,'ascii') 54 | fprintf(fid,'solid %s\r\n',title_str); 55 | else 56 | str = sprintf('%-80s',title_str); 57 | fwrite(fid,str,'uchar'); % Title 58 | fwrite(fid,0,'int32'); % Number of facets, zero for now 59 | end 60 | 61 | nfacets = 0; 62 | % Main loop 63 | for i=1:length(p.faces) 64 | p123 = p.vertices(p.faces(i,:),:); 65 | val = local_write_facet(fid,p123(1,:),p123(2,:),p123(3,:),mode); 66 | nfacets = nfacets + val; 67 | end 68 | 69 | if strcmp(mode,'ascii') 70 | fprintf(fid,'endsolid %s\r\n',title_str); 71 | else 72 | fseek(fid,0,'bof'); 73 | fseek(fid,80,'bof'); 74 | fwrite(fid,nfacets,'int32'); 75 | end 76 | 77 | fclose(fid); 78 | 79 | disp( sprintf('Wrote %d facets',nfacets) ); 80 | 81 | 82 | % Local subfunctions 83 | 84 | function num = local_write_facet(fid,p1,p2,p3,mode) 85 | 86 | if any( isnan(p1) | isnan(p2) | isnan(p3) ) 87 | num = 0; 88 | return; 89 | else 90 | num = 1; 91 | n = local_find_normal(p1,p2,p3); 92 | 93 | if strcmp(mode,'ascii') 94 | 95 | fprintf(fid,'facet normal %.7E %.7E %.7E\r\n', n(1),n(2),n(3) ); 96 | fprintf(fid,'outer loop\r\n'); 97 | fprintf(fid,'vertex %.7E %.7E %.7E\r\n', p1); 98 | fprintf(fid,'vertex %.7E %.7E %.7E\r\n', p2); 99 | fprintf(fid,'vertex %.7E %.7E %.7E\r\n', p3); 100 | fprintf(fid,'endloop\r\n'); 101 | fprintf(fid,'endfacet\r\n'); 102 | 103 | else 104 | 105 | fwrite(fid,n,'float32'); 106 | fwrite(fid,p1,'float32'); 107 | fwrite(fid,p2,'float32'); 108 | fwrite(fid,p3,'float32'); 109 | fwrite(fid,0,'int16'); % unused 110 | 111 | end 112 | 113 | end 114 | 115 | 116 | function n = local_find_normal(p1,p2,p3) 117 | 118 | v1 = p2-p1; 119 | v2 = p3-p1; 120 | v3 = cross(v1,v2); 121 | n = v3 ./ sqrt(sum(v3.*v3)); 122 | -------------------------------------------------------------------------------- /templeSparseRing/README.txt: -------------------------------------------------------------------------------- 1 | templeSparseRing data set -- 16 views sampled on a ring 2 | 3 | The object is a plaster replica of "Temple of the Dioskouroi" in Agrigento (Sicily) 4 | 5 | The (tight) bounding box for the templeSparseRing model is 6 | (-0.073568 0.021728 -0.012445) 7 | (0.028855 0.181892 0.062736) 8 | 9 | 10 | -------------------------- 11 | Created by Steve Seitz, James Diebel, Daniel Scharstein, Brian Curless, and Rick Szeliski 12 | 13 | This directory contains images with camera calibration parameters. 14 | 15 | The images were captured using the Stanford spherical light field gantry, and calibrated by the above people. 16 | 17 | *.png: images in png format 18 | *_par.txt: camera parameters. There is one line for each image. The format for each line is: 19 | "imgname.png k11 k12 k13 k21 k22 k23 k31 k32 k33 r11 r12 r13 r21 r22 r23 r31 r32 r33 t1 t2 t3" 20 | The projection matrix for that image is given by K*[R t] 21 | The image origin is top-left, with x increasing horizontally, y vertically 22 | *_ang.txt: latitude, longitude angles for each image. Not needed to compute scene->image mapping, but may be helpful for visualization. 23 | 24 | Note that (lat, lon) corresponds to the same image as (-lat, 180 + lon), rotated 180 degrees in the image plane. While it would therefore be sufficient in principle to capture only positive latitude images, in practice some images are not useable because of shadows where the gantry occludes the light source. Because the gantry is in a different configuration for positive vs. negative latitude images, this gives us two chances to capture each viewpoint without shadows. It is for this reason that some images may have positive and others negative latitudes. This also explains why some images may appear to be "upside-down" (in fact they're rotated 180 degrees). 25 | -------------------------------------------------------------------------------- /templeSparseRing/templeSR0001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/templeSparseRing/templeSR0001.png -------------------------------------------------------------------------------- /templeSparseRing/templeSR0002.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/templeSparseRing/templeSR0002.png -------------------------------------------------------------------------------- /templeSparseRing/templeSR0003.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/templeSparseRing/templeSR0003.png -------------------------------------------------------------------------------- /templeSparseRing/templeSR0004.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/templeSparseRing/templeSR0004.png -------------------------------------------------------------------------------- /templeSparseRing/templeSR0005.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/templeSparseRing/templeSR0005.png -------------------------------------------------------------------------------- /templeSparseRing/templeSR0006.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/templeSparseRing/templeSR0006.png -------------------------------------------------------------------------------- /templeSparseRing/templeSR0007.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/templeSparseRing/templeSR0007.png -------------------------------------------------------------------------------- /templeSparseRing/templeSR0008.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/templeSparseRing/templeSR0008.png -------------------------------------------------------------------------------- /templeSparseRing/templeSR0009.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/templeSparseRing/templeSR0009.png -------------------------------------------------------------------------------- /templeSparseRing/templeSR0010.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/templeSparseRing/templeSR0010.png -------------------------------------------------------------------------------- /templeSparseRing/templeSR0011.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/templeSparseRing/templeSR0011.png -------------------------------------------------------------------------------- /templeSparseRing/templeSR0012.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/templeSparseRing/templeSR0012.png -------------------------------------------------------------------------------- /templeSparseRing/templeSR0013.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/templeSparseRing/templeSR0013.png -------------------------------------------------------------------------------- /templeSparseRing/templeSR0014.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/templeSparseRing/templeSR0014.png -------------------------------------------------------------------------------- /templeSparseRing/templeSR0015.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/templeSparseRing/templeSR0015.png -------------------------------------------------------------------------------- /templeSparseRing/templeSR0016.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximm8/VisualHull/deca8bdde2eafe79c96505d77ca388911489eb4d/templeSparseRing/templeSR0016.png -------------------------------------------------------------------------------- /templeSparseRing/templeSR_ang.txt: -------------------------------------------------------------------------------- 1 | -82.173913 -180.0 templeSR0001.png 2 | -82.173913 -157.021277 templeSR0002.png 3 | -82.173913 -103.404255 templeSR0003.png 4 | -82.173913 -80.425532 templeSR0004.png 5 | -82.173913 -57.446809 templeSR0005.png 6 | -82.173913 65.106383 templeSR0006.png 7 | -82.173913 88.085106 templeSR0007.png 8 | -82.173913 111.06383 templeSR0008.png 9 | -82.173913 134.042553 templeSR0009.png 10 | -82.173913 157.021277 templeSR0010.png 11 | -82.173913 180.0 templeSR0011.png 12 | 82.173913 172.340426 templeSR0012.png 13 | 82.173913 149.361702 templeSR0013.png 14 | 82.173913 65.106383 templeSR0014.png 15 | 82.173913 -134.042553 templeSR0015.png 16 | 82.173913 -157.021277 templeSR0016.png 17 | -------------------------------------------------------------------------------- /templeSparseRing/templeSR_par.txt: -------------------------------------------------------------------------------- 1 | 16 2 | templeSR0001.png 1520.400000 0.000000 302.320000 0.000000 1525.900000 246.870000 0.000000 0.000000 1.000000 0.02187598221295043000 0.98329680886213122000 -0.18068986436368856000 0.99856708067455469000 -0.01266114646423925600 0.05199500709979997700 0.04883878372068499500 -0.18156839221560722000 -0.98216479887691122000 -0.0726637729648 0.0223360353405 0.614604845959 3 | templeSR0002.png 1520.400000 0.000000 302.320000 0.000000 1525.900000 246.870000 0.000000 0.000000 1.000000 -0.03472199972816788400 0.98429285136236500000 -0.17309524976677537000 0.93942192751145170000 -0.02695166652093134900 -0.34170169707277304000 -0.34099974317519038000 -0.17447403941185566000 -0.92373047190496216000 -0.0746307029819 0.0338148092011 0.600850565131 4 | templeSR0003.png 1520.400000 0.000000 302.320000 0.000000 1525.900000 246.870000 0.000000 0.000000 1.000000 -0.12459423323539082000 0.98895928871004091000 -0.08022345242268591500 0.28153512590579682000 -0.04229297064421112100 -0.95861842122676455000 -0.95142748011905343000 -0.14202404693648824000 -0.27315731761402628000 -0.0804772117858 0.0347151596258 0.560473795442 5 | templeSR0004.png 1520.400000 0.000000 302.320000 0.000000 1525.900000 246.870000 0.000000 0.000000 1.000000 -0.13029605274095349000 0.99119803974812748000 -0.02343895559951655200 -0.11536955428847780000 -0.03863710562518051000 -0.99257092442413708000 -0.98473996800343433000 -0.12662393165740077000 0.11938833840965069000 -0.0825631056881 0.023860512378 0.546238733662 6 | templeSR0005.png 1520.400000 0.000000 302.320000 0.000000 1525.900000 246.870000 0.000000 0.000000 1.000000 -0.11336189346759781000 0.99306769310348053000 0.03107471678989884300 -0.49396938490232206000 -0.02919611501518744300 -0.86898897210910642000 -0.86205761285929272000 -0.11386019401947006000 0.49385476440871356000 -0.0838881718179 0.00825064381625 0.537328766918 7 | templeSR0006.png 1520.400000 0.000000 302.320000 0.000000 1525.900000 246.870000 0.000000 0.000000 1.000000 0.13807231488914926000 0.98993281310425651000 0.03112975105337044400 -0.46705847237686349000 0.03736281839816532600 0.88343670015589459000 0.87337988254947896000 -0.13651756422101491000 0.46751527827122269000 -0.0762889487995 -0.0499890220447 0.590680158335 8 | templeSR0007.png 1520.400000 0.000000 302.320000 0.000000 1525.900000 246.870000 0.000000 0.000000 1.000000 0.15497845444162242000 0.98764123913336677000 -0.02337651432514656000 -0.08483672679970129200 0.03687993341332458700 0.99571210713606428000 0.98426846360370535000 -0.15233073647342665000 0.08950384506078289100 -0.0739411102336 -0.0422175765405 0.606770639775 9 | templeSR0008.png 1520.400000 0.000000 302.320000 0.000000 1525.900000 246.870000 0.000000 0.000000 1.000000 0.14924744465611009000 0.98554503244193847000 -0.08016351596979645600 0.31084431847048910000 0.03019760281070211000 0.94998100742020297000 0.93866980879233486000 -0.16670061131713207000 -0.30184415887715305000 -0.0722007564225 -0.0287147443427 0.618579789757 10 | templeSR0009.png 1520.400000 0.000000 302.320000 0.000000 1525.900000 246.870000 0.000000 0.000000 1.000000 0.12178879854502510000 0.98397686167544829000 -0.13021913928564777000 0.65718996007304553000 0.01837631450844677200 0.75350094057292005000 0.74382043863297265000 -0.17734668520280353000 -0.64442168517161924000 -0.0713440820504 -0.0116234290665 0.624233492551 11 | templeSR0010.png 1520.400000 0.000000 302.320000 0.000000 1525.900000 246.870000 0.000000 0.000000 1.000000 0.07696020733473872600 0.98318559576803610000 -0.16559954939928406000 0.89923509311540939000 0.00329210872029469690 0.43745332245840185000 0.43064297718262490000 -0.18257942461960402000 -0.88386162939051693000 -0.0715070414677 0.00634397500882 0.622834504684 12 | templeSR0011.png 1520.400000 0.000000 302.320000 0.000000 1525.900000 246.870000 0.000000 0.000000 1.000000 0.02187598221295046500 0.98329680886213122000 -0.18068986436368856000 0.99856708067455469000 -0.01266114646423924800 0.05199500709980022000 0.04883878372068523700 -0.18156839221560722000 -0.98216479887691122000 -0.0726637729648 0.0223360353405 0.614604845959 13 | templeSR0012.png 1520.400000 0.000000 302.320000 0.000000 1525.900000 246.870000 0.000000 0.000000 1.000000 0.01363654728930748000 -0.99598585067933787000 -0.08846598117119695800 0.98568300171389711000 -0.00148022139463806730 0.16860257731394196000 -0.16805673063078255000 -0.08949857088903123700 0.98170613785313243000 0.0923865503342 0.0174592000997 0.540646633394 14 | templeSR0013.png 1520.400000 0.000000 302.320000 0.000000 1525.900000 246.870000 0.000000 0.000000 1.000000 0.06091231694352535600 -0.99580507011728536000 -0.06827848836405432700 0.84172768564816447000 0.01448188430858370400 0.53970804907862679000 -0.53645521048635192000 -0.09034676173267966500 0.83907882215347451000 0.0931354607451 0.000601799092695 0.53431587542 15 | templeSR0014.png 1520.400000 0.000000 302.320000 0.000000 1525.900000 246.870000 0.000000 0.000000 1.000000 0.10064436337366003000 -0.98987287691280146000 0.10011193571939807000 -0.45281218231871551000 0.04402436503296685400 0.89051837871388495000 -0.88590735388350439000 -0.13495755938745446000 -0.44379569342131825000 0.088662178244 -0.0503548809547 0.566981909997 16 | templeSR0015.png 1520.400000 0.000000 302.320000 0.000000 1525.900000 246.870000 0.000000 0.000000 1.000000 -0.09868778720769125200 -0.99342356952296929000 -0.05805456202825097500 0.72029150408413001000 -0.03105781339599184000 -0.69297587358527946000 0.68661551817612676000 -0.11020446335472237000 0.71861958396388448000 0.0879660833613 0.0384696353834 0.575349613813 17 | templeSR0016.png 1520.400000 0.000000 302.320000 0.000000 1525.900000 246.870000 0.000000 0.000000 1.000000 -0.05439995112000559800 -0.99497063228547356000 -0.08410758709882369700 0.93391553816646533000 -0.02089350177384347000 -0.35688265460073498000 0.35333045847956862000 -0.09796378143513864700 0.93035513898593913000 0.0901828779869 0.0336020152768 0.558139052285 18 | --------------------------------------------------------------------------------