First time here? Check out the FAQ!
Why create pointers to Algorithm and casting to Feature2D instead of directly dealing with pointers to Feature2D?