The text of a manual · part 14 of 42
Bulletin 5370 CVIM Configurable Vision Input Module User Manual: 6 - Reference Tools: Lines and Windows, pages 137 to 146
Pages 137 to 146 of 390, from Bulletin 5370 CVIM Configurable Vision Input Module User Manual
The original document is the PDF (26 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.
For the Allen-Bradley 5370-CVIM
Page 137
Chapter
6
Reference Tools: Lines and Windows 6-21
Selecting
Define Ref.Line Menus and Parameters (continued)
Using Define Edges Function:
Binary Mode (continued)
Popup
Your Action Look at the threshold CUFSOFS on each side of the slide bar.
Comments The cursors on each side of the slide bar are the principal means by which you will define “edges” (that is, transitions) that occur along the reference line. The reference line lies entirely within a box called the “area of interest.” This box contains the binarized image. All parts of the image outside the box remain in gray scale form. The cursors’ positions along the slide bar represent image brightness values from 1 to 63, with 63 at the top and 1 at the bottom. Think of the left cursor this way: Any part of the binary image area havin a higher brightness value (that is, lighter) than the value in f icated by the cursor’s current setting will appear black in the binary image. For example, if the cursor is set to a brightness value of 45, then all parts of the binary image having brightness values higher than 45 will appear black. Think of the right cursor this way: Any part of the binary image area having a lower brightness value (that is, darker) than the value indicated by the cursor’s current setting will appear black in the binary image. For example, if the cursor is set to a brightness value of 27, then all parts of the binary image having brightness values lower than 27 will appear black. Thus, all parts of the binary image having a brightness value between the current settings of the two cursors will appear white, In the examples above, all parts of the binary image having brightness values from 27 to 45 will appear white; all other parts will appear bEack.
Pick leftcursor.
Aim the light pen at the cursor. When you see a red box around the cursor, pick the cursor. This causes the cursor to turn yellow, indicating that you can now “drag” the cursor up or down.
Drag theeleft cursor to its itOpmOSt position.
This initializes the left cursor to the “63” brightness value.
Pick and drag the right CUFSOF to its bottommost position.
This initializes the right cursor to the “1” brightness value.
Pick the left cursor again and drag it downward.
Drag the cursor downward until those parts of the binary image that you want to be white start to turn black. Then, drag the cursor up slightly until those same areas just change to white again. As you drag the cursor up and down, an X will appear along the reference line wherever an edge (binary transition) is detected.
Page 138
Chapter
6
Reference Tools: Lines and Windows
6-22
Selecting Define Ref.Line Popop Menus and Parameters (continued) Your Action Pick the right cursor again and drag it upward.
Using Define Edges Function:
Binary Mode (continued)
Comments Drag the cursor upward until those parts of the binary image that you want to be black just turn black. As you drag the cursor up and down, an X will appear along the reference line wherever an edge (binary transition) is detected.
Alternately pick and drag each cursor until a stable X appears at the reference edge.
Your objective is to produce a stable X at the reference edge, which is the edge that the reference line must “see” in your application. Other X’s may also appear along the reference line; however, you can configure the system to recognize only the X at the reference edge. Try various positions of the two cursors to produce the most stable X at the desired edge reference. Trial and observation binary threshold.
Look at the Filter menu.
is the correct procedure for setting the
If white or black “noise” in the image prevents you from getting a single, stable X at the desired reference edge, try using white or black filtering. In the Filter menu, the filled-in square (0) shows the currently selected filter level. This determines the number of consecutive black or white “noise” pixels that will be removed (filtered) before the reference line looks for the reference edge. Black or White determines which color of pixel should be considered “noise.” The filter, in effect, masks out the “noise” pixels so that they don’t create false edges. For example, if the filter menu is set to White and 3 Pixels, and the reference line encounters three (or fewer) consecutive white pixels in a stream of black pixels, these white pixels are removed (filtered out), and no edge is detected. If, on the other hand, the reference line encounters four (or more) consecutive white pixels, an edge is detected (actually, two edges will be detected - a leading edge and a trailing edge - if the reference line crosses through the string of white pixels). Your objective is to set the filter to a level that removes enough visual “noise” from the binary image to prevent the reference line from detecting false edges.
Pick the White or Black menu box in the Filter DODUDmenu.
This menu box “toggles”between White and Black when you pick it repeatedly. Select White to filter out small white noise. or select Black to filter out small black noise.
Page 139
Chapter
6
Reference Tools: Lines and Windows 6-23
Selecting Define Ref.Line Popup Menus and Parameters (continued)
Using Define Edges Function:
Binary Mode (continued)
Comments
Your Action
If your application does not need filtering, pick 0 Pixels. Otherwise, try various values of filtering to get the cleanest binary image and a single, stable X at the reference edge.
Pick the appropriate filter value from the Filter mew.
As is the case in setting the binary threshold, trial and observation is appropriate here. You may want to try several filter settings to see which one is best for your particular application. Using Define Edges Functions Gray Scale Mode Use the following steps for setting the threshold/scale selected the Gray Scale mode.
if you
If you have selected the Gray Scale mode, when you pick the Def i n e Edges menu box, the slide bar appears on the monitor screen, as follows:
Pick the Define Edges menu box in the Define Ref.Line popup menu.
#Workpiece Reference Line
4 Left ___,: Cursor
Slide Bar’
IOutput/Reference I Learn:
X.Ref=O Y.Ref = n/a
I
Camera A
.
0.0
I
Right/ Cursor I
T H R E 5 H 0 L D I 5 C A L E
D
Ib -
I
/&$fi<Lfne. Ref. Win : .: :
c’ /
Gage
Window
Mist
Exit
Page 140
Chapter
6
Reference Tools: lines and Windows
6-24
Selecting
Define
Ref.Line
Using
Define
Edges Function:
Gray Scale Mode (continued)
Popup Menus and Parameter5 (continued) Your Action
Comments Also on the monitor screen, a small “X” will appear along the reference line wherever it “sees” an edge. As shown above, the reference line sees four edges on the circular workpiece. If no X’s appear, or if too many X’s appear, you will need to adjust the threshold/scale cursors.
Look at the cursors on each side of the slide bar.
The cursors on each side of the slide bar are the principal means by which you will define the gray scale image in which the “edges” (that is, the transitions) occur along the reference line. The left cursor represents the current setting of the “gradient threshold.” This setting determines the minimum change in brightness value that must occur, within the number ofpixe2s indicated by the scale factor, before the CVIM system can “detect” an edge. When the left cursor is at its lowest position, it selects a gradient threshold value of 0.00. This indicates that any change in brightness value will cause the system to detect an edge. When the cursor is at its highest position, it selects a gradient threshold value of 63.00. This indicates that the system will detect an edge only when the change in brightness value is 63. The right cursor represents the current setting of the “scale factor.“This setting determines the number of consecutive pixels that the CVIM system examines to determine whether or not an edge (transition) exists. Note that the larger values of scale factor increase processing time. When the right cursor is at its lowest position, it selects the smallest scale factor (2); and when the cursor is at its highest position, it selects the largest scale factor (41).
Pick the &cursor.
Drag the left cursor to its bottommost position. Pick and drag the right cursor to its bottommost position. Pick the right cursor again and drag it upward.
Aim the light pen at the cursor. When you see a red box around the cursor, pick the cursor. This causes the cursor to turn yellow, indicating that you can now “drag” the cursor up and down. This initializes the left cursor to the “0.00” gradient threshold. This initializes the right cursor to the “2” scale factor. At this point, many X’s (“edges”) may appear along the reference line. Drag the cursor upward until the X’s at the desired edges are in good, stable locations. Many edges may still be present along the reference line.
-
Page 141
Chapter
Se/e&y
Define Ref.Line Popup Menus and Parameters (continued)
6
Reference Tools: Lines and Windows
Using Define Edges Function:
6-25
Gray Scale Mode (continued)
Comments
Your Action
Drag the cursor up ward until you remove as many of the unwanted X’s as possible without losing the X at the reference edge of your workpiece.
Pick the left cursor again and drag it upward.
Your objective is to produce a stable X at the reference edge, which is the edge that the reference line must “see” in your application. Other X’s may persist along the reference line you may not be able to get rid of all extraneous X’s. You can, however, configure the system to recognize only the X at the reference edge.
AIternat(ely pick and drag each cursor until a stable X appears at the reference edge.
Try various positions of the two cursors to produce the most stable X at the desired edge reference. Trial and observation gray scale threshold.
-
Selecting Define Featu res Popup Menu and Parameters is the correct procedure for setting the
Select the Define Features popup menu, then select the parameters in that menu. Basically, these parameters specify the edge (or midpoint) that the X and/or Y axis of the reference line will search for and the direction of search.
Your Action
Comments
Pick the Define Features menu box in the Ref. Line popup menu.
When you pick the Define Features menu box, the Define Features popup menu appears above the Ref. Line popup menu, as follows:
1Offset:
1.O
Define Features Popup Menu Active
Feature:
A 0.0
Define Ref.Line ‘Qefine
Featirres
$
Output/Reference Learn:
X.Ref = 0 Y.Ref = n/a
/tI;ILiill: ,E;lzed y’ ..a
+--.
Ref. Line Popup Menu
1
Env.
Camera A
R;ef+&e
Ref. Win
Gage
Window
Mist
Exit
Page 142
Chapter
6
Reference Tools: Lines and Windows
6-26
Selecting Define Features Popup Menus and Parameters (continued)
Notice also the letter A, B, or C on the reference line(s). A will appear somewhere on the X-axis line, B will appear somewhere on the Y-axis line, and C will appear somewhere on the “X-X” or “Y-Y” axis. NOTE:
-
Reference lines have only one feature.
The letters A , B, and C indicate the current location of the reference edge on the corresponding axis. The following steps provide the means for selecting the reference edge location(s) on each axis that are appropriate for your application.
Selecting Active Feature If you selected X Only or Y Only as the reference line type, skip this function. If, however, you selected X Then Y, Y Then X, X-XThen Y, or Y-Y Then X, continue with the next steps and select the axis that is to be configured at this time. Your Action Look at the Active Feature menu box in the Define Featurespopup menu.
Pick the Active Feature menu box, if appropriate.
Comments The Active Feature menu box indicates the “feature” (that is, A, B, or C) that is currently “active” for configuration purposes. Thus, A means the X-axis line is active, B means the Y-axis line is active, and C means the X-X or Y-Y axis is active. When you pick the Active Feature box, the “active feature” will change to the next letter. Thus, A will change to B, and B will change to C (or A). Pick A to select the reference edge on the X axis, or B to select the reference edge on the Y axis, or C to select the reference edge on the X-X or Y-Y axis.
Selecting Search Direction Select the direction in which the specified axis will search for the specified reference edge or midpoint. Your Action Look at the Dir menu box in the Define Features popup menu.
Comments The Dir menu box shows the currently selected direction that the reference line will use to search for edges. The direction can be either Head to Tail or Tail to Head.
-
Page 143
Chapter
6
Reference Tools: Lines and Windows 6-27
Selecting! Define Features Popup Menus and Parameters (continued)
Selecting Search Direction (continued)
Your Action
Comments
Pick i!he Dir menu box, if appropriate.
When you pick the Dir menu box, the search direction toggles to the opposite direction. Thus, Head to Tail will change to Tail to Head, or vice versa.
NOTE: The best search direction is the one in which the reference line is the least likely to encounter a false reference edge, as follows: If this\is the reference edge . . .
: .. .:.:. ...:.i : ..::: :.: ::..:.)“:.::::::::::~:~: ~ :.:i:::::::::::i::::::::::: j; :~::::::::::~~:~::::i: ............................... : ... ~.:~::~:~:~:.:~~:j. .> ............................. ::::::::~:~:~~:::j:~: : :.:.:.:.:::::::::::::::::::::j : ‘@&g&;~~ .:.:.:.: i ......... I .: ........................... < .......................... ~~~..~:.:~:~,~:~~ ~ .; .: ::~::::.:,::~::;j~:~:~~~~~:~: : .:.:.::::::::::.:.,:i.~.:. : :::j:x.:.x.:...,: .............. ................ ................. .::$$~j..:p:::::j:: .~::r~~:~~~:~i:~:~.~ ................ : :. ; : : ................ ............................... ::.i:.:.:.:.:.~,.:.':.:.:.: . ... . ... . ... . . ... ... : .., ........................... : .~~~~~~~~~~~~~:::~~.~~ : ......... . .............................. ................. : ........................ : :.:.:.:.:.:.:.:.:.:.:.:.:.:.:. ~::::~::::::::::':::::i::::~:::::::: : ............................ .: : ........ .................... ................ ::;:~:$~,;;;;~ : : ..... .::::::::::::::::::::::::::j::::::::::::::: : .:.:.:.:.:.:.:.:.:.:.:.:.:.:.:. ........... ..:"'::"':::::::::::::::::::::g::::::. ..~:::::::::jj~:::::::j:: .:...:.:.):.:.:.:.):c. .. : ......................... ............. .............. ..... ........ ... . :.:.:.~:~:::::Mj::::j::.:.:.:.:.:.:.: .............. ..:.:.:.~)":.:.:.:.:(.: .. .. ........ .. ......... .. ............... : ::::~~:::~:::::~~:~:SBil : : ................ ., :.:.:.:.:.:.:.:.:.:::::::::::: ...............
. -. .
................ ............... : ..:.:.:.:.:.:.:.: .: ._.,.i,,., : ::::::::.:~:::jjjjjj:>:j.:j ..:.:.:.:.:.:.:.:.:.:.:.:.:j:: :.:.:.:.“‘:.:.:.:.:.:.:~. ,: ................ :~~~211:~~:~:~:~:3, : .:.:r.:.~~:.::::::::.:.: I . ... .... . . ........................ ::::qqjj;:::~jj::: : .... ..... j ::f~~.~~~;~;~:~:~I(:~~: : ................... ::~::::::::::::::~y:::::::::~: :j:::::.:::.:.,:.-.:.:.: :i ... ... .................. :jj::::jjjj$$j$jj:: : : ::;::::::qj::jj~:<.;~::~. : ~~~~:g$j~~~~~~~: : .................. ..‘i.>: .: .......... .> . . ... . . . . . . . . . . . . ... . . ... ................ .:“.‘.:‘.:.;: ..:.:.:.:::::::: ,:::::::jj:::.:.:.:.:.:.:.:.: .................. ............... : ...... ::::.::::.~::.:...<. ............... _,.(,.,.i,.,.n_, . . .......... . ................. .......... ................. ‘j:::~::::::::::::,, .............................. ............... ................................ ................................ ............................... ................ : .:::::::::::::::::::::::L::: .‘~:.:.):.:.~:.:.:.:.:.:.:. .... .........................
l .*
-
:; :
:i .: /
. . . the b
F-J/.;
&arch direction
,i ..... .:::. : ::j:
:--~%+
..:. ::.I,:k should be Head-to-Tail
Select the appropriate search direction for the reference line.
Selecting 5. Mode Popup Menu Select the 5. Mode popup menu, then select one of four modes by which the reference line will search for an edge: 1. Search for all edges along the length of the reference line. 2. Search only for the edges of the largest white object along the reference line. (This is not available with the gray scale gaging mode.) 3. Search only for the edges of the largest black object along the reference line.(This is not available with the gray scale gaging mode.) 4. Search orzly for the edges of the largest object along the reference line. Your Action Look at the 5. Mode menu box in the Define Featlures popup menu.
Comments The 5. Mode menu box shows the currently selected mode for searching for edges along the reference line.
Page 144
Chapter
Reference Tools: Lines and Windows
6
6-28 -
Selecting Define Features Popup Menus and Parameters (continued)
Selecting 5. Mode Popup Menu (continued)
Comments
Your Action Pick the 5. Mode menu box.
When you pick the 5. Mode menu box, the Search Mode popup menu appears on the right side of the screen, as follows:
1Offset:
1.O
1Active
Feature:
1 Ref.Line Previous Env.
1:
A
I
Enabled
1
Next Camera A
Search Mode
I ’:-Ref.&i@+;
IjJ MaxB.Obj
I
0
I
Max Object
L
Ref. Win
Gage
-
I
Window
Mist
Exit
Note that the All Edges box in the Search Mode popup menu has a shaded square (Cl). This indicates that All Edges is the currently selected edge search mode. These are the four edge-search popup menu:
modes in the Search Mode
1. All Edges: This search mode causes the reference line to search for all edges, all midpoints between edges, and the starting end of the reference line. 2. and 3. Max W. Object: or Max B. Object: These search modes cause the reference line to search for one edge and the midpoint of the largest white (or black) object along a reference line. These modes are valid only with the binary mode. 4. Max Object: This search mode causes the reference line to search for one edge and the midpoint of the largest object between two consecutive edges along the reference line. -.
Page 145
Chapter
6
Reference Tools: Lines and Windows 6-29
Selecting Define Features Popup Menus and farameters (continued)
Selecting 5. Mode Popup Menu (continued) The examples in the following figures show the effects of different combinations of search mode, binary or gray scale mode, and search direction. In Example #1, the active feature searches the head (“fixed”), the point between the first and last edge (“center”), and all edges and midpoints between adjacent edges.
Search Mode: “Fixed” I
“Center”
*Midpoint
Edges i..:
:
*Midpoint
*bidpoints in this figure enable showing
: *The small white locations squares of the black objects. They are not “holes” the midpoint in the workpiece.
In Example #2, as in example #l, the active feature searches for the taiE(“fixed”), the point between the first and last edge (“center”), and all edges and midpoints between adjacent edges.
I I
Example #2 Mode: Gray Scale Search Direction: Tail-to-Head Search Mode: All Edges
I I
Page 146
6-30
Chapter
6
Reference Tools: Lines and Windows
-
Selecting Define Features Popup Menus and Parameters (continued)
Selecting 5. Mode Popup
Menu (continued)
In Example #3, the active feature will search only for the edge at the head side of the largest black object and the midpoint between the two edges of that object.
I
Example #3 Mode: Binarv Search Direction: HeadIto-Tail Max. Black Object I Search Mode:
I
In Example #4, the active feature will search only for the edge at the head side of the largest white object and the midpoint between the two edges of that object.