Leaper Vision Toolkit
中文 / English 2.x
Public Member Functions | Properties
ILSample Interface Reference

This interface represents a sample instance, which usually contains an image and an optional region object. More...

Inheritance diagram for ILSample:
ILObject LSample

Public Member Functions

void Set (ILImage *img, ILRegion *sampleRegion)
 
- Public Member Functions inherited from ILObject
ILObjectCopy ()
 
LPVErrorCode Load (LString filename)
 
void Reset ()
 
LPVErrorCode Save (LString filename)
 
BOOL Valid ()
 

Properties

LString FolderPath [get]
 The folder path of the sample.
It's assigned when the sample is loaded in the database or from a specified file path, for the new created standalone sample, it's empty.
 
LString FullPath [get]
 The full path of the sample, which is the composition of FolderPath and Name.
 
ILImage Image [get]
 The image attached to the sample.
 
LString Name [get]
 The unique name of the sample, which is the formatted timestamp and also used as the serialized file name.
 
ILRegion Region [get]
 The region attached to the sample, could be null.
 

Detailed Description

This interface represents a sample instance, which usually contains an image and an optional region object.

The samples are usually organized and managed in the sample database LSampleDatabase. To use this interface, you should create a LSample object or fetch it from the database.

Example Code

Member Function Documentation

◆ Set()

void Set ( ILImage img,
ILRegion sampleRegion 
)

Create the sample with the specified image and region. If any region is passed in, the attached image is reduced to the region size. If the region is empty, then the whole image is added as the sample.

Parameters
[in]imgThe input image
[in]sampleRegionThe input region, could be null.