An Efficient Online Feature Extraction Algorithm For Neural Networks