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: sr_create_img_pyramid.m
    path of file: ./repos/SelfExSR/source
    
    the code of the file until where you have to start completion: function [imgPyrH, imgPyrL, scaleImgPyr] = sr_create_img_pyramid(img, opt)

% SR_CREATE_IMG_PYRAMID
%
% Create two image pyramids: imgPyrH, imgPyrL.
% The low-passed image pyramid imgPyrL contains the low-passed version of imgPyrH. 
% This follows the use of high-freq. band and low-freq super-resolution for self-exemplars super-resolution 
% proposed in 
% 
%  G Freedman, R Fattal, Image and video upscaling from local self-examples
%  ACM Transactions on Graphics (TOG), 2011 
%
% Input:
%   - img:         input low-resolution image 
%   - opt:         pyramid option

    
function [imgPyrH, imgPyrL, scaleImgPyr] = sr_create_img_pyramid(img, opt)

% SR_CREATE_IMG_PYRAMID
%
% Create two image pyramids: imgPyrH, imgPyrL.
% The low-passed image pyramid imgPyrL contains the low-passed version of imgPyrH. 
% This follows the use of high-freq. band and low-freq super-resolution for self-exemplars super-resolution 
% proposed in 
% 
%  G Freedman, R Fattal, Image and video upscaling from local self-examples
%  ACM Transactions on Graphics (TOG), 2011 
%
% Input:
%   - img:         input low-resolution image 
%   - opt:         pyramid option
% Output:
%   - imgPyrH:     high-freq band image pyramid
%   - imgPyrL:     low-freq band image pyramid
%   - scaleImgPyr: image dimensions in each level
% =========================================================================

% =========================================================================
% Image pyramid sizes and scales
% =========================================================================

% Image size in the high-resolution image
[imgHeight, imgWidth, ~] = size(img);

% Determine the scales in the image pyramid 
scalePyr = opt.alpha.^linspace(-opt.nPyrLowLvl, opt.nPyrLowLvl, opt.nPyrLvl);
% Add the dummy level for creating the low-pass version of the pyramid
scalePyr = [scalePyr, scalePyr(end