As we rely more on satellites, communication systems and space research, the importance of space weather is increasing continuously. There are many space missions and ground based observatories providing continuous observation of the Sun at many different wavelengths to supply the demand for space weather forecast and research. All the forecasting strategies highly depend on experience of solar physicists and done manually. The results differ from observatories to observatories and subjective. There is a need for automated analysis of Sun and space weather forecasting. The solar activity is the driver of space weather. Thus it is important to be able to predict the violent eruptions such as coronal mass ejections and solar flares. In this book a hybrid system combining image processing and machine learning techniques for the automated short-term prediction of solar flares is presented. The system can also detect, group, and classify sunspots using solar images. The algorithms, implementation, and results are explained in this work.