4

I set up PyCharm for remote debugging according to this tutorial on CodeProject http://www.codeproject.com/Tips/987276/Remote-Programming-of-RaspberryPi-using-PyCharm

I am now wondering if it is possible to execute a Python Script with the help of PyCharm on the RaspberryPI and receive the output in PyCharm. Specifically I want to do some image processing and display the image with the help of OpenCV. It would be great to get the image displayed on my Windows machine, not on the Pi.

Another usecase, I want to create some matplot figure, execute the script on the pi and show the Output back in PyCharm on my Windows machine.

Is this possiple?

Kind Regards

Maecky
  • 1,988
  • 2
  • 27
  • 41
  • what have you tried and where do you run into problems? If matplotlib is correctly loaded it will work without a screen. – deinonychusaur Jul 02 '15 at 16:42
  • thank for your comment, I am aware, that I can run matplotlib without screen and save the figures but I would like to execute the script on the Pi and when I call plt.show() the figure should pop up on the machine where PyCharm is running. Same with OpenCV... – Maecky Jul 02 '15 at 16:44
  • If pycharm uses ssh http://stackoverflow.com/questions/3453188/matplotlib-display-plot-on-a-remote-machine should be possible, but might not work on Windows – deinonychusaur Jul 02 '15 at 16:49
  • Thanks for the link, I got it working in putty. PyCharm uses ssh but it seems I can append the -X switch.... – Maecky Jul 04 '15 at 12:04

1 Answers1

5

You can do this using OpenCV Image Viewer Plugin. Debug you program using remote interpreter in Pycharm, stop at the breakpoint and choose "View as image".

https://plugins.jetbrains.com/plugin/14371-opencv-image-viewer

enter image description here

Disclaimer: I'm an author of this plugin

dragon7
  • 1,057
  • 9
  • 23