Basic Points of Vision Objects

Before going into the details of vision objects, there are a few things you should know about vision object layouts and position/sizing methods used to manipulate them.
When a new vision object is created and placed in the image display it is given specific visual characteristics that are important to understand.
For example, a Correlation object is displayed with a search window, model window and model origin. All of which can be repositioned with simple dragging techniques.
The followings are some of the basic vision objects and the methods to manipulate them.

A Sample Vision Object Layout

Most vision objects have a search window as shown below. The search window is the outside box as shown in the figure above and is magenta (light purple) in color when active (the vision object you are currently working with) and blue when inactive (another vision object in the Sequence but not being worked with at the moment). At run time, it changes color to green or red depending upon whether the object was found.
The search window is used to define the Region of Interest (or area within which we will search for a part or pattern).
Moving the search window is easily accomplished by clicking down on the name of the vision object (or on the search windows itself) and then dragging it to the desired new position on the image display. (“Corr01” is the name of the vision object in the figure below.)

The size of the search window is very important when configuring a vision object. The larger the search window, the more time will be required to process the search. It is a good idea to make the search window large enough to handle the variation in part position while keeping it as small as possible.

KEY POINTS


By setting the SearchWinType property to “RotatedRectangle” or “Circle”, the search window can be angled or the circular search window can be used.

Sometimes the use of 6.2.15 Frame object can help reduce the size of search windows.

Positioning the Search Window
To position the search window, click the name of the vision object, or the search window itself, and then drag the Vision object to whatever position you like.
When moving the vision object, make sure that the top left corner is located in the proper position.

Resizing the Search Window
To adjust the size, use the search window size handles. They appear when a vision object is first created or when a user selects a vision object by clicking on that object.
The search window size handles are the small boxes located on the sides and corners of the search window. By using them, you can easily adjust the search window size.
When you move the mouse pointer over one of the search window size handles, it changes into a double-ended arrow pointer. Now the handle can be selected by clicking the mouse.
You can click any of the search window size handles and then drag the side or corner to resize the search window.
Clicking on a search window size handle located on one of the sides of the search window allows you to resize the object horizontally.
Clicking on the top or bottom of the search window allows you to resize the object vertically.
Clicking on one of the corner search window size handles allows you to resize the search window both horizontally and vertically at the same time.

Search Window shown after resizing

Shape of the search window can be set with SearchWinType property. “Arc”, “Polygon” can be set in addition to “Rectangle”, “RotatedRectangle”, and “Circle”. Properties that can be adjusted by size handles and can be used are different between “Arc”, “Polygon” and other three types. You can set arc shaped search area by setting “Arc”.

Positioning the Search Window
To position the search window, click the name of the vision object and then drag the Vision object to wherever position you like.
When moving the vision object, make sure that the center point is located in the proper position.

Resizing the Search Window
To adjust the size, use the search window size handle. The search window size handles of “Arc” search window are the small boxes located on the outer/inner diameter of the circle of the arc search window and the start/end point of the arc. By using them, you can easily adjust the search window size.
When you move the mouse pointer over one of the search window size handles, it changes into a double-ended arrow pointer. Now the handle can be selected by clicking the mouse.
Clicking on a search window size handles located on the start/end point of the arc allows you to resize the arc length of the search window.
Clicking on a search window size handles located on the center of the inner/outer diameter of the circle allows you to resize the thickness of the search window.

KEY POINTS


In “Arc” search window, SearchWinLeft, SearchWinTop, SearchWinHeight, and SearchWinWidth properties that can be used in “Rectangle”, “RotatedRectangle”, “Circle” search window types are no longer available. Instead, SearchWinAngleStart, SearchWinAngleEnd, SearchWinRadiusInner, and SearchWinRadiusOuter properties are available. SearchWinCenterX and SearchWinCenterY properties are also available so you can adjust the position of an arc and size by using six properties.

Setting SearchWinType “Polygon” allows to set search area of dodecagon. Compared to other 4 types, it has more properties, but it is possible to express more flexible shapes.

Positioning the Search Window
To position the search window, click the name of the vision object and then drag the Vision object to wherever position you like.
When moving the vision object, make sure that the center point is located in the proper position.

Resizing the Search Window
To adjust the size, use the search window size handle. The search window size handles of “Polygon” search window are the small box located on each vertex of dodecagon. By using them, you can easily adjust the search window size.
When you move the mouse pointer over one of the search window size handles, it changes into a double-ended arrow pointer. Now the handle can be selected by clicking the mouse.
For the search window of “Rectangle” and “RotatedRectangle”, size handle is a handle for adjustment of search window width, height, or both. Therefore, if selected handle is moved, other size handles also move depends on the operation. However, for “Polygon” search window, only the selected handle moves, the other handles do not. This makes adjustment of search area more flexible.

KEY POINTS


For “Polygon” search window, “SearchWinLeft”, “SearchWinTop” properties that can be used in “Rectangle”, “RotatedRectangle”, “Circle” search window types are no longer available. Instead, SearchWinPolygonPointX1, SearchWinPolygonPointY1 ~ SearchWinPolygonPointX12, SearchWinPolygonPointY12, properties that express coordinate position of each vertex are available. SearchWinAngle, SearchWinCenterX, SearchWinCenterY, SearchWinHeight, SearchWinWidth properties are also available so you can adjust the position of search area, size, and shape by using 29 properties.

CAUTION


Ambient lighting and external equipment noise may affect vision sequence image and results. A corrupt image may be acquired and the detected position could be any position in an object’s search area. Be sure to create image processing sequences with objects that use search areas that are no larger than necessary.

The Model Window

Correlation, Geometric, and Polar objects contain a model window and a search window. In this section, the Correlation object model window will be used.
Correlation objects have a model window as shown in the figure below. The model window is the inside box as shown in the figure and is magenta in color. (Except at run time where it changes to green when the object is found.) The model window is used for defining the boundaries of the model. (Remember that a model is an idealized representation of a feature. In general, it's what you will be searching for.)

The Model Window
Positioning the Model Window
Since the size and position of the model is very important for teaching a new model, it is important to understand exactly how to set the position for and adjust the size of the model window.
To position the model window, click one of the 4 lines which make up the model window and then drag the model window to a new position. We recommend positioning one of the four corners of the model window first and then resizing the model window.
Just as with the search window, the model window size is very important when configuring a vision object. In general, searching for a small model in a large search region takes more time than a large model in the same large search window. It is a good idea to make the model window big enough to define the part or pattern you are looking for while keeping it as small as possible but at the same time keeping the search window small as well.
Tips:
By setting the ModelWinType property to “RotatedRectangle” or “Circle”, the model window can be angled or the circular model window can be used.

Resizing the Model Window
Then model window size handles appear when a model window is selected.
However, if the search window is selected then you will not see the model window size handles. If you cannot see the Handles on the model window, then the search window may be the active window. To make the model window the active window, click one of the sides of the model window and you should then see the model window size handles.
Model window size handles are used to size the model window. Moving the mouse pointer over one of the model window size handles causes the pointer to change to a double-ended arrow pointer. This indicates that you can click the handle and resize the model window.
You can click any of the model window size handles and then drag the side or corner to resize the model window.
Clicking on a model window size handle located on one of the sides of the model window allows you to resize the object horizontally.
Clicking on the top or bottom of the model window allows you to resize the object vertically.
Clicking on one of the corner model window size handles allows you to resize the model window both horizontally and vertically at the same time.

The Model Origin

Every model has a model origin. The model origin is the fixed reference point by which we describe the model's location in an image.
It should be noted that the model origin coordinate position is referenced to the upper left position of the model window.
The upper left position of the model window starts at [0,0].

Positioning the Model Origin
The model origin can be positioned automatically or manually.
To set the model origin automatically, set the ModelOrgAutoCenter property to True for that specific object. In this case, the model origin will automatically be set to the center of the model window.

KEY POINTS


  • The default setting of the ModelOrgAutoCenter property is True.
    To move the model origin manually, set the ModelOrgAutoCenter property to False. This can be done from the Object window within the Properties list for the specific object. When setting the property in the Properties list, subpixels can be used for the setting value.

  • Even when the subpixel is used, the model origin in the image is displayed in pixels.
    To move the model origin, set the model window for the target object active. If the model window is not active, click one of the lines which make up the model window and you will see the model window size handles appear for the model window.
    If the ModelOrgAutoCenter property is set to False, the model origin can be moved by using the mouse. To move the model origin, click the crosshair of the model origin and drag it to a new position.

  • When the model origin is moved by using the mouse, it will be set in pixels. To set the model origin in subpixels, use the Properties list.
    It is normally a good idea to position the model origin on a position of significance for the model you are working with. For example, you may want to place the model origin at the position on the model where you want the robot grip to pick up a part.