Region-of-Interest Processing
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. Here we show an example of edge
detection in a trianglar ROI using a real image.
We first load the package.
![[Graphics:Images/index_gr_81.gif]](Images/index_gr_81.gif)
This loads the example image.
![[Graphics:Images/index_gr_82.gif]](Images/index_gr_82.gif)
Here we define a ROI. Image regions may be conveniently selected using
the mouse and keyboard. To select a particular region, click the
displayed graphics object. In Windows (for other systems consult Input
> Get Graphics Coordinates), press the Control key and click a
point of interest. The point will be selected. This action may be
repeated for as many points as desired. Use the Copy and
Paste commands to paste the recorded list of positions to any
cell or expression in the notebook.
![[Graphics:Images/index_gr_83.gif]](Images/index_gr_83.gif)
![[Graphics:Images/index_gr_84.gif]](Images/index_gr_84.gif)
This shows the result of applying a Sobel edge detector to the region
defined by roi.
![[Graphics:Images/index_gr_85.gif]](Images/index_gr_85.gif)
|