17.12.2018 Views

Image Acquisitionand Proces

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Image</strong> Analysis 213<br />

FIGURE 7.72 Lines intersection example — wiring diagram.<br />

7.9.3 LINE FITTING<br />

Fitting is a useful mathematical technique when used to discover trends in sample<br />

data sets, and can be just as valuable when examining images. Parts under inspection<br />

often contain regular repeating structures, and line Þtting can be used as a quality<br />

control measure to ensure that parts are consistent. Consider Figure 7.73: A series<br />

of Australian ßags has been printed on a sheet, although one of the ßags has been<br />

printed with an incorrect alignment.<br />

FIGURE 7.73 Fit line example.<br />

Using IMAQ Count Objects and IMAQ Fit Line, it is obvious that the third<br />

ßag from the left is not in the correct position. The Federation star (the seven-pointed<br />

star in the bottom left quadrant of the ßag) has been detected, and their centers<br />

determined. This data has been then passed to IMAQ Fit Line, which determined<br />

the line of best Þt. Features that are outside of a user-deÞned range of distances<br />

from the Þtted line can then be regarded as inappropriate, and the part is failed<br />

(Figure 7.74).<br />

IMAQ Fit Line does not perform a line of best Þt in the true mathematical<br />

sense, as it can disregard some points that you include in the set to be considered.<br />

You are able to deÞne a pixel radius that deÞnes a corridor either side of the line<br />

of best Þt, where only points within the corridor are considered. IMAQ Fit Line<br />

Þnds the line of best Þt by Þrst considering a subset of points that has been<br />

deÞned, and subsequently calculating the mean square distance (MSD) of this<br />

line (Figure 7.75).

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!