Green cities worldwide are converting to renewable clean energy from natural sources such as sunlight and wind due to the lack of traditional resources and the significant increase in environmental pollution. This paper presents an approach of two stages for photovoltaic (PV) potential estimation of solar panels mounted on buildings’ rooftops. The first stage is rooftop detection from satellite images using a series of image pre-processing algorithms, followed by applying machine learning algorithms, namely Support Vector Machine (SVM) and Naïve Bayes (NB). The second stage is the solar PV potential estimation using the PVWatts calculator, PVGIS, and ArcGIS. Satellite images for the B6 division of Madinaty City in Egypt were evaluated in this paper. The precision, recall, and F1-score of rooftop detection were 91.2%, 98.6%, and 94.7% from SVM, while those from NB were 86.6%, 98.3%, and 92.2%, respectively. About 290 rooftops were extracted, with a total area of 150,698 m2 and a relative root mean square error of 10.6%. The usable area of rooftops was utilized to estimate the annual PV potential of 21.1, 24.9, and 22.9 GWh/year from the PVWatts calculator, PVGIS, and ArcGIS, respectively. According to the estimated PV potential, replacing traditional energy sources reduced the amount of CO2 by an annual average value of 62%.