Starting the Applet in Your Own SDK

Instead of performing the applet configuration and acquisition in mircoDisplay X you can alternatively integrate them in your own SDK environment. In this section you find an introduction to the basic functionalities of the relevant SDK componets for image acquisition and configuration.

As base of a C++ SDK you can use the VisualApplets internal SDK code generator, which you find the icon menu or under Build+Generate SDK Example in VisualApplets. This function automatically generates the corresponding CMake File and the VisualStudio project files, which you can use as base for your SDK code.

Generated SDK Project Files

Figure 180. Generated SDK Project Files


The generated C++ code in the project file vasFgProject.cpp contains the following code components:

  1. Frame Grabber: Initialization

    Definition of number of acquisition cycles, definition of board index, call of function Fg_Init("Sobel_Filter.hap", boardIndex) to start the applet.

  2. Allocation of memory for buffers for acquisition.

    function: Fg_AllocMemEx(fg, ..., ...)

  3. Frame Grabber: Get* and Set* parameters for Process0

    functions: Fg_setParameterWithType(fg, ..., ..., ...) and Fg_getParameterWithType(fg, ..., ..., ...)

    Here all parameters contained in the design are listed. Basler recommends to delete all parameters, which are not necessary for adjustment during runtime, for better overview.

  4. Create the display(s)

    function CreateDisplay()

  5. Start acquisition at applet and camera for each present port:

    function: Fg_AcquireEx(fg, 0, nrOfCycles, ...,...);

  6. Grab images:

    function: Fg_getLastPicNumberBlockingEx(fg, ..., ..., ..., ...);

  7. Stop acquisition

    Function Fg_stopAcquireEx(fg, .., .., ...)

  8. Close the display

    function CloseDisplay(...);

  9. Release the memory for buffer(s)

    function Fg_FreeMemEx(fg, ..);

  10. Frame Grabber Uninitialization

    function Fg_FreeGrabber(fg);

A detailed description and explanation of the SDK functions is available at https://docs.baslerweb.com/frame-grabbers/files/en/documents/SDK/functions/fgrab__prototyp_8h.html

A detailed introduction into a SDK development is available at https://docs.baslerweb.com/frame-grabbers/files/en/documents/SDK/SDK.html.

You can integrate the generated sample SDK code into a larger SDK environment for the further software processing of the frame grabber (pre-)processed images.