Dynamsoft Panorama - API Reference
|
Public Member Functions | |
CPanoramaStitcher () | |
~CPanoramaStitcher () | |
Initialization Functions | |
int | InitLicense (const char *pLicense) |
int | InitLicenseFromServer (const char *pLicenseServer, const char *pLicenseKey) |
int | InitLicenseFromLicenseContent (const char *pLicenseKey, const char *pLicenseContent) |
int | OutputLicenseToStringPtr (char **content) |
void | FreeLicenseString (char **content) |
Stitching Functions | |
int | StartPanoramaStitchingByFile () |
int | StartPanoramaStitchingByBuffer (int iWidth, int iHeight, int iStride, DPS_ImagePixelFormat format) |
int | AppendNewFrameByFile (const char *pFileName) |
int | AppendNewFrameByBuffer (const unsigned char *pBuffer) |
void | WaitForFinishStitching () |
void | StopPanoramaStitching () |
Basic Setting Functions | |
int | GetRuntimeSettings (DPS_RuntimeSettings *pSettings) |
int | UpdateRuntimeSettings (DPS_RuntimeSettings *pSettings, char error[], int errorMsgBufferLen) |
Advanced Setting Functions | |
int | InitRuntimeSettingsWithString (const char *pJsonSetting, char error[], int errorMsgBufferLen) |
int | OutputSettingsToStringPtr (char **content) |
void | FreeSettingsString (char **content) |
Callback Functions | |
int | SetResultCallback (CB_PanoramaResult cbFunction, void *pUser) |
int | SetErrorCodeCallback (CB_PanoramaErrorCode cbFunction, void *pUser) |
Static Public Member Functions | |
General Functions | |
static const char * | GetErrorString (const int iErrorCode) |
static const char * | GetVersion () |
Protected Attributes | |
DM_Panorama * | m_pStitcher |
Result Functions | |
int | GetFinalResults (PanoramaResultArray **pResult) |
int | GetRunningState (RunningState *pRunningState) |
static void | FreePanoramaResults (PanoramaResultArray **pPresults) |
Defines a class that provides functions for working with image stitching and barcode data extracting.
CPanoramaStitcher::CPanoramaStitcher | ( | ) |
Default constructor
CPanoramaStitcher::~CPanoramaStitcher | ( | ) |
Destructor
int CPanoramaStitcher::AppendNewFrameByBuffer | ( | const unsigned char * | pBuffer | ) |
Appends a new frame image buffer from a file to the inner frame queue.
[in] | pBuffer | The array of bytes which contain the image data. |
int CPanoramaStitcher::AppendNewFrameByFile | ( | const char * | pFileName | ) |
Appends a new frame from a file to the inner frame queue.
[in] | pFileName | A string defining the file name. |
void CPanoramaStitcher::FreeLicenseString | ( | char ** | content | ) |
Frees memory allocated for the license string.
[in] | content | The output string which stores the content of license. |
|
static |
Frees memory allocated for stitched image and panorama result.
[in] | pPresults | The struct of Panorama result array. |
void CPanoramaStitcher::FreeSettingsString | ( | char ** | content | ) |
Frees memory allocated for runtime settings string.
[in] | content | The runtime settings string. |
|
static |
Returns the error info string.
[in] | iErrorCode | The error code. |
int CPanoramaStitcher::GetFinalResults | ( | PanoramaResultArray ** | pResult | ) |
Gets the image and barcodes results.
[in,out] | pResult | The output panorama result array. |
int CPanoramaStitcher::GetRunningState | ( | RunningState * | pRunningState | ) |
Gets running state of Panorama program.
[in,out] | pRunningState | The struct of running state. |
int CPanoramaStitcher::GetRuntimeSettings | ( | DPS_RuntimeSettings * | pSettings | ) |
Gets current settings and saves them into a struct.
[in,out] | pSettings | The struct of template settings. |
|
static |
Returns the version info of the SDK.
int CPanoramaStitcher::InitLicense | ( | const char * | pLicense | ) |
Reads product key and activates the SDK.
[in] | pLicense | The product keys. |
int CPanoramaStitcher::InitLicenseFromLicenseContent | ( | const char * | pLicenseKey, |
const char * | pLicenseContent | ||
) |
Initializes the license from the license content on the client-side for offline verification.
[in] | pLicenseKey | The license key. |
[in] | pLicenseContent | An encrypted string representing the license content (quota, expiration date, barcode type, etc.) obtained from the method OutputLicenseToStringPtr(). |
int CPanoramaStitcher::InitLicenseFromServer | ( | const char * | pLicenseServer, |
const char * | pLicenseKey | ||
) |
Initializes the license and connections to the specified server for online verification.
[in] | pLicenseServer | The URL of the license server. |
[in] | pLicenseKey | The license key. |
int CPanoramaStitcher::InitRuntimeSettingsWithString | ( | const char * | pJsonSetting, |
char | error[], | ||
int | errorMsgBufferLen | ||
) |
Initializes Panorama settings with the parameters obtained from a JSON string.
[in] | pJsonSetting | A JSON string that represents the content of the settings. |
[in,out] | error | The buffer is allocated by caller and the recommending length is 256. The error message will be copied to the buffer. |
[in] | errorMsgBufferLen | The length of allocated buffer. |
int CPanoramaStitcher::OutputLicenseToStringPtr | ( | char ** | content | ) |
Outputs the license content as an encrypted string from the license server to be used for offline license verification.
[in,out] | content | The output string which stores the content of license. |
int CPanoramaStitcher::OutputSettingsToStringPtr | ( | char ** | content | ) |
Outputs runtime settings to a string.
[in,out] | content | The output string which stores the contents of current settings. |
int CPanoramaStitcher::SetErrorCodeCallback | ( | CB_PanoramaErrorCode | cbFunction, |
void * | pUser | ||
) |
Sets callback function to process errors generated during image stitching.
[in] | cbFunction | Callback function. |
[in] | pUser | Customized arguments passed to your function. |
int CPanoramaStitcher::SetResultCallback | ( | CB_PanoramaResult | cbFunction, |
void * | pUser | ||
) |
Sets callback function to process panorama result, including stitched image and barcodes.
[in] | cbFunction | Callback function. |
[in] | pUser | Customized arguments passed to your function. |
int CPanoramaStitcher::StartPanoramaStitchingByBuffer | ( | int | iWidth, |
int | iHeight, | ||
int | iStride, | ||
DPS_ImagePixelFormat | format | ||
) |
Starts threads to manage images reading from buffer, this function should be used with AppendNewFrameByBuffer Function.
[in] | iWidth | The width of the frame image in pixels. |
[in] | iHeight | The height of the frame image in pixels. |
[in] | iStride | The stride (or scan width) of the frame image. |
[in] | format | The image pixel format used in the image byte array. |
int CPanoramaStitcher::StartPanoramaStitchingByFile | ( | ) |
Starts threads to manage images reading from file, this function should be used with AppendNewFrameByFile Function.
void CPanoramaStitcher::StopPanoramaStitching | ( | ) |
Stops stitching immediately, avoid stitching the remaining frames in the inner frame queue.
int CPanoramaStitcher::UpdateRuntimeSettings | ( | DPS_RuntimeSettings * | pSettings, |
char | error[], | ||
int | errorMsgBufferLen | ||
) |
Updates runtime settings with a given struct.
[in] | pSettings | The struct of template settings. |
[in,out] | error | The buffer is allocated by caller and the recommended length is 256.The error message will be copied to the buffer. |
[in] | errorMsgBufferLen | The length of the allocated buffer. |
void CPanoramaStitcher::WaitForFinishStitching | ( | ) |
Waits for finishing stitching all frames in the inner frame queue.
|
protected |
The internal panorama stitcher.