O'Reilly logo

Practical Guide to Machine Vision Software: An Introduction with LabVIEW by Steven Ready, Kye-Si Kwon

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

4Edge Detection

Edge detection is used to find locations in the digital image where the image brightness changes abruptly along a line of pixels. These abrupt changes usually define the edge of an object in an image. By using the edge detection, boundaries of an object can be identified. Once the boundary of an object is located, the size as well as other features of the object can be determined.

Note that the type of ROI used for edge detection is defined as a line in the image display, whereas in Chapter 3 a two-dimensional area is used as a ROI for particle analysis. To use the edge detection algorithm, color image should be converted to either a grayscale or a binary image in advance.

The basic example for Edge detection can be found from the following folder:

The concept of edge detection can be understood from the example provided with LabVIEW. As shown in Figure 4.1, by defining a ROI line across the object, the pixel values along the line's path provide a profile of the object that is represented in the Line Profile graph seen at the top right of Figure 4.1. The profile values display an abrupt change at the edge of the object. As seen in Figure 4.1, the small dots at the object's edges indicate that the program has found the edge locations along the ROI line. The dots appear on the image by means of an overlay function.

Figure 4.1 Example VI for edge detection provided ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required