You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: loadSceneSkyMasks.m
    path of file: ./repos/Image-Harmonization-Dataset-iHarmony4/Lalonde and Efros/utils/mycode/util/webcams
    
    the code of the file until where you have to start completion: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% function [skyMask, sceneMask, groundMask, verticalMask] = loadSceneSkyMasks(skyMaskPath, seqInfo)
%  Useful function which loads the sky and scene masks for a given
%  image sequence.
% 
% Input parameters:
%  - skyMaskPath: path to the sky (and scene) masks
%  - seqInfo: sequence information
%  - varargin
%    - 'Automatic': [0]=use the manually labelled masks, 1=use the
%    automatically estimated sky masks (using geometric context). This
%    will return only skyMask (will throw an error otherwise)
%    - 'DbPath': path to the subSequenceDb
%
% Output parameters:
%  - skyMask: the sky mask (1=sky, 0=non-sky)
%  - sceneMask: (optional) the scene mask (1=scene, 0=non-scene)
%  - groundMask: (optional) the ground mask (1=ground, 0=non-ground)
%  - v
    
function [skyMask, sceneMask, groundMask, verticalMask] = loadSceneSkyMasks(skyMaskPath, seqInfo)
%  Useful function which loads the sky and scene masks for a given
%  image sequence.
% 
% Input parameters:
%  - skyMaskPath: path to the sky (and scene) masks
%  - seqInfo: sequence information
%  - varargin
%    - 'Automatic': [0]=use the manually labelled masks, 1=use the
%    automatically estimated sky masks (using geometric context). This
%    will return only skyMask (will throw an error otherwise)
%    - 'DbPath': path to the subSequenceDb
%
% Output parameters:
%  - skyMask: the sky mask (1=sky, 0=non-sky)
%  - sceneMask: (optional) the scene mask (1=scene, 0=non-scene)
%  - groundMask: (optional) the ground mask (1=ground, 0=non-ground)
%  - verticalMask: (optional) the vertical mask (1=vertical, 0=non-vertical)
%   
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function [skyMask, sceneMask, groundMask, verticalMask] = loadSceneSkyMasks(skyMaskPath, seqInfo, varargin)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Copyright 2006-2007 Jean-Francois Lalonde
% Carnegie Mellon University
% Do not distribute
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

defaultArgs = struct('DbPath', [], 'Automatic', 0, 'LoadWarpMask', 0, 'Matte', 0);
args = parseargs(defaultArgs, varargin{:});

if args.Automatic
    if nargout > 1
        error('The automatic option only returns 1 argument!');
    end