Legacy Documentation

Digital Image Processing (2000)

This is documentation for an obsolete product.
Current products and services
Previous section-----Next section

5.6 Region-of-Interest Processing

Region-of-interest processing functions.

Image subregions may be conveniently specified by using Mathematica Graphics primitives, such as Circle, Disk, Point, Line, Rectangle, Polygon, or simply as a list of vertex positions. We follow with a few demonstrations.
In[1]:=
In[2]:=
Out[2]//MatrixForm=Out[2]//MatrixForm=
Point operations are mapped to every point in a ROI by using the function RegionPoints, which returns a list of all coordinate pairs within a region, given a region specification. Here is an example of using RegionPoints to extract all diagonal elements of a matrix.
In[3]:=
Out[3]=Out[3]=
In[4]:=
Out[4]=Out[4]=
In[5]:=

Region selection functions.

In[6]:=
Out[6]=Out[6]=
This shows the result of applying a Sobel edge detector to the region defined by roi.
In[7]:=
Out[7]=Out[7]=
In[8]:=
Out[8]=Out[8]=
In[9]:=
Out[9]=Out[9]=

LineProfile functions.

The function LineProfile is useful in obtaining details of amplitude variations (i.e., intensity profile) in an image by returning pixel values along some arbitrary user-selected path. Examples of row or column profiles were shown in Sections 2.2 and 2.5.
In[10]:=
In[11]:=
In[12]:=
Out[12]=Out[12]=