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: threshold_inrange_demo_gui.m
    path of file: ./repos/mexopencv/samples
    
    the code of the file until where you have to start completion: %% inRange Thresholding Operations
%
% In this demo, we show how to:
%
% * Perform basic thresholding operations using OpenCV function |cv.inRang
    
function h = buildGUI(img)
    %BUILDGUI  Creates the UI

    % parameters
    sz = size(img);
    rlo = 100; rhi = 255;
    glo = 0; ghi = 100;
    blo = 0; bhi = 100;

    % build the user interface (no resizing to keep it simple)
    h = struct();
    h.src = img;
    h.fig = figure('Name','Threshold Demo', ...
        'NumberTitle','off', 'Menubar','none', 'Resize','off', ...
        'Position',[200 200 sz(2)*2 sz(1)+155-1]);
    if ~mexopencv.isOctave()
        %HACK: not implemented in Octave
        movegui(h.fig, 'center');
    end