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.

Run opencv application on DM814X

I have built opencv with "WITH_GTK" option On. When I run opencv examples on DM814X board, it gives below message and stop:

    (image:1611): Gtk-WARNING ** :cannot open display:

I did not see any window popup on LCD screen.

Any one know about this issue ? or provide the clue? 

Thanks,

qijie 

  • Hi Qijie,

    qijie said:

    I have built opencv with "WITH_GTK" option On. When I run opencv examples on DM814X board, it gives below message and stop:

        (image:1611): Gtk-WARNING ** :cannot open display:

    Are you using EZSDK 5.05.02.00? Can you provide the steps to reproduce the issue on DM8148 ?

    I can provide you the below links, hope will be in help:

    http://processors.wiki.ti.com/index.php/Building_OpenCV_for_ARM_Cortex-A8

    http://e2e.ti.com/support/dsp/davinci_digital_media_processors/f/716/t/192622.aspx

    http://e2e.ti.com/support/dsp/davinci_digital_media_processors/f/716/t/243204.aspx

    http://e2e.ti.com/support/dsp/davinci_digital_media_processors/f/716/t/155301.aspx

    Regards,
    Pavel

  • Hi Pavel,

    My System is ubuntu12.04 , installed

    1). arm-2009q1-203-arm-none-linux-gnueabi.bin

    2). ezsdk_dm814x-evm_5_05_02_00_setuplinux

    3) opencv source: opencv-2.4.7.tar.gz 

    My build steps: 

    1). run environment-setup

       source ~/ti-ezsdk_dm814x-evm_5_05_02_00//linux-devkit/environment-setup

     2). Create toolchain.cmake with these contents and stored under 'opencv-2.4.7/build' folder :

      set( CMAKE_SYSTEM_NAME Linux ) set( CMAKE_SYSTEM_PROCESSOR arm ) set( CMAKE_C_COMPILER arm-none-linux-gnueabi-gcc ) set( CMAKE_CXX_COMPILER arm-none-linux-gnueabi-g++ ) set( CMAKE_FIND_ROOT_PATH ~/targetfs )

     3). run cmake -DCMAKE_TOOLCHAIN_FILE=toolchain.cmake ..

    4). run ccmake . adjust settings, turn all WITH_XXXX options off except WITH_JPEG, WITH_PNG, WITH_GTK   on,

         turn on BUILD_EXAMPLES , keep other options default. ( turn on BUILD_EXAMPLES may cause some compiling error, fixed by changing source code )

    5). run make .  

    Test examples

    1). copy all examples from build/bin  to SDCard  /usr/cv ,   copy box.png and box_in_scene.png into SDCard /usr/cv .

        the content of box.png and box_in_scene.png is not important .

    2). boot up target board from SDcard,

    3). PC connect to target board through putty, serial connection (115200/8/n/1).

    4). enter command from putty :

    cd /usr/cv

    c-example-find_obj 

    you may see the warning from putty.

    =============================

    I also tried run opencv example after below command,

    /etc/init.d/pvr-init stop
    /etc/init.d/matrix-gui-e stop

    but I got same warning.  

    =============================

    the warning message should from gtk_init()

     May I know

    1). is there any thing I need do so that gtk can find out display device ?

    2). If it is need set DISPLAY environment variable ? if Yes , what is the value ?

     

    Thanks,

    qijie  

  • qijie said:
    2). If it is need set DISPLAY environment variable ? if Yes , what is the value ?

    Can you try with    export DISPLAY=0:0

    Refer to the below e2e thread for more info:

    http://e2e.ti.com/support/embedded/linux/f/354/t/118987.aspx

    Regards,
    Pavel