User`s guide
CountingObjectsinanImage
You are now ready to set your block parameters by double-clicking the
blocks, modifying the blo ck parameter values, and clicking OK.
5 Use the Image From Workspace block to import your image from the
MATLAB workspace. Set the Value parameter to
I.
6 Use the C onstant block to define a threshold value for the Relational
Operator block. Set the Constant value parameter to
200.
7 Use the Video Viewer1 block to view the original im age. A ccept the default
parameters.
8 Use the Relational Operator block to perform a thresholding operation
that converts your intensity image to a binary image. Set the Relational
Operator param eter to
<.
If the input to the R elational Operator block is less than 200, its output
is 1; otherwise, its output is 0. You must threshold your intensity image
because the Label block expects binary input. Also, the objects it counts
must be white.
9 Use the Opening block to separate the spokes from the rim and from each
other at the center of the wheel. Use the default parame ters.
6-5