Solar energy production based on a photovoltaic system is closely related to solar irradiance. Therefore, the planning of production is based on the prediction of solar irradiance. The optimal use of different energy storage systems requires an accurate prediction of solar irradiation with at least an hourly time horizon. In this work, a solar irradiance prediction method is developed based on the prediction of solar shading by clouds. The method is based on determining the current cloud position and estimating the velocity from a sequence of multiple images taken with a 180-degree wide-angle camera with a resolution of 5 s. The cloud positions for the next hour interval are calculated from the estimated current cloud position and velocity. Based on the cloud position, the percentage of solar overshadowing by clouds is determined, i.e., the solar overshadowing curve for the next hour interval is calculated. The solar irradiance is determined by normalizing the percentage of the solar unshadowing curve to the mean value of the irradiance predicted by the hydrometeorological institute for that hourly interval. Image processing for cloud detection and localization is performed using a computer vision library and the Java programming language. The algorithm developed in this work leads to improved accuracy and resolution of irradiance prediction for the next hour interval. The predicted irradiance curve can be used as a predicted reference for solar energy production in energy storage system optimization.