I am using DM6437 ,CCS v3.3 & VLIB3_2_1_0.I am working on PAL (720x576)system.
i want to do connected component labeling and get the total number of connected blobs .i have written following module for it
VLIB_calcConnectedComponentsMaxBufferSize(720,576,500,&maxbytesRequired);
sizeOfCCHandle = VLIB_GetSizeOfCCHandle();
handle = (VLIB_CCHandle *) malloc(sizeOfCCHandle);
pBuf = (void *) malloc( maxbytesRequired);
VLIB_initConnectedComponentsList(handle, pBuf, maxbytesRequired);
VLIB_createConnectedComponentsList(handle, 720, 576, mask32packed,500,1); // mask32packed is output from statistical background subtraction
VLIB_getNumCCs(handle, &numCCs);
printf("%u\n",numCCs);
but it giving output always as
0
0
0
0
0
3200274090
3200274090
3200274090......... continuously giving 3200274090
variable declaration are as follows
int p,i;
uint8_t arr[414720];
int16_t runningMean[414720];
int16_t runningVar[414720];
uint32_t mask32packed[12960];
uint8_t maskImage[414720];
uint8_t out_data[51840];
int32_t maxbytesRequired;
VLIB_CCHandle *handle;
void *pBuf;
int32_t sizeOfCCHandle;
int32_t numCCs;
why this is happening?How would i get right number of connected components?
thanks.