this screenshot of building is one of the images in the dataset we will use this screenshot as an example as you may be awareimage processing is large field here we will only be looking at some very basic operations we can perform on our images some of the most basic operations can be performed using numpy onlybut otherwise we will use mahotas thresholding thresholding is very simple operationwe transform all pixel values above certain threshold to and all those below to (or by using booleanstransform it to true and false)binarized (image threshold_valuethe value of the threshold width (threshold_value in the codeneeds to be chosen if the images are all very similarwe can pick one statically and use it for all images otherwisewe must compute different threshold for each image based on its pixel values mahotas implements few methods for choosing threshold value one is called otsuafter its inventor the first necessary step is to convert the image to grayscale with rgb gray