Displaying images using opencv on a remote host on a local display?

I have a simple piece of code that uses openCV, and I want to run it on an ARM development board (freescale MX) that does not have a screen attached to it. I tried for several days to run the code on this remote device and display its graphical output on my local machine, without getting any luck ...

My setup:

  • Ubuntu 10.04 on my local machine
  • Linux 2.6 runs on the board, with all the relevant packages I could think of.
  • Ethernet connection to the local machine
  • openCV compiled statically with GTK enabled
  • using GDB / GDBServer for debugging using SSH

and everything works fine, only for openCV HIGHGUI display functions that are not affected.

Some notes:

  • I can install DISPLAY env var to point to my local machine, and I get gtk-demo / xterm / whatever-is-use-X will appear on my local machine, even when working with the same SSH session that I use to run and debugging my code.
  • I try not to get into GTK / QT and fix / prepare my own display shell. I got the feeling that I just needed a little modification of the GTK / HIGHGUI configuration to make this work ...

My code (which compiles and works fine, take it for lack of graphical output):

cv::Mat im = cv::imread("/root/capture.jpg"); //im is valid and not empty at this point cvNamedWindow( "test" ); cv::imshow( "test", im); cvWaitKey(); cvDestroyWindow( "test" ); 

Can anyone help?

thanks


Update:

solvable

When reading the post I just posted, I found out that I actually used getchar () instead of cvWaitKey (), which seems important ...

+4
source share

Source: https://habr.com/ru/post/1387946/


All Articles