Algorithms and IO methods for training a tube seed extractor and the applying it to subsequent images