# Localize Screws with Blue Locate

Screws or any other cylindrical object need to be rotated during inspection. Looking not only at one specific line along the rotation axis, but at the full object over several images, brings the advantage that you can see the surface and defects at different angles to the camera and the illumination. For instance, some defects will show best when they are on the center line, others will show better when they are slightly off to the sides.

In this particular set of images, however, the screws are moving across the entire image such that it is advisable to first use a Blue Locate Tool to localize and crop the screw image before feeding it to the Red Analyze tool for detecting any defect.

The objectives of this tutorial are:

- Use the Blue Locate tool to localize and track fuzzy features.
- Generate a geometric model A specific spatial arrangement of a set of features (Blue Locate and Blue Read tools only.) During a post-processing step, the Blue Locate and Blue Read tools can fit all of the features detected in an image to the models defined for the tool. The overall pose and identity of the model is then returned. to find the screw's pose.

1. Add the images for the Screw tutorial.
   1. While in training Training is the process that your tool, which is a neural network, is learning about the features (pixels) based on the labels you made. For example, a tool will learn the defect/normal pixels in each image based on the defect/normal labels you drew. The goal of the tool Training is learning enough to give the correct inspection results of whether an unseen image is defective or not. The key to training is to ensure that you include all possible variations within your training set, and that your images are accurately labeled. Training times vary by the application, tool setup and the GPU in the PC being used to train the network. mode, after a Workspace has been added or opened, images can be added through either the Database menu (select Add Images), by pressing Add Images in the display space of the GUI, or dragging and dropping images from a Windows Explorer directory into the View Browser.
2. Add a Blue Locate tool.
3. Adjust the ROI The Region of Interest (ROI) defines the area of operation for the tool. The ROI preserves the positions, angles, stretch and skew of the original image. to segment an image, and then press the Scissors icon to process the images based on the new ROI.
4. Set the Feature Size parameter to 80.
5. Define at least two features (for example, the end and the tip of the screw) on at least three images.
6. Press the Brain icon to train the system. Then review the results and manually label the images where the features were not found correctly.
7. If you had to manually label new images, retrain the system and review the results.
8. Right click on an image which has the two features and create a model named "screw".
9. Reprocess the image and make sure the model is correctly found.