Skip to content

Commit

Permalink
Updating visualization code to make use of input axes (if specified).
Browse files Browse the repository at this point in the history
  • Loading branch information
Jean-Francois Lalonde committed Sep 28, 2012
1 parent 6459234 commit 5bbc3a8
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions mycode/visualization/displaySunProbabilityVectorized.m
Expand Up @@ -19,7 +19,7 @@ function displaySunProbabilityVectorized(latLongMap, alignHistogramAzimuths, var
defaultArgs = struct('DrawCameraFrame', 0, 'FocalLength', 0, 'CamZenith', 0, 'ImgDims', [], ...
'GtSunZenith', [], 'GtSunAzimuth', [], ...
'EstSunZenith', [], 'EstSunAzimuth', [], ...
'DrawFlipped', 0, 'Normalize', 0);
'DrawFlipped', 0, 'Normalize', 0, 'Axes', []);
args = parseargs(defaultArgs, varargin{:});

%%
Expand All @@ -43,7 +43,8 @@ function displaySunProbabilityVectorized(latLongMap, alignHistogramAzimuths, var
end

%% warp patches to "sky angular" view
h = figure; hold on;
% h = figure; hold on;
hold on;
for i=1:length(allPatches)
patchPhi = allPatches{i}(1,:);
patchTheta = allPatches{i}(2,:);
Expand Down Expand Up @@ -72,13 +73,15 @@ function displaySunProbabilityVectorized(latLongMap, alignHistogramAzimuths, var

end

axis equal off;
set(h, 'Color', 'none');
set(gca(h), 'Color', 'none');
if args.Normalize
set(gca(h), 'Clim', [0 1]);
if ~isempty(args.Axes)
axis(args.Axes, 'equal', 'off');
% set(h, 'Color', 'none');
set(args.Axes, 'Color', 'none');
if args.Normalize
set(args.Axes, 'Clim', [0 1]);
end
% colormap(jet(1024));
end
colormap(jet(1024));


%% Draw camera frame
Expand Down

0 comments on commit 5bbc3a8

Please sign in to comment.