Dynamsoft Panorama - API Reference
Functions
Stitching Functions

Functions

DPS_API int DPS_StartPanoramaStitchingByFile (void *hStitcher)
 
DPS_API int DPS_StartPanoramaStitchingByBuffer (void *hStitcher, int iWidth, int iHeight, int iStride, DPS_ImagePixelFormat format)
 
DPS_API int DPS_AppendNewFrameByFile (void *hStitcher, const char *pFileName, int isVistaImg)
 
DPS_API int DPS_AppendNewFrameByBuffer (void *hStitcher, const unsigned char *pBuffer, int isVistaImg)
 
DPS_API void DPS_WaitForFinishStitching (void *hStitcher)
 
DPS_API void DPS_StopPanoramaStitching (void *hStitcher)
 

Function Documentation

◆ DPS_AppendNewFrameByBuffer()

DPS_API int DPS_AppendNewFrameByBuffer ( void *  hStitcher,
const unsigned char *  pBuffer,
int  isVistaImg 
)

Appends a new frame image buffer from a file to the inner frame queue.

Parameters
[in]hStitcherHandle of the Panorama instance.
[in]pBufferThe array of bytes which contain the image data.
[in]isVistaImgA parameter defining whether is a image captured from long-distance or not.
Returns
Returns error code. Returns 0 if the function operates successfully. You can call DPS_GetErrorString() to get detailed error message.Possible returns are: DPS_OK; DPSERR_PANORAMA_NOT_STARTED; DPSERR_PANORAMA_STARTED_BY_FILE; DPSERR_NO_MEMORY; DPSERR_OVERLAP_MODE_STITCH_STOPED;
Code Snippet:
void* panorama = DPS_CreateInstance();
DPS_InitLicense(panorama, "t0260NwAAAHV***************");
int ret = DPS_StartPanoramaStitchingByBuffer(panorama, 1080, 1920, 3240, DPS_IPF_RGB_888);
DPS_AppendNewFrameByBuffer(panorama, pBuffer, 0);
Remarks:
DPS_StartPanoramaStitchingByBuffer() has to be successfully called before calling this method.
The size of the incoming images should be the same as the image size declared in DPS_StartPanoramaStitchingByBuffer().
See also
C Functions

◆ DPS_AppendNewFrameByFile()

DPS_API int DPS_AppendNewFrameByFile ( void *  hStitcher,
const char *  pFileName,
int  isVistaImg 
)

Appends a new frame from a file to the inner frame queue.

Parameters
[in]hStitcherHandle of the Panorama instance.
[in]pFileNameA string defining the file name.
[in]isVistaImgA parameter defining whether is a image captured from long-distance or not.
Returns
Returns error code. Returns 0 if the function operates successfully. You can call DPS_GetErrorString() to get detailed error message.Possible returns are: DPS_OK; DPSERR_PANORAMA_NOT_STARTED; DPSERR_PANORAMA_STARTED_BY_BUFFER; DPSERR_NO_MEMORY; DPSERR_OVERLAP_MODE_STITCH_STOPED;
Code Snippet:
void* panorama = DPS_CreateInstance();
DPS_InitLicense(panorama, "t0260NwAAAHV***************");
DPS_AppendNewFrameByFile(panorama, "C:\\Users\\*****\\1.jpg", 0);
Remarks:
DPS_StartPanoramaStitchingByFile() has to be successfully called before calling this method.
The size of the incoming images should be the same.
See also
C Functions

◆ DPS_StartPanoramaStitchingByBuffer()

DPS_API int DPS_StartPanoramaStitchingByBuffer ( void *  hStitcher,
int  iWidth,
int  iHeight,
int  iStride,
DPS_ImagePixelFormat  format 
)

Starts threads to manage images reading from buffer.

Parameters
[in]hStitcherHandle of the Panorama instance.
[in]iWidthThe width of the frame image in pixels.
[in]iHeightThe height of the frame image in pixels.
[in]iStrideThe stride (or scan width) of the frame image.
[in]formatThe image pixel format used in the image byte array.
Returns
Returns error code. Returns 0 if the function operates successfully. You can call DPS_GetErrorString() to get detailed error message.Possible returns are: DPS_OK; DPSERR_PANORAMA_ALREADY_STARTED;
Code Snippet:
void* panorama = DPS_CreateInstance();
DPS_InitLicense(panorama, "t0260NwAAAHV***************");
int ret = DPS_StartPanoramaStitchingByBuffer(panorama, 1080, 1920, 3240, DPS_IPF_RGB_888);
DPS_AppendNewFrameByBuffer(panorama, pBuffer, 0);
See also
C Functions

◆ DPS_StartPanoramaStitchingByFile()

DPS_API int DPS_StartPanoramaStitchingByFile ( void *  hStitcher)

Starts threads to manage images reading from file.

Parameters
[in]hStitcherHandle of the Panorama instance.
Returns
Returns error code. Returns 0 if the function operates successfully. You can call DPS_GetErrorString() to get detailed error message.Possible returns are: DPS_OK; DPSERR_PANORAMA_ALREADY_STARTED;
Code Snippet:
void* panorama = DPS_CreateInstance();
DPS_InitLicense(panorama, "t0260NwAAAHV***************");
DPS_AppendNewFrameByFile(panorama, "C:\\Users\\*****\\1.jpg", 0);
See also
C Functions

◆ DPS_StopPanoramaStitching()

DPS_API void DPS_StopPanoramaStitching ( void *  hStitcher)

Stops stitching immediately, will not stitch the remaining frames in the inner frame queue.

Parameters
[in]hStitcherHandle of the Panorama instance.
Code Snippet:
void* panorama = DPS_CreateInstance();
DPS_InitLicense(panorama, "t0260NwAAAHV***************");
int ret = DPS_StartPanoramaStitchingByBuffer(panorama, 1080, 1920, 3240, DPS_IPF_RGB_888);
DPS_AppendNewFrameByBuffer(panorama, pBuffer, 0);
See also
C Functions

◆ DPS_WaitForFinishStitching()

DPS_API void DPS_WaitForFinishStitching ( void *  hStitcher)

Waits for finish stitching all frames in the inner frame queue.

Parameters
[in]hStitcherHandle of the Panorama instance.
Code Snippet:
void* panorama = DPS_CreateInstance();
DPS_InitLicense(panorama, "t0260NwAAAHV***************");
int ret = DPS_StartPanoramaStitchingByBuffer(panorama, 1080, 1920, 3240, DPS_IPF_RGB_888);
DPS_AppendNewFrameByBuffer(panorama, pBuffer, 0);
See also
C Functions