By using one of image processing technology direct to sun smart tracking methods, we can properly rotate solar energy collecting devices such as solar water heaters and solar panels, making them straight to sun to improve the efficiency of collecting solar energy. In the process of image processing, we use hough transform to abstract straight lines and intersection points of images, through which we calculate direction angle and elevation. We can collect solar energy effectively by rotating solar collecting devices to proper positions driven by drive motors. This application has an important significance to make good use of solar energy and environmental protection of China even the whole world.