Otitis media with effusion is a worldwide ear disease. The current treatment is to surgically insert a ventilation grommet into the tympanic membrane. A robotic device allowing automatic grommet insertion has been designed in a previous study; however, the part of the membrane where the malleus bone is attached to the inner surface is to be avoided during the insertion process. This paper proposes a synergy of optical flow technique and a gradient vector flow active contours algorithm to achieve an online tracking of the malleus under endoscopic vision, to guide the working channel to move efficiently during the surgery. The proposed method shows a more stable and accurate tracking performance than the current tracking methods in preclinical tests. With satisfactory tracking results, vision guidance of a suitable insertion spot can be provided to the device to perform the surgery in an automatic way.