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.

How to implement an cascade classifier OpenCV in a hexadecimal array

Hello,

I am using TMDXLCDK6748, this a DSP board with a single core. I want to use this board in biometrics aplications.

To do that, I am going to start working with facedetect example which is in the C6SDK. This example uses OpenCV library, precompiled for DSP. Also, the example uses a OpenCV casacde classifier which is in a hexadecimal array saved in a .h

Normally the OpenCV classifiers are in .xml, but the example uses an OpenCV classifier saved in a hexadecimal array because this DSP board cannot read a .xml file.

I need to use another OpenCV cascade classifier, but every OpenCV classifier are saved in .xml. I need to convert this OpenCV classiffier in .xml file to an hexadecimal arrray saved in .h, to use it in my project.

I talked to TI technic (asktexas@ti.com) and he told me that I had to write the question in this forum. I tried to write the same question in other forum as TI-RTOS Forum and C67x Single Core DSP Forum. And they told that this is the right forum. Also I tried to find the solution checking in forums but nobody can answer it

So, the question is:

How can I convert the OpenCV classifier saved in .xml to a OpenCV classifier saved in an hexadeciomal array in a file .h?? I think I need to parse it but I do not know how to do it. Texas Instrument parsed the OpenCV classifier for faces in the example facedetect, How did you do it?

Thank you very much

Best Regards

  • Hi Javi,

    Your request is forwarded to TI team experts and it will be addressed as soon as possible.

    Thanks & regards,

    Sivaraj K

  • Hello Sivaraj K,

    Thank you for your answer.

    This question is very important for my project.

    I would greatly appreciate that you will answer me as soon as possible

    Best Regards

  • Hi Javi,

    I believe the classifier data can be read on the DSP in development environment (over JTAG) using standard C file IO operations (fopen, fread, fclose) and be read into a buffer. in a way that when you point the cvCalssifier struct to the buffer the fields would be interpretted apporpriately. Once you have this mechanism working correctly you can do a memory dump of the sata to a C buffer and write the data to a header file using fwrite.

    We are no longer supporting the OpenCV port on the C6748 DSP. You would essentially need to work with third party developers who can provide you this support. C6SDK is a legacy release for the C6748 device which included this demo as sample code.

    Regards,

    Rahul

  • Hello

    Thank you for your quick answer.

    But I think it is a little bit more complex, because the cvHaarClassifiercascade has pointer to others structs so if I want to go over the classifier I need to know how the struct is. I need to parse the .xml, you can not just open the file, read it and then close it.

    Someone, in the technical support team of highly qualified engineers within Texas Instruments, will know how to parse the .xml because this person did it.

    I understand that you are no longer supporting OpenCV on DPS C6748, but can you tell me some third party developers?

    Thank you very much

    Best Regards.

  • Any progress with this?

    Im stack on it too.

    Chaya

  • Hi, Javi

    I also looking for the solution same as you.

    I checked many thread  that you've posted but it doen't seemto be cleared.

    Did you find any clue?

    Best Regards.