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 severe problems with connected components module



As I couldn't find any appropriate forum for this issue, I'm trying my luck here.

I've been working with VLIB_createCCMap8Bit which isn't stable, to say the least. My images are aligned to the required x32 dimensions but it seems that I keep getting this error message from the function, once in several runs:

Creation of 8-bit Connected Components Map failed!!! status = 5

* after that, the system becomes completely unstable. 

It doesn't matter how I allocate the memory for the handle and the buffer (cached, un-cached, static) nor the image size (from 64x64 to VGA 320x240).

The module is critical in our algorithm and we also noticed there's a bizarre stack corruption arsing from calling VLIB_getCCFeatures.

We simply can't understand why the functions allocate memory internally if we were asked by the document to supply "big enough" buffer.

Is there a person in TI that can answer questions about VLIB 2.2 - I'm asking as for the forums, there's little to none answers to people's questions... !?

We're working on IPNC (Appro kit) with DSP c674.

Regards,

Roei

  • Roei,

    There are no VLIB experts monitoring the BIOS forum.  I have moved this thread over to the device forum in hopes that it will get a response there.

  • The status message indicates that this is Memory allocation error. Internally the function tries to allocate memory for creation of an equivalence table. This memory is allocated from the scratch memory allocated in the VLIB_CCHandle. and the size of the table is a big as the max color value in the input frame. Could you specify the size of the scratch memory , heap size and the max color value that you have provided. It may be useful if you can create a small failing test case that we can analyze.

    Regards,

    Rahul

  • Hi Rahul, before I dwell into the gory details, let me re-emphasize that what troubled me the most was the module's inconsistency i.e. for the exact same scenario, it might fail / pass. The scratch memory you refer to is the one we allocated at the start, right? For that, I gave it even buffers 10 times bigger than VLIB_calcConnectedComponentsMaxBufferSize required.

    My largest image to label is QVGA (320x240). As you mention it requires memory for the equivalence list so I understand now what your implementation is derived from (I know that for this specific segmentation method, the pathological case is quite BAD). The note about max color - I don't see any API that refers to such a value. From my end, it's simply a binary image. We restrict the area to a minimum of 10, if that helps. Our system DSP heap is 10MB but I allocate the memory from the cached tiler memory (DDR2).

    Also, at this point, I would like to point, that the VLIB_harrisScore_7x7 function gets stuck if the image is of low luminance values and I have at least 2 images that can reproduce it easily (both are close to being a "black" image).

    Regards,

    Roei