function iLine = DetectLines( mImage, lineValue )
% DetectLines returns the index of vertical impulsive lines in an image
%
% Searches a matrix representing the pixel intensities of an image for columns where all
% the values are equal to lineValue.  Note this will also return the index of vertical 
% edges.
%
% Usage:        iLine = DetectLines( mImage, lineValue );
%               iLine = DetectLines( mImage );
%
% Inputs:
%   mImage      double matrix representing image pixel intensities
%   lineValue   value to search for default is 0.
%
% Outputs:
%   iLine       vector containing the index's of the columns of mImage containing vertical
%               lines

% See   http://www.ncrg.aston.ac.uk/Projects/HNLApprox/
%       http://www.nonlinear-approx.info/
iLine = [];

if nargin < 2
    
    lineValue = 0;
    
end

[ y x ] = size(mImage);

for i = 1:x  
    
    if numel(find(mImage(:,i) == lineValue)) == y
        
        iLine = [ iLine i ];
        
    end
   
end