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