A technique for cloud motion tracking and cloud motion prediction using ground-based sky images is presented. This cloud motion prediction technique primarily targets irradiance prediction as an application in Electrical Engineering. A sequence of whole sky images is processed to determine the time taken by clouds to reach the sun position on the image. Cross-correlation technique was used to track individual clouds from one image frame to next frame. Using Harris features detection algorithm cloud features were found and the deformation vectors were produced. To find the velocity vectors of each feature points Lukas-Kanade optical flow algorithm is proposed. Using the optical flow algorithm, 3 min ahead cloud position was estimated.