Leaper Vision Toolkit
中文 / English 2.x
Public Member Functions
ILIBService Interface Reference

This interface provide functionalities to connect to the IntelliBlink service. More...

Inheritance diagram for ILIBService:
LIBService

Public Member Functions

int ExecuteTaskSync (int taskId, ILImage *image, ILIBTaskResult **taskResult)
 
ILIBAlgoConfigGetAlgoConfig (int taskId, LString algoName)
 
LString GetErrMsg (int errCode)
 
int GetGlobalVariableValue (LString gvName, ILIBData **val)
 
ILIBTaskConfigGetTaskConfig (int taskId)
 
BOOL IsReady ()
 
int LoadGlobalAction (LString filename)
 
int LoadTask (LString filename, int *taskId)
 
int PrepareTask (int taskId)
 
int SetAlgoConfig (int taskId, LString algoName, ILIBAlgoConfig *algoConfig)
 
int SetGlobalVariableValue (LString gvName, ILIBData *val)
 
int SetTaskConfig (int taskId, ILIBTaskConfig *taskConfig)
 
void SetUp (LString ibPath)
 
void TearDown ()
 
int UnloadTask (int taskId)
 

Detailed Description

This interface provide functionalities to connect to the IntelliBlink service.

IntelliBlink is a lightweight intelligent machine vision platform powered by Leaper Vision. You can use its WYSIWYG user interface to develop various optical location and measurement tasks via drag-and-drop operations, and benefits from its powerful algorithm toolkits: Location, Counting, Presence, Math & Logic, Image Filter, Geometry, Calibration, Identification, Classification, etc.

The LPV IB service module helps you to make use of the flexible and scalable IntelliBlink tasks, to integrate, execute and manipulate them in a LPV application.

To use this interface, you should create a LIBService object.

Example Code

Note: This interface is currently not available on Linux / MacOS platform.

Member Function Documentation

◆ ExecuteTaskSync()

int ExecuteTaskSync ( int  taskId,
ILImage image,
ILIBTaskResult **  taskResult 
)

Execute the IntelliBlink task synchronously based on the given image.

Parameters
[in]taskIdThe unique task ID.
[in]imageThe input image.
[out]taskResultOutput the task results.
Return values
errCodeReturn the error code if anything is wrong, you may check the error code lookup table, return LPVNoError if succeed.

◆ GetAlgoConfig()

ILIBAlgoConfig* GetAlgoConfig ( int  taskId,
LString  algoName 
)

Get the algorithm configuration with the given task ID and algorithm name.
It is a convenient function for you to get to the algorithm of interest directly.
Return null if failed to find the task with the specified ID or its algorithm with specified name.

Parameters
[in]taskIdThe unique task ID.
[in]algoNameThe unique name of the algorithm tool.
Return values
algoConfigReturn the algorithm configuration.
See also
SetAlgoConfig(), GetTaskConfig().

◆ GetErrMsg()

LString GetErrMsg ( int  errCode)

Get the error message with the given error code.

Parameters
[in]errCodeThe error code, returned by IB service functions.
Return values
errMsgReturn the error message.

◆ GetGlobalVariableValue()

int GetGlobalVariableValue ( LString  gvName,
ILIBData **  val 
)

Get the value of the global variable with the given name.

Parameters
[in]gvNameThe name of the global variable.
[out]valOutput the value of the designated global variable.
Return values
errCodeReturn the error code if anything is wrong, you may check the error code lookup table, return LPVNoError if succeed.
See also
SetGlobalVariableValue().

◆ GetTaskConfig()

ILIBTaskConfig* GetTaskConfig ( int  taskId)

Get the task configuration with the given task ID. Return null if failed to find the task with the specified ID.

Parameters
[in]taskIdThe unique task ID.
Return values
taskConfigReturn the task configuration.
See also
SetTaskConfig(), GetAlgoConfig().

◆ IsReady()

BOOL IsReady ( )

Check whether the service is ready.

Return values
valTrue for the service is ready, otherwise, return False.

◆ LoadGlobalAction()

int LoadGlobalAction ( LString  filename)

Load the global-action module from a specified file. The global action module setup the global variables which are usually used to transfer data between different tasks or execution instances.

Parameters
[in]filenameThe path of global-action model file.
Return values
errCodeReturn the error code if anything is wrong, you may check the error code lookup table, return LPVNoError if succeed.
See also
GetAlgoConfig(), SetTaskConfig().

◆ LoadTask()

int LoadTask ( LString  filename,
int *  taskId 
)

Load the IntelliBlink task from a specified file.

Parameters
[in]filenameFull path of the task file, it could be absolute or relative path with file name and extension.
[out]taskIdOutput the unique task ID.
Return values
errCodeReturn the error code if anything is wrong, you may check the error code lookup table, return LPVNoError if succeed.
See also
UnloadTask()

◆ PrepareTask()

int PrepareTask ( int  taskId)

Prepare the IntelliBlink task with the given ID.

Parameters
[in]taskIdThe unique task ID.
See also
LoadTask()

◆ SetAlgoConfig()

int SetAlgoConfig ( int  taskId,
LString  algoName,
ILIBAlgoConfig algoConfig 
)

Set the changed configuration to the algorithm with the given task ID and algorithm name.

Parameters
[in]taskIdThe unique task ID.
[in]algoNameThe unique name of the algorithm tool.
[in]algoConfigThe change configuration.
Return values
errCodeReturn the error code if anything is wrong, you may check the error code lookup table, return LPVNoError if succeed.
See also
GetAlgoConfig(), SetTaskConfig().

◆ SetGlobalVariableValue()

int SetGlobalVariableValue ( LString  gvName,
ILIBData val 
)

Set the value of the global variable with the given name.

Parameters
[in]gvNameThe name of the global variable.
[in]valThe value that be set to designated global variable.
Return values
errCodeReturn the error code if anything is wrong, you may check the error code lookup table, return LPVNoError if succeed.
See also
GetGlobalVariableValue().

◆ SetTaskConfig()

int SetTaskConfig ( int  taskId,
ILIBTaskConfig taskConfig 
)

Set the changed configuration to the task with the given task ID.

Parameters
[in]taskIdThe unique task ID.
[in]taskConfigThe change configuration.
Return values
errCodeReturn the error code if anything is wrong, you may check the error code lookup table, return LPVNoError if succeed.
See also
GetTaskConfig(), SetAlgoConfig().

◆ SetUp()

void SetUp ( LString  ibPath)

Set up the IntelliBlink service.
It should be called at the very beginning, before using any of the LPV IB objects.

Parameters
[in]ibPathThe root folder of the IntelliBlink application.
See also
TearDown().

◆ TearDown()

void TearDown ( )

Tear down the IntelliBlink service.
It should be called at the end after finish using any of the LPV IB objects.
It's Ok to omit the tear down step, we'll do it automatically when free the service object.

See also
SetUp().

◆ UnloadTask()

int UnloadTask ( int  taskId)

Unload the IntelliBlink task with the given ID.

Parameters
[in]taskIdThe unique task ID.
See also
LoadTask()