This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

VLIB 2.2

Hi,

I am using the Connected Components interface provided in the VLIB 2.2

I am testing a 352x225 Image and i am facing some problems allocating memory for the array pBuf.

To find the number of bytes recomanded i am doing the following:

VLIB_calcConnectedComponentsMaxBufferSize(width,height,minBlobArea,&maxBytesRequired);
bytesRecomanded=maxBytesRequired;

bytesrecomanded is 3311436 which seems to be huge.

Now if i try to allocate the memory dynamically this wouldnt work and i would get a NULL Pointer since the free memory space is smaller.

However, if i allocate the memory staticly, it works.

Can u please help me solve this problem and tell me if the function VLIB_calcConnectedComponentsMaxBufferSize is working correctly since the number of bytesrecomanded is huge.

Thanks a lot.

Best regards 

Omar