# Acquire and Store Images

In this phase, you will use the In-Sight D900 series vision system to capture and collect images for your training and testing image database. To speed up application development, when saving and storing your images, it is recommended that you provide information about the images in the file name (such as whether or not the image contains defects, if it indicates a passing or failing part, a date or production line), and segregate the images into training and testing image folders. The training images will be used to construct your neural network model. The testing images that were not used during training are used to validate the trained model.

Note: Cognex recommends setting up an external FTP server, such as FileZilla, to store the images acquired by the vision system.

1. From In-Sight Vision Suite, connect to your vision system. A new job will be generated automatically if no jobs have been configured earlier on the device.

2. In the newly created job, use the AcquireImage function (located in cell A0), to adjust the settings of the vision system to ensure that you are capturing high-contrast, well focused images.

   Note: In this step, it is important to use the exact same setup that will be used during runtime. Changes to the setup will require that you retrain your ViDi tools.

3. Place the vision system in Live Video mode to focus the lens. If using the autofocus lens, you can press the Autofocus button.

   Tip: Press the Change Split button in the View toolbar to see both the image and the spreadsheet.
   Note: By default, the In-Sight ViDi adapter contains two pre-configured Web Pages. Using these WebPages, you can place the vision system online and access the vision system via its web server. From this connection, you can also modify the vision system’s acquisition settings and focus the lens.
4. Add a WriteImage function and configure it to connect to your external FTP server.

5. Capture and collect a number of images to use for your training and testing image sets.

   Note: For more information, see the Image Set Collection topic.
6. Once you have captured and collected your images, add them to your Filmstrip directory so they can be used while you configure the rest of your application.

Note:

- Alternatively, you can use the Filmstrip window. This will record the images to your local PC. You can only use this method while offline.

- If you are using the In-Sight ViDi PC, the In-Sight Vision Suite software will automatically discover and auto-configure the IP address of GigE Vision cameras connected to the PC.

  Cognex recommends that the GigE cameras be connected to a Cognex GigE frame grabber, such as the Cognex 8704e or 8724e GigE Vision Frame Grabber. The following types of cameras and image file types are supported:

  GigE monochrome (grayscale) Area Scan cameras acquiring 8-bit images in JPEG or BMP image file format

- For the In-Sight ViDi PC, it is recommended to use the WriteImage function and save the images in the pubfs folder (located \ProgramData\Cognex\In-Sight\In-Sight ViDi PC\pubfs).

The Cognex ViDi tools support multiple image file formats. However, the In-Sight ViDi spreadsheet only supports 8-bit images in either JPEG or BMP format. If you create a ViDi workspace using color or higher bit-depth images, you will receive incorrect results in the spreadsheet.