User`s guide

Feature Extraction
these bl ock s, see the Hough Transform, Find Local Maxima, and H ough Li n es
block reference pages in the Video and Image Processing Blockset Reference.
For additional examples of the techniques used in this section, see the Lane
detectionandtrackingandRotationcorrectiondemos. Youcanopenthese
demos by typing
vipdetectlane and viphough at the M ATLAB command
prompt.
Measuring an A ngle Between Lines
The Hough Transform, Find Local Maxima, and Hough Lines blocks enable
you to find lines in images. With the Draw Shapes block, you can annotate
images. In the following example, you use these capabilities to draw lines on
theedgesoftwobeamsandmeasuretheanglebetweenthem.
1 Create a new Simulink model, and add to it the blocks shown in the
following table.
Block Library Quantity
Image From File Video and Image Processing Blockset
> Sources
1
Color Space
Conversion
VideoandImageProcessingBlockset
>Conversions
1
Submatrix Signal Processing Blockset > Math
Functions > Matrices and Linear
Algebra > Matrix Operations
4
Terminator
Simulink > Sinks
1
Edge Detection Video and Image Processing Blockset >
Analysis & Enhancement
1
Hough Transform Video and Image Processing Blockset
> T rans forms
1
Find L ocal Maxima Video and Image Processing Blockset
> Statistics
1
Selector Simulink > Signal Routing
4
Hough Lines Video and Image Processing Blockset
> T rans forms
1
7-17