'Extract the line orientation and and length histogram.'

def extract(self, img):

    retVal = []
    p = (max(img.width, img.height) / 2)
    minLine = (0.01 * p)
    gap = (0.1 * p)
    fs = img.findLines(threshold=10, minlinelength=minLine, maxlinegap=gap)
    ls = (fs.length() / p)
    angs = fs.angle()
    lhist = np.histogram(ls, self.mNBins, normed=True, range=(0, 1))
    ahist = np.histogram(angs, self.mNBins, normed=True, range=((-180), 180))
    retVal.extend(lhist[0].tolist())
    retVal.extend(ahist[0].tolist())
    return retVal
