perClass Documentation
version 5.4 (7-Dec-2018)
 EXPAND - expands image set defined on a grid to context of original image

    IMOUT=EXPAND(IM,LAB)

 INPUTS
   IM  - image set extracted using sdextract on a grid (step>1)
   LAB - optional labels to be expanded

 OUTPUTS
   IMOUT - image set representing oringinal image size representing pixels
           expanded from IM

 DESCRIPTION
 EXPAND allows us to move from image data set represnting local regions
 extracted with SDEXTRACT on a grid to the context of its original image.

 EXAMPLE
% Extract raw image content each 5 pixels
 >> ex=sdextract(im,'region','raw','block',9,'step',5)

% Apply a classifier and get decisions
 >> dec=ex * pclf

% Expand places where we detected target class to original context
 >> imout=expand( ex(dec=='target') )

% Label in these places original high-res image as target
 >> im( imout ).lab='target'

% Example 2: Expand directly all categories in decision object
 >> imout=expand(ex,dec);  % note we provide dec
 >> im( imout ).lab=imout.lab

 SEE ALSO
 SDEXTRACT, SDIMAGE