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.
The generated C++ code in the project file vasFgProject.cpp
contains the following code components:
-
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. -
Allocation of memory for buffers for acquisition.
function:
Fg_AllocMemEx(fg, ..., ...)
-
Frame Grabber: Get* and Set* parameters for Process0
functions:
Fg_setParameterWithType(fg, ..., ..., ...)
andFg_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.
-
Create the display(s)
function
CreateDisplay()
-
Start acquisition at applet and camera for each present port:
function:
Fg_AcquireEx(fg, 0, nrOfCycles, ...,...)
; -
Grab images:
function:
Fg_getLastPicNumberBlockingEx(fg, ..., ..., ..., ...)
; -
Stop acquisition
Function
Fg_stopAcquireEx(fg, .., .., ...)
-
Close the display
function
CloseDisplay(...);
-
Release the memory for buffer(s)
function
Fg_FreeMemEx(fg, ..);
-
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.