Digital image processing allows us to analyze the wealth of data captured by modern telescopes and satellites, and it provides access to the enormous data contained in astronomical databases. This lecture with computer exercises covers the fundamentals of image processing such as image enhancement, image restoration, color image processing, wavelet and multi-resolution processing, morphological image processing, image segmentation, and object recognition. In addition, a variety of techniques, commonly used in astronomy and astrophysics, will be introduced: optical flow measurements, speckle interferometry, phase diversity techniques, and Doppler imaging, among others.

Stars more massive than our Sun, by at least a factor of ten, are rare but seminal objects in galaxies such as our Milky Way. Their powerful radiation, stellar winds, and explosive deaths are dominant engines driving the cycle of matter in the interstellar medium, by ionizing and chemically enriching it, inducing turbulence, and producing cosmic rays. The direct surroundings of massive stars (circumstellar medium) appear as gaseous nebulae visible accross the electromagnetic spectrum. The shapes of the nebulae and their physical characteristics are the fingerprints onto the ambient medium of their past stellar evolution. However, to understand how massive stars interact with their surroundings, sophisticated multi-dimensional magneto-hydrodynamical and radiative transfer numerical simulations are required. In this lecture, we will take a journey throughout the lives of massive stars, from their infant to defunct evolutionary phases.

Particularly, we will (I) focus on the burst mode of accretion during massive star formation, I developed to explain the physics of young massive stellar objects and (ii) present observation  and simulations tailored to the surroundings of evolved massive stars like the red supergiant Betelgeuse and Wolf-Rayet stars. We will particularly focus on the stellar wind bubbles and the bow shocks generated around the 20-30% of massive star which run away through the ISM, and how this nebulae are transformed when massive stars evolve through the red supergiant and Wolf-Rayet phase of stellar evolution, and see how numerical models permit to constrain their past evolution and predict their future. Finally, we will (iii) explore what the asymmetries in thermal and non-thermal remnants left behind massive stars which died in a supernova explosion, like the Cygnus Loop nebula, tell us about their past lives. Last, will finish this lecture with pulsar wind nebulae which can form inside of some supernova remnants from high-mass stars.