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: ProjectLaserIntoCamera.m
    path of file: ./repos/robotcar-dataset-sdk/matlab
    
    the code of the file until where you have to start completion: function ProjectLaserIntoCamera(image_dir, laser_dir, ins_file, models_dir, extrinsics_dir, image_timestamp)
  
% ProjectLaserIntoCamera - build a pointcloud from LIDAR scans and display it
%   projected into a camera image
%
% ProjectLaserIntoCamera(image_dir, laser_dir, ins_file, models_dir,
%   extrinsics_dir, image_timestamp)
%
% INPUTS:
%   image_dir: directory containing images. MUST be the actual directory that
%     the images are in (eg. <dataset>/stereo/centre)
%   laser_dir: directory containing LIDAR scans
%   ins_file: file containing INS data
%   models_dir: directory containing camera intrinsics and undistortion LUTs
%   extrinsics_dir: directory containing sensor-to-sensor extrinsics
%   image_timestamp: timestamp of image to use

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Copyright (c) 2016 University of Oxford
% Authors: 
%  Geoff Pascoe (gmp@robots.ox.ac.uk)
%  Will Maddern (wm@robots.ox.ac.uk)
%
% This work is licensed under the Creative Commons 
% Attribution-NonCommercial-ShareAlike 4.0 International License. 
% To view a copy of this license, visit 
% http://creativecommons.org/licenses/by-nc-sa/4.0/ or send a letter to 
% Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

  if image_dir(end) ~= '/'
    image_dir = [image_dir '/'];
  end
  
  if laser_dir(end) ~= '/'
    laser_dir = [laser_dir '/'];
  end
  
  if models_dir(end) ~= '/'
    models_dir = [models_dir '/'];

    
function ProjectLaserIntoCamera(image_dir, laser_dir, ins_file, models_dir, extrinsics_dir, image_timestamp)
  
% ProjectLaserIntoCamera - build a pointcloud from LIDAR scans and display it
%   projected into a camera image
%
% ProjectLaserIntoCamera(image_dir, laser_dir, ins_file, models_dir,
%   extrinsics_dir, image_timestamp)
%
% INPUTS:
%   image_dir: directory containing images. MUST be the actual directory that
%     the images are in (eg. <dataset>/stereo/centre)
%   laser_dir: directory containing LIDAR scans
%   ins_file: file containing INS data
%   models_dir: directory containing camera intrinsics and undistortion LUTs
%   extrinsics_dir: directory containing sensor-to-sensor extrinsics
%   image_timestamp: timestamp of image to use

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Copyright (c) 2016 University of Oxford
% Authors: 
%  Geoff Pascoe (gmp@robots.ox.ac.uk)
%  Will Maddern (wm@robots.ox.ac.uk)
%
% This work is licensed under the Creative Commons 
% Attribution-NonCommercial-ShareAlike 4.0 International License. 
% To view a copy of this license, visit 
% http://creativecommons.org/licenses/by-nc-sa/4.0/ or send a letter to 
% Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

  if image_dir(end) ~= '/'
    image_dir = [image_dir '/'];
  end
  
  if laser_dir(end) ~= '/'
    laser_dir = [laser_dir '/'];
  end
  
  if models_dir(end) ~= '/'
    models_dir = [models_dir '/'];
  end
  
  if extrinsics_dir(end) ~= '/'
    extrinsics_dir = [extrinsics_dir '/'];
  end
  
  if ~exist('image_timestamp', 'var')
    % Get timestamps from file, to avoid having to list whole image
    % directory
    camera = regexp(image_dir, 'stereo|mono_left|mono_right|mono_rear', 'match');
    timestamp_file = [image_dir '../' camera{end