A valuable visual indicator to grade the stiffness and strength of planks can be obtained by analyzing the structure of the grain on it. To integrate an analyzing image vision module in an industrial selection process a real-time system is needed to build. Two main objectives must be reached: First a stable edge detector should extract the grain edges. Second these grain edges have to be tracked to achieve a complete grain representation. This representation can be used to analyze the regularity of the grain. Since the visual nature of grain varies a lot even on a single plank we present an edge detector which is adaptive and a grain tracking algorithm capable of closing gaps between pixels. Both steps work in real-time (i.e. 5 frames per second resulting in 1 meter per second).