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.

Qusetion about “VLIB_Connected_Components_Labeling”

Hi,everyone.

I am using VLIB. The version is vlib_c66x_3_2_0_2.

My board is C6678.

I want to get the number of connected components of my image.

Now I encounter a problem about VLIB Connected_Components_Labeling.

The question:

When the resolution of my image was too high,such as 640*480,320*240, the number of connected components can't be got.

But when the resolution was 160*120,the number of connected components can be got.

Is that the problem of VLIB's version,or  is  there some problem in my code?

My code:

status=VLIB_packMask32(liantongdata, mask32packedtest,640*480);//打包



    VLIB_calcConnectedComponentsMaxBufferSize(ImageWidth, ImageHeigh,

                                              MINBLOBAREA,

                                              &maxBytesRequired);


    ccHandleSize    = VLIB_GetSizeOfCCHandle();

    handle      = (VLIB_CCHandle*)malloc(sizeof(int)*ccHandleSize);


    primaryBuff1    = (unsigned char*)malloc(sizeof(int)*maxBytesRequired);

    VLIB_initConnectedComponentsList(handle,

                    primaryBuff1,

                    maxBytesRequired);


    VLIB_createConnectedComponentsList(handle,

                    (Uint16)ImageWidth,

                    (Uint16)ImageHeigh,

                    (Uint32*)mask32packedtest,

                    MINBLOBAREA,

                    1);// 8联通1  4联通0

    // 提取区域特征

    // 区域个数

    VLIB_getNumCCs(handle, &numCC);

    // 区域位置与面积

    VLIB_getCCFeatures(handle,

            &tempBlob,

            1);