A real-time optical detection method was proposed for groove coating. In this method, a ring light was used to illuminate the glue surface, and a CCD camera was used to capture the distorted virtual image of the light source. Combining the change of virtual image with the image processing technology, the spreading process of glue transferred to groove was obtained indirectly. An experimental apparatus including motion control system and image acquisition and processing system is designed and the rules of the glue solution influenced by the coating viscosity and speed are obtained.