Clustering, Segmentation, Data Science, Remote Sensing, Satellite.
images to pandas dataframes (one column for each image channel). I do that for the sake of visibility of my explanations. If you want to get it optimized, it’s better to use numpy arrays instead. df = pd.DataFrame({'R': img[:,:, 0].flatten(), 'G': img[:,:, 1].flatten(), 'B':img[:,:, 2].flatten()})