# drawGaborSymbol

## PURPOSE

drawGaborSymbol - Display one Gabor symbol on image canvas.

## SYNOPSIS

function im = drawGaborSymbol(im, allsymbol, row, col, orientationIndex, nGaborOri, scaleIndex, intensity)

## DESCRIPTION

     drawGaborSymbol - Display one Gabor symbol on image canvas.

## CROSS-REFERENCE INFORMATION

This function calls:

This function is called by:

- displayTemplate displayTemplate - Display the symbolic template of an active basis template.

## SOURCE CODE

    0001 function im = drawGaborSymbol(im, allsymbol, row, col, orientationIndex, nGaborOri, scaleIndex, intensity)
    0002 % drawGaborSymbol - Display one Gabor symbol on image canvas.
    0003
    0004 h = (size(allsymbol{(scaleIndex-1)*nGaborOri + 1}, 1)-1)/2;  % half size of Gabor
    0005 for r = row-h:row+h
    0006     if r < 1 || r > size(im,1)
    0007         continue;
    0008     end
    0009     for c = col-h:col+h
    0010         if c < 1 || c > size(im,2)
    0011             continue;
    0012         end
    0013         % disp(sprintf('ori=%d,xx=%d,yy=%d',orientationIndex,r-row+h+1,c-col+h+1));
    0014         val = intensity * allsymbol{(scaleIndex-1)*nGaborOri + orientationIndex}(r-row+h+1,c-col+h+1);
    0015         if val > im(r,c)
    0016             im(r,c) = val;
    0017         end
    0018     end
    0019 end