Image tool operations: image arithmetic – Rockwell Automation 5370-CVIM2 Module User Manual

Page 317

Advertising
background image

5

Chapter

Chapter 7

Inspection Tools

7–79

This section provides detailed information about the six arithmetic operations
listed in the

Image Operation

selection panel (Figure 7.51, page 7–61) and

illustrates the effects that these operations have on image features.

An image arithmetic operation is an appropriate choice when an arithmetic
combination of two images is required in order to extract the relevant
features of a workpiece, or enhance them, for inspection purposes.

Image arithmetic operations can be performed on a gray scale or binary
image, or on a combination of gray scale and binary images. When two gray
scale images are added or subtracted, the resulting image will be a gray scale
image. Similarly, when two binary images are added or subtracted, the
resulting image will be a binary image.

When one image is gray scale and the other is binary, however, the binary
image is treated as a “mask,” with the following consequences for both
addition and subtraction:

S1

S2, S

Ȁ, or T

Pn or Bn

Gray

Black

Gray

Gray

White

Black

The image arithmetic operations use the abbreviations

S1

and

S2

,

S1’

, or

T

to represent the specific image sources to be accessed in each operation.
They are described briefly as follows:

S1 –– This is the primary image source for all image arithmetic
operations. It is specified in the toolset edit panel under the “

S1

” heading,

and it can be an image from either a camera (

C1

C6

) or from another

image processing tool (

P1

P3

or

B1

B3

).

S2 –– This is the secondary image source for the

S1 – S2

and

S1 + S2

operations. It is specified in the toolset edit panel in the “

S2

” column, and

it can be an image from either a camera (

C1

C6

) or from another image

processing tool (

P1

P3

or

B1

B3

). (Note that

S1

and

S2

cannot

specify the same image source for any one image tool. For example,

C1

cannot be specified as both

S1

and

S2

for the same image tool.)

S1’ –– This is the secondary image source for the

S1 – S1’

and

S1 + S1’

operations. It is always a part of the

S1

image.

T –– This is the secondary image source for the

S1 – T

and

S1 + T

operations. It is always a “template” image that was saved from either the

S1

image or from some other image.

During configuration,

S1

,

S2

, and

S1’

are each represented as an “area of

interest” (AOI), and they are configured using the

and

buttons in the tool edit panel. The template image

T

is configured using the

Image Manager

panel.

Image Tool Operations:
Image Arithmetic

Advertising