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: superpixelsBench.m
    path of file: ./repos/extended-berkeley-segmentation-benchmark/benchmarks
    
    the code of the file until where you have to start completion: function [] = superpixelsBench(imgDir, gtDir, inDir, outDir)
% superpixelsBench(imgDir, gtDir, inDir, outDir)
%
% Count the number of superpixels for all superpixel segmentations.
%
% INPUT
%   imgDir  : folder containing original images
%   gtDir   : folder containing ground truth data.
%   inDir   : a collection of segmentations in a cell 'segs' stored in a mat file
%             - note that using an ultrametric contour map is not possible

    
function [] = superpixelsBench(imgDir, gtDir, inDir, outDir)
% superpixelsBench(imgDir, gtDir, inDir, outDir)
%
% Count the number of superpixels for all superpixel segmentations.
%
% INPUT
%   imgDir  : folder containing original images
%   gtDir   : folder containing ground truth data.
%   inDir   : a collection of segmentations in a cell 'segs' stored in a mat file
%             - note that using an ultrametric contour map is not possible
%             with this evaluation function.
%   outDir  : folder where evaluation results will be stored
%
% David Stutz <david.stutz@rwth-aachen.de>

    iids = dir(fullfile(imgDir,'*.jpg'));
    for i = 1:numel(iids)
        evFile7 = fullfile(outDir, strcat(iids(i).name(1:end