October 2019
Beginner to intermediate
674 pages
16h 43m
English
Let's try to select the tree in the preceding screenshot. Looking at the image with axis labels, it is evident that vertical bounds of the tree are within 50 to 155 pixels while horizontal bounds are within 95 to 190 pixels. Let's try to subset this region with all the channels:
img_tree=img[50:155,95:190,:]plt.imshow(img_tree)
The following image shows us the region of interest (ROI) that is selected therein:

This operation is akin to cropping an image.
The pixel values of a certain ROI or a channel can be assigned some different values. This can be used to do the following: ...
Read now
Unlock full access