# How to Use the ViDiDetect Tool

This topic will utilize an example application to illustrate how to use the ViDiDetect function. The example will incorporate a Filter function that will output a binary image that will be processed by a trained FindPatMaxRedLine, which will be used to generate fixture data for the ViDiDetect function.

This sample application presents a transparent part (glass vials) which makes it difficult to distinguish breakages from debris along the front or back of the vial. The reflective surface of the vial also creates variability that would challenge traditional rule-based vision tools.

However, ViDiDetect can accurately distinguish natural part variation from anomalies by training on a reference set of good parts, under variable lighting conditions and debris levels.