GoWebScan API
 All Classes Files Functions Variables Typedefs Macros Modules Pages
Getting Started

The GoWebScan SDK is distributed with an example application, GoWebScanSdkExample, which demonstrates how to read and write required files, how to connect to sensors and configure the timing, how to set up the main processing class (GoWebScanProcess) and how to receive and send sensor data to GoWebScanProcess and retrieve completed boards.

The example application saves the completed boards as images, but a real application would send this data for further processing. The application demonstrates running a system in Detection mode or Calibration mode. In Detection mode, GoWebScan detects discrete objects and produces a uniform-resolution array representing the object profile data (along with tracheid and vision data depending on the sensor models). In Calibration mode, GoWebScan computes offsets to align sensors in the Z and Y axis and computes gains for a flat field calibration of vision sensors (white balancing).

The key classes in GoWebScan that a user application must interact with are as follows:

  • GoWebScanSettings: Loads and stores (to an XML) user settings defining the system topology and processing parameters. For users familiar with the previous generation chroma+scan series sensors, this file is similar to the Settings.xml in the station storage. Any parameter that existed in the chroma+scan settings file retains the same meaning as before and can be reused. There are additional required parameters, and as such, a chroma+scan settings file cannot be directly reused without some modification.
  • GoWebScanConfig: Translates the user settings in GoWebScanSettings into system parameters. A GoWebScanConfig object needs to be constructed with a GoWebScanSettings object as a parameter, and needs to be passed into the processor object (GoWebScanProcess).
  • GoWebScanProcess: Accepts raw sensor messages for processing and produces uniform resolution system tiles (in Web mode) or completed boards (in Detection mode). Internally, this class delegates processing to various control and algorithm classes.
  • GoWebScanSystemMsg: Contains the profile, tracheid (if applicable), and/or vision (if applicable) data of the detected board.
  • GoWebScanCalCollector: Collects raw sensor data during system calibration and produces an input dataset for calibration processing.
  • GoWebScanCalInput: Contains the input calibration dataset.
  • GoWebScanCalProcessor: Performs the processing during system calibration on an input dataset and produces a GoWebScanCal object representing the system calibration.
  • GoWebScanCal: Contains the system calibration offsets and gains, and stores and loads the data to an XML file.
  • GoWebScanCalTarget: Contains the dimensions of the calibration bar, and stores and loads the data to an XML file.

GoWebScanSdkExample demonstrates the following steps for using the GoWebScan SDK:

  1. Constructs a GoSdk library and a GoWebScanSdk library.
  2. Constructs a GoSystem and sets a data handler for received sensor messages.
  3. Loads the GoWebScanSettings file.
  4. If in Web or Detection mode, loads the GoWebScanCal file, otherwise if in Calibration mode, loads the GoWebScanCalTarget file.
  5. Connects to each enabled sensor, enables data, configures the timing, and reads information about the current active area. For systems with vision sensors, the GoGeoCal file containing camera orientation information is downloaded from the sensors. Additionally, configuration of the vision sensor timing should be performed as demonstrated in the example application to avoid interference.
  6. Constructs the GoWebScanConfig object. For Detection mode, the application constructs the GoWebScanProcess object. For Calibration mode, the application constructs the GoWebScanCalCollector and GoWebScanCalProcessor objects.
  7. Starts the system using a scheduled start. For vision systems, configuration of the sensor start time should include a delay as demonstrated in the example application to avoid interference.
  8. In the data handler for received sensor messages, if in Detection mode, the application passes the messages to GoWebScanProcess_Process() and queries GoWebScanProcess_Receive() if any completed boards are available. In Calibration mode, the application passes the messages to GoWebScanCalCollector_AddMsg() until the collector is completed.
  9. If boards are available in Detection mode, extracts the profile, vision, and/or tracheid data and maps the data to one of the user-specified sections. At this point the data output is complete.
  10. In Calibration mode, produces a calibration dataset using GoWebScanCalCollector_GetProcessorData() and passes the dataset to GoWebScanCalProcessor_Execute() which will return the completed GoWebScanCal object if no errors occurred. Saves the calibration to file.