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.

Accelerate the execution

Other Parts Discussed in Thread: CCSTUDIO

Hello,


We have tested many image processing functions of some libraries (Opencv, Imglib and Vlib) on our EVM platform DM6437, but we noticed that the exuction of these functions is very slow (with a delayed period of time). Whereas, we must have a real time execution of these functions.
So, can anybody give me some ideas ( what should I do to make the execution go faster).

  • some help...

    In fact, as an idea I want to check what's the current frequency of DM6437 because it can reach  700 Mhz . So, I will try who can I configurate the DSP to work in his maximum frequency. But I don't know if this could harm the EVM platform.

    Also, In  algorithms of image processing we oftent use "For loop" . So I don't know if it's possible to declare  variables declared in  "For loop" on a cache memory.

  • Hello, can you give example of functions that you are using and what is the performance you are observing? This will help us make a judgement on how far you are from expected performance.

    Have you enabled cache? Have you set the MAR bits?

     

    Regards,
    Gagan

  • We noticed that functions used from the Opencv library slow down the execution of our DM6437. For example  this is a code we have used to make some changement to the captured video frame:

       xx = cvCreateImage(cvSize(720, 576), 8 ,1);

       YUV422_to_IplImg(frameBuffPtr,xx); // display the video frame
        cvCircle(xx, cvPoint(350,350), 30, CV_RGB(255,255,255), 150, 180 ,0);
        blobsFinder(xx, NULL,NULL,NULL,m_List_Blobs);
        IplImg_to_YUV422(xx,frameBuffPtr,720, 576);

     

    As a notice: when we have used the cvCircle() and blobsFinder() functions the result is: the processed image was showed on TV after 7 seconds from the original image capture.

    This is the implemantation code of blobsFinder(). In fact this function takes a lot of time execution:

    void blobsFinder(IplImage* src,
                     IplImage* m_maskImg,
                     IplImage* m_FG,
                     AR_SSR_PARAM_CHANNEL_PRESET*    m_parameters,
                     SYNCHRO_DATA        m_List_Blobs[MAX_BLOBS])
    {
        /* --- be sure we have a valid buffer */
        IplImage* src_tmp;
        if( (src->width >0) &&
            (src->height >0) &&
            (src->nChannels == 1))
        {
            memset(m_List_Blobs,0,sizeof(m_List_Blobs));
            src_tmp = cvCloneImage(src);

            //load mask
            if(m_maskImg!=NULL)   
            {
                cvMin(m_maskImg,src,src_tmp);
            }

            ComputeBlobs(    src_tmp,
                                    NULL,
                                    m_List_Blobs,
                                    m_parameters->GeneralSettings.SSR_Seg_BGalpha,
                                    m_FG,
                                    m_parameters->GeneralSettings.SSR_Seg_Dilate,
                                    m_parameters->GeneralSettings.SSR_Seg_Erode);
                                   
            printf("%d\n",m_List_Blobs[0].x1);

            cvReleaseImage(&src_tmp);
           
        }
        return;
    }

    I want to know what are the appropriate solutions for a real time image processing.

     

    Regards,

  • Hi Hot snow, I am currently trying to run opencv functions on the DM6437 (EVM).

    From what I've understood you have succeed in runing opencv function on this embedded system. I am trying to compile such

    function with ccstudio (v3.3). I've included all the .h files and all the librairy needed but it seems that ccstudio doesn't reconize

    the included files that I've provided. I don't know if it requires more complex operations to run opencv functions with ccstudio.

    Have you encountered somme obstacle in running your functions ? (for the moment I don't focuse

    on the efficiency of these functions). Can you share your experience about that?

    Regards,

    Benjamin