Region-of-Interest Processing

 Download this example as a Mathematica notebook.

Digital Image Processing defines a large number of specialized functions in order to increase your productivity in performing many common image analysis operations.

It is sometimes of interest to process a single subregion of an image, leaving other regions unchanged. This is commonly referred to as region-of-interest (ROI) processing. Image subregions may be specified conveniently by using Mathematica graphics primitives such as Point, Line, Circle, or Polygon or simply by listing vertex positions. Here are two demonstrations.

Read in an image and display it.

Define a region of interest. See the Mathematica How-To for more information on interactively selecting coordinates.

Display the region of interest.

This shows the result of applying a Sobel edge detector to the region defined by roi.

As a second example, consider the application of a threshold operator to an irregular region of interest. The vertices were selected using the point-and-click method as described earlier.

This shows the region of interest.

This shows the result of applying the threshold operator to the region of interest.