Optical flow based robot obstacle avoidance with Matlab
18 Jan 2009
24 Jan 2009)
Navigate a virtual robot in a virtual environment to avoid obstacles by using optical flow field.
function x = fcapture(f)
%CAPTURE Capture a Virtual Reality figure into a RGB image.
% CAPTURE(F) captures a figure into a TrueColor RGB image that can be
% displayed by IMAGE.
% See also IMAGE.
% Copyright 1998-2006 HUMUSOFT s.r.o. and The MathWorks, Inc.
% $Revision: 220.127.116.11 $ $Date: 2006/12/13 00:16:59 $ $Author: batserve $
handle = get(f, 'handle');
xraw = vrsfunc('CaptureFigure', handle);
x = permute(xraw(:,:,end:-1:1), [3 2 1]);