For this particular problem which uses the R, G, B pixel values as sample features, i think it’s okay for us to either not do the division or do the division, so it remains your choice. However, as a rule of thumb, it’s always better to normalize the features when we use K-means because K-means is distance-based which means it is sensitive to the difference of your features’ scales. Normalizing your feature helps make the feature to scale similarly. if you load a photo in a way that the pixel values are represented by a range between 0 and 255, then dividing the pixel values by 255 is actually doing the Min-Max normalization. You may normalize it this way or using any other way you have learnt in this specialization.
For this, please verify the range yourself by printing the maximum value of original_img*255
. Here is my previous reply about this.
Raymond