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.

video application not working with DaVinci EVM DM642

my video application of object detection and tracking (target related Simulink model) is running on the hardware but I'm not getting the blob tracking as rectangle (using draw rectangle block) on display. but the same model is working fine in Simulink. any suggestion...

  • Hi Arumugam,

    Welcome to E2E Forum.

    Are you using the same binary on both Simulink and target(i.e DM642).
    what is the procedure you are following to run binary on the target(through CCS or Flash Memory).

  • Hi,

    I'm using the same model (except for the target related blocks) for both Simulink and target. Also I'm using CCSv3.3 for building and loading the project on target. Matlab version is R2012b.

    Regards,

    Arumugam
  • Hi Arumugam,

    Thanks for the confirmation.


    I'm using the same model (except for the target related blocks) for both Simulink and target.


    Sorry, I'm not getting that what is model, Is that any code are you meant ? Like CCS projects ?

    Also I'm not familiar with SIMULINK and MATLAB and all.


    Also I'm using CCSv3.3 for building and loading the project on target.


    Are you using any example code provided by TI, or your own code.

    Have you ran the gel file of DM642 when you load the program in CCSv3.3 ?

  • Hi Arvind,

    Let me brief what I'm trying to do. I have created a Simulink project of object detection and tracking in real time and generated C codes using Embedded coder and compiling and building the complete project in CCSv3.3 and downloading on target. the project what I have created in Simulink is working fine with objects properly detected (in real time by interfacing the in-built web cam on PC) but the generated C codes are not detecting the objects on hardware.
    I couldn't get you about running the gel file while loading the program in CCS. Building the project in Simulink does everything as mentioned below...
    ### Connecting to Code Composer Studio(tm) ...
    Target Preferences block specifies that the board named 'DM642 EVM XDS560 Emulator' will be used to run generated code.
    However, since only board named 'DM642 Device Cycle Accurate Simulator' is found in your system, that board will be used.

    ### Generating code into build folder: C:\Data\SAM\per\Msc\Embed_2011\Project\Code\Human_det8_demo5_ticcs
    Warning: Output port 2 of 'Human_det8_demo5/Video Subsystem/Object Detection/Merge blobs belonging to the same target'
    is not connected.
    Warning: Parameter precision loss occurred for 'scaleFactor'. The parameter's value cannot be represented exactly using
    the run-time data type. A small quantization error has occurred. To disable this warning or error, in the Configuration
    Parameters > Diagnostics > Data Validity pane, set the 'Detect precision loss' option in the Parameters group to
    'none'.
    Warning: Parameter precision loss occurred for 'Value'. The parameter's value cannot be represented exactly using the
    run-time data type. A small quantization error has occurred. To disable this warning or error, in the Configuration
    Parameters > Diagnostics > Data Validity pane, set the 'Detect precision loss' option in the Parameters group to
    'none'.
    Warning: Parameter precision loss occurred for 'Value'. The parameter's value cannot be represented exactly using the
    run-time data type. A small quantization error has occurred. To disable this warning or error, in the Configuration
    Parameters > Diagnostics > Data Validity pane, set the 'Detect precision loss' option in the Parameters group to
    'none'.
    Warning: Parameter precision loss occurred for 'Value'. The parameter's value cannot be represented exactly using the
    run-time data type. A small quantization error has occurred. To disable this warning or error, in the Configuration
    Parameters > Diagnostics > Data Validity pane, set the 'Detect precision loss' option in the Parameters group to
    'none'.
    Warning: Unable to determine a fixed step size based on the sample times in the model 'Human_det8_demo5', because the
    model does not have any discrete sample times. Picking a fixed step size of (0.2) based on simulation start and stop
    times. You can disable this diagnostic by explicitly specifying a fixed step size in the Solver pane of the
    Configuration Parameters dialog box, or setting the 'Automatic solver parameter selection' diagnostic to 'none' in the
    Solver group on the Diagnostics pane of the Configuration Parameters dialog box.
    ### Invoking Target Language Compiler on Human_det8_demo5.rtw
    ### Using System Target File: C:\Program Files\MATLAB\R2012b\toolbox\idelink\foundation\pjtgenerator\rtw\idelink_ert.tlc
    ### Loading TLC function libraries
    ......
    ### Initial pass through model to cache user defined code
    .....
    ### Caching model source code
    .............................................................
    ### Writing source file Human_det8_demo5.c
    ### Writing header file Human_det8_demo5_private.h
    .
    ### Writing header file Human_det8_demo5.h
    ### Writing header file Human_det8_demo5_types.h
    .
    ### Writing header file rtwtypes.h
    ### Writing header file rt_nonfinite.h
    .
    ### Writing source file rt_nonfinite.c
    ### Writing header file rtGetInf.h
    .
    ### Writing source file rtGetInf.c
    ### Writing header file rtGetNaN.h
    .
    ### Writing source file rtGetNaN.c
    ### Writing source file Human_det8_demo5_data.c
    .
    ### Writing source file Human_det8_demo5_main.c
    ### Writing header file Human_det8_demo5_main.h
    .
    ### Writing header file MW_c6xxx_csl.h
    ### Writing source file MW_c6xxx_csl.c
    .
    ### TLC code generation complete.
  • Hi Arvind,

    Also suggest the procedure to be followed in CCSv3.3 before downloading the program on target.

    Regards,

    Arumugam
  • Hi Arumugam,


    ### Connecting to Code Composer Studio(tm) ...
    Target Preferences block specifies that the board named 'DM642 EVM XDS560 Emulator' will be used to run generated code.
    However, since only board named 'DM642 Device Cycle Accurate Simulator' is found in your system, that board will be used.


    As per my understanding, I think you are not selecting the device properly.   

    First select your target device as "EVMDM642" after that select the correct emulatoras XDS560v2 if you have in the target configuration file.

    Please find the screen shot.

    Also attach of your screen shot to understand better.

    P.S. I'm using CCSv5.5

  • Hi Arvind,

    I'm sorry. Since I do not have the target right now in front of me and to show the code generation in matlab I had selected the target as simulator. But actual selection I'm doing as below...

    ### Connecting to Code Composer Studio(tm) ...
    Target Preferences block specifies that the board named 'DM642 EVM XDS560 Emulator' will be used to run generated code.
    However, since only board named 'DM642 EVM via XDS510-USB' is found in your system, that board will be used.

    with the above target I'm able to build and download the code on target, also I'm getting the video output on display connected to target but without object detection. This is where I'm stuck. what could be the problem...
  • Hi Arumugam,
    Sorry for asking again.
    Could you please share your screen shot of CCS ( including target configuration).
  • Hi Arvind,

    Please find attached the screen capture of Simulink model and CCS project. Here once again I have selected simulator as target because I do not have the hardware now. Also I have attached the screen capture of Simulink model and video viewer with object detection.

    Hope I have made my issue clear. please do not hesitate to write back for further clarifications if you need. I await your support for me to come out of this issue.

     

    Regards,

     

    Arumugam

     

     

  • Hi Arumugam,

    Apologize, We are not supporting MATLAB related queries on this Forum.

    For simulink related you can try at CCS Forum.
    e2e.ti.com/.../81

    I would be happy to help you in solving any problem/issue you will be facing in running your code on DM642.
  • Hi Arvind,

    My query is related to "generated code not working on DM642" only. I'm trying to draw a rectangle around the detected moving objects taking the 4 points (X,Y,width,height) of the object. But since the objects are moving, the points are very dynamic. How it needs to be handled in the code for DM642.

    Regards,
    Arumugam
  • Hi Arumugam,

    I've read all your replies.

    From that, I presume that you have hardware DM642 EVM board and you are trying to load & running the "object detection" code through "XDS560 USB emulator" but you are not able to identify the object though it is available whereas the same code worked with "Simulink" simulator.

    Right ?

    Since I don't have a experience on simulink sw but we have our TI DM642 EVM boards.

    Are you using the same .out which is generated by CCS on DM642 EVM hardware and Simulink ?

    If yes, try to debug the code and whether able to get the X,W etc co-ordinates of the object and able to draw rectangle ?
    Set some break points that you were expected to stop for debugging.
    I hope, it is better to debug (step over and step into) your object detection algorithm code at your end.