Is it possible, to take images from iDS camera and convert them to OpenCV recognizable format?
I have followed code for stream data over rtsp://
from iDS:
/* allocate image buffer */
char *pMemoryBuffer;
int nMemoryId;
nRet = is_AllocImageMem(hCam, rectAoi.s32Width, rectAoi.s32Height, 24, &pMemoryBuffer, &nMemoryId);
abortOnError(nRet, "Allocating image memory failed with error code: ");
/* set allocated image buffer active */
nRet = is_SetImageMem(hCam, pMemoryBuffer, nMemoryId);
abortOnError(nRet, "Setting image memory active failed with error code: ");
/* capture a single frame */
nRet = is_FreezeVideo(hCam, IS_WAIT);
/* Step 4: Submit frame data to the stream */
IS_STREAM_PAYLOAD_DATA data;
data.cbSizeOfStruct = sizeof(IS_STREAM_PAYLOAD_DATA);
data.pData = reinterpret_cast<unsigned char*>(pMemoryBuffer);
data.cbSizeOfData = rectAoi.s32Width * rectAoi.s32Height * 3;
data.idSession = sessionInfo.idSession;
data.idStream = streamInfo.idStream;
But I need to get OpenCV (IplImage/Mat) image directly, or image in any other known format.
OK, so it is possible to do it via File System: