This paper describes a tool that uses OpenCV and a webcam to analyze the image projection by a projector. The tool includes a DC motor which controls the rotation of the projection lens to achieve the purpose of focusing the lens and accordingly correct background color via analyzing the image captured from the wall or a projection target. Control command to UART implementation provides communication between the image analysis program and hardware control pipeline, this command interface allows the system to immediately change the parameters of the projector set up and modify the parameters of the motor driver chip. By way of the cross-platform and powerful matrix operations of OpenCV, the proposed image analysis tools and associated interfaces can be flexibly integrated into various system and application.