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: txt2img.m
    path of file: ./repos/MCITF/Code/MCITF/EdgeBox/piotr_toolbox/toolbox/matlab
    
    the code of the file until where you have to start completion: function masks = txt2img( strings, h, txtPrp )
% Convert text string to a binary image.
%
% For each input string, creates a binary matrix of dimensions [hxw] that
% when displayed as an image shows the string. See example for usage.
% First, uses text() to display the text using Matlab's display
% functionality. Next uses getframe() to capture the screen and crops the
% resulting image appropriately.
%
% USAGE
%  masks = txt2img( strings, h, [txtPrp] )
%
% INPUTS
%  strings  - {1xn} text string or cell array of text strings to convert
%  h        - font height in pixels
%  txtPrp   - [] additional properites for call to "text"
%
% OUTPUTS
%  masks    - {1xn} binary image masks of height h for each string
%
% EXAMPLE
%  masks=txt2img('hello world',100); im(masks{1})
%

    
function masks = txt2img( strings, h, txtPrp )
% Convert text string to a binary image.
%
% For each input string, creates a binary matrix of dimensions [hxw] that
% when displayed as an image shows the string. See example for usage.
% First, uses text() to display the text using Matlab's display
% functionality. Next uses getframe() to capture the screen and crops the
% resulting image appropriately.
%
% USAGE
%  masks = txt2img( strings, h, [txtPrp] )
%
% INPUTS
%  strings  - {1xn} text string or cell array of text strings to convert
%  h        - font height in pixels
%  txtPrp   - [] additional properites for call to "text"
%
% OUTPUTS
%  masks    - {1xn} binary image masks of height h for each string
%
% EXAMPLE
%  masks=txt2img('hello world',100); im(masks{1})
%
% See also CHAR2IMG, GETFRAME, TEXT
%
% Piotr's Computer Vision Matlab Toolbox      Version 2.35
% Copyright 2014 Piotr Dollar.  [pdollar-at-gmail.com]
% Licensed under the Simplified BSD License [see external/bsd.txt]

% set up blank figure to which to write text
if(nargin<3 || isempty(txtPrp)), txtPrp={}; end