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.

PROCESSOR-SDK-TDAX: Method load error OpenCV Cascade Classifier

Part Number: PROCESSOR-SDK-TDAX

Hi,

we are trying to load .xml file using method load in cascade classifier. We use UC for canny detection openCV.  Inside cannyThreadFunc we put next code:

cv::CascadeClassifier face_cascade;

face_cascade.load("./cascades/stop.xml");

we put xml file on sd card in folder cascades. And the following error occurs:

[HOST ] 10.079424 s: ### XDC ASSERT - ERROR CALLBACK START ###
[HOST ] 10.079454 s:
[HOST ] 10.079485 s: E_spOutOfBounds: Task 0x89857490 stack error, SP = 0x8 986153c.
[HOST ] 10.079485 s:
[HOST ] 10.079485 s: ### XDC ASSERT - ERROR CALLBACK END ###
[HOST ] 10.079515 s:

Basically we don't know where to put xml file and why this error keeps occurring. Can you please help us?  

Thank you.

  • Hi,

    Can you please provide more details about the problem ? Which TI module you are trying to execute ? And what you are trying to achieve ?

    If I guess, it seems you are trying to load the Haar classifier data to do some object detection through C66x DSP VLIB APIs (VLIB_haarDetectObjectsSparse/VLIB_haarDetectObjectsDense).If it is the use case, then the format of cascaded classifier supported by openCv is different from the format expected by these APIs. Please refer the documentation of these APIs.

    Thanks

  • Hi,

    We are using VISIONSDK and usecase for opencv canny edge detection, we run it on A15, we are trying to detect some objects, for example: stop signs or faces using haar cascades.

    UseCase: chains_vipSingleCamOpenCVCanny

    Capture -> Alg_OpenCVCanny (A15) -> Display_Video
    GrpxSrc -> Display_Grpx

    We managed to read some random file from SD card. But problem is when we are trying to read .xml with method load() from CascadeClassfier in openCV.

    [HOST ] 11.444549 s:
    [HOST ] 11.444549 s: ### XDC ASSERT - ERROR CALLBACK START ###
    [HOST ] 11.444580 s:
    [HOST ] 11.444610 s: E_spOutOfBounds: Task 0x89b781b0 stack error, SP = 0x89b821ec.
    [HOST ] 11.444610 s:
    [HOST ] 11.444610 s: ### XDC ASSERT - ERROR CALLBACK END ###
    [HOST ] 11.444641 s:

    In previous post you can see code that we put inside cannyThreadFunc.

    Do you know how to resolve this problem. Is it problem with stack size? Can we increase stack size?

    Thank you.

  • openCV solution supports only compute functions and for file read/write or device operation related functions, you need to use actual drivers.