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.

Saving video frames in memory (DM6437)

Other Parts Discussed in Thread: CCSTUDIO

Hello,

I have an object detection algorithm which i am currently applying on dummy
frames. Now i want to apply it in real time. My DSP is DM6437. I am not sure,
how i can capture the frames and store it in a desired location. Can anybody
point me to a source or tutorial on how i can capture the frames with PAL input
and save them into DDR memory.

Thanks

  • I think the best example of this for the simplest operation (no multimedia framework) would be this wiki article. The example there captures frames, does some simple processing, and displays the processed frame, it is tested with NTSC but should be flexible enough to handle PAL as well. Taking this as a base you could put your detection algorithm in place of the processing function and have a simple loop through going fairly quickly.

    If you want to store frames elsewhere for a longer period of time you could also put in code to copy the frame to another location to save them to DDR if that is what you are looking to do.

  • Thank you very much for the quick reply.

    I was thinking may be i can copy the frame pointed by frameBuffPtr->frame.frameBufferPtr to a desired location (DDR).

    But, first i will start of with connecting the video sensor to the board.......

  • You certainly could, however first note that that frame buffer already is in DDR, and second that copying the frame buffers out of the driver's buffer pool to arbitrary locations in DDR will take up some significant bandwidth, so if you can operate your algorithm on the frame buffer that the driver is already using it will be much more efficient.

  • I would certainly will keep that in mind. My application demands the frames should be placed on shared memory, so that i can access these frames on Linux. I am currently running DSP/BIOS and Linux with the help of VirtualLogix virtualization.

  • I am not able to find "FVID_evmDM6437.h" in my DVSDK directory, where can i find it ?

  • I have one in C:\dvsdk_1_11_00_00\pspdrivers_1_10_00\packages\ti\sdo\pspdrivers\system\dm6437\bios\evmDM6437\video, there should be one in the same place or similar depending on the DVSDK version you have.

  • I dont have such header, in that path. I figured that, if i dont want to access the pixels i can skip this header file and corresponding code. Now, the code is building without any errors. I have connected my digital camera (Nikon coolpix s210) to the video in of the board. When i run the application, i didnt see any file transfer from the board (ethernet not blinking). Is there any way, i can check whether it is working or not.

  • mourya said:
    I dont have such header, in that path.

    What DVSDK version do you have? That header file should exist, if it is not in a particular DVSDK version I may have to change that example from the wiki, or at least note the issue.

    mourya said:
    I figured that, if i dont want to access the pixels i can skip this header file and corresponding code.

    I don't have that header file in front of me, but based on the file name and location, without it you probably would have had to cut out some key functions needed in the video capture and display process to build without it, in other words, I suspect without this header file or the equivalent from your DVSDK that you will be unable to capture/display video.

    mourya said:
    When i run the application, i didnt see any file transfer from the board (ethernet not blinking).

    Note that the video preview example from the wiki does not actually utilize Ethernet, it is only saving frames to the local DDR on the board temporarily for processing and than passing them out to the video output for display. If you wanted to utilize Ethernet for moving video off the board than this example would need a large amount of modification, or you would need to look at another more complex example like the DVSDK Demo.

  • What DVSDK version do you have? That header file should exist, if it is not in a particular DVSDK version I may have to change that example from the wiki, or at least note the issue.

    DVSDK v1.00.00.19

    I have video_preview example that came with the DVSDK, i think the example on the wiki is a modified version of this (additional code for accessing pixels).

     

  • mourya said:
    DVSDK v1.00.00.19

    This looks like a beta version, the oldest version of DM6437 DVSDK I still have installed is 1.01.00.15, my suggestion would be to migrate to a newer DVSDK, in particular the latest (1.11.00.00) if possible.

    The example from the wiki came out of 1.01.00.15, though I believe it still functions with 1.11.00.00. You can get newer versions of the DVSDK from www.ti.com/davinciregistration if you have registered your board, or from https://www-a.ti.com/downloads/sds_support/TargetContent/dvsdk/bios_dvsdk/index.html.

  • I have tried installing, the newer version og DVSDK (dvsdk_1_11_00_00) with already installed DSP/BIOS (bios_5_31_02). But, video_preview example didnt work for me. So, i tried installing the newer DSP/BIOS (bios_5_31_08). Now, when i tried to open the project, I am having this error

    CRegistryInfo::GetSABoisConfig() could not find ConfigSuffix

    Also, it is saying that the DSP/BIOS specified in CCStudio is different from the one pointed by environmental variable(i changed it to point newer DSP/BIOS). To change this setting in CCStudio, i gues i have to use component manager. But, to my surprise when i opened component manager it is blank, it is not showing any configurations...

    you have any idea, what went wrong ?

  • ok, i can give some advises...

     1 . you first should modify the "system environment variable",for example , BIOS_INSTALL_DIR

    2.set  the  new  DSP/BIOS of CCS,   OPEN CCS, click  HELP->ABOUT->component ,     Expand the Target Content (DSP/BIOS) folder to see a list of targets. For your target platform(ex.c64), expand the list to see the available DSP/BIOS versions. Put a checkmark next to the version of DSP/BIOS you want to use.

    you can see the  the docs of "DSP/BIOS 's setep" for more details

     

     

     

  • Thank you very much, it is working now. I am able to grab the frames now. Also, i am trying to merge this project into my source project so, that i can apply some image procesing algorithms. Is there any easy way to integrate this video preview project into my existing code

  • Moura,

    I searched the forum and you are the only one I can found who is running Linux on DM6437 via VirtualLogix tools.  Could you please provide some feedbacks on this?

    1. Where you got the VirtualLogix? Is it come with the EVM6437 kits?

    2. What is you impression on Linux running on DM6437? From porting effort, ease of development and maintenance point of view?

    I am thinking using Linux on DM6437 + Zilinx FPGA to implement some video application.  One of functions of DM6437 is to provide UI (such as touch screen), I guess this can only be done if Linux can be running on it.

    If you can shed a light based on your experience, it will be really helpful and I really appreciate any of your help,

    Regards,

    Shiping

     

  • 1) I got the virtualogix linux with the kit.

    2)  I am using linux to evaluate the virtualization in a DSP. Currently i am able to stream 25 frames per second on linux. I think it is good.

    3)  Virtualogix comes with documentation, so it is not big effort to install the linux. Linux comes with cross compiler, which is bit of a problem for me. It doesnt support dynamic linking so, i had to make some effort while compiling few applications. Otherwise it is pretty nice.

  • Mourya

    Thanks for the information and it actually sounds pretty good,

    Unfortunately, VirtualLogix will no longer support this product, and I have to find other solutions.

    Thanks a lot

    Shiping

     

  • @Shiping Li

    Yes you are right. after i got the demo cds they stopped the support for it. If you need it, may be i can send the zipped demo software.

     

    @Bernie Thompson

    i have a problem now with the frame grabbing example. I need to reduce the size of the heap as i am planning to use more memory for another function. I have reduced the buffer count from 6 to 3. But still i need to reduce the code furthur, can you point any changes i can made to reduce the memory size.

  • Mourya

    It will be very helpful if you can send the zip files, I really appreciate it.

    I Just do not know how big they are and how to find a method to send them.

    Thanks

    Shiping

  • actually it is quiet big 450 mb. May be i upload it to some server when i have time