Commit efeaed0f authored by Daniel Bourgault's avatar Daniel Bourgault

Small changes so that the new code would work just as fine if elevations are not provided for GCPs.

parent ea630c82
......@@ -132,7 +132,15 @@ i_gcp = gcp.data(:,1);
j_gcp = gcp.data(:,2);
lon_gcp0 = gcp.data(:,3);
lat_gcp0 = gcp.data(:,4);
h_gcp = gcp.data(:,5);
[ngcp n_column] = size(gcp.data)
% If there are 5 columns it means that elevation are provided
if n_column == 5
h_gcp = gcp.data(:,5);
else % otherwise elevation are considered to be zero
h_gcp(1:ngcp) = 0.0;
end
%%
% Check if the elevation of the GCPs are not too high and above
......@@ -148,7 +156,6 @@ if length(i_bad) > 0
display([' FIX AND RERUN.']);
return
end
ngcp = length(i_gcp);
% Get the image size
imgInfo = imfinfo(imgFname);
......@@ -288,7 +295,7 @@ if nUnknown > 0
theta0 = (thetaGuess - dtheta) + 2*dtheta*rand(1);
end
% Cretae vector cv0 for the initial guesses.
% Create vector cv0 for the initial guesses.
i = 0;
if dhfov > 0.0
i = i+1;
......@@ -408,7 +415,6 @@ clear LON LAT
fprintf('\n')
fprintf('Making figure\n');
figure;
if field
g_viz_field(imgFname,outputFname);
else
......
function g_viz_lab(imgFname,rectFile);
figure
% Set some plotting parameters
ms = 10; % Marker Size
fs = 10; % Font size
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment