The simplest way to get parts of an image is to use ImageCrop. By default, ImageCrop takes a subregion with the designated pixel width and height from the center of an image. Use ImageCrop to crop an image to pixel width 300 and pixel height 100:
Use ImageTake if you know the rows and columns you would like to extract from the original image. Take the first 100 rows of the image:
You can also use specific beginning and ending indices with ImageTake for precise region selection. Take the part of the image that occurs from rows 200 to 299, and columns 100 to 399:
ImageCrop and ImageTake complement each other, giving you a wide range of functionality. But what if you want to select the region of interest interactively, using a mouse or other pointing device? You can easily do this in a few quick steps.
With the mouse pointer positioned over an image, right-click and select Get Indices. The mouse pointer then changes into a cross with a tooltip next to it that indicates the current row and column position of the pointer.
Thread or transpose the indices to convert the list to the form required by ImageTake. The sort operation then ensures that the row and column lists are in ascending order, regardless of the order in which you picked the opposing corners of the rectangle: