in [ ]fig plt figure(figsize ( , )ax fig add_subplot( , ax imshow(cgscmap="gray"ax fig add_subplot( , ax imshow(dgscmap='gray'ax fig add_subplot( , c_freqc_binsc_patches ax hist(cgs flatten()bins= ax fig add_subplot( , d_freqd_binsd_patches ax hist(dgs flatten()bins= figure - binning image intensity distributions with histograms as we mentionedimage intensity ranges from to and is evident by the -axes depicted in figure - the -axes depict the frequency of the respective bins we can clearly see that the dog image has more concentration of the bin frequencies around indicating higher intensity and the reason for that being that the labrador dog is white in color and white has high intensity value like we mentioned in the previous section the variables c_freqc_binsand d_freqd_bins can be used to get the numeric values pertaining to the bins and used as features image aggregation statistics we already obtained the raw image intensity values for the grayscale images in the previous section one approach would be to use them as features directly or use some level of aggregations and statistical measures which can be obtained from the pixels and intensity we already saw an approach of binning intensity values using histograms in this sectionwe use descriptive statistical measures and aggregations to compute specific features from the image pixel values we can compute rgb ranges for each image by basically subtracting the maximum from the minimum value for pixel values in each channel the following code helps us achieve this in [ ]from scipy stats import describe cat_rgb cat reshape(( * ) dog_rgb dog reshape(( * )