1

I have an real-time input of array, like below:

275 242 280 263 235 179 234 236 233 195 203 190 202... 

Approximately once a 10 ms. Every array is pixel's value of image. I want to make video stream from this data. How is it possible? Linux, python 3.4

I found some ways, but I'm not sure:

1) tkinter 2) matplotlib 3) opencv 4) scipy

Many thanks

weider
  • 93
  • 1
  • 7
  • 1
    Please edit your question to include what you have tried. – CLAbeel Nov 17 '16 at 14:40
  • http://stackoverflow.com/questions/2659312/how-do-i-convert-a-numpy-array-to-and-display-an-image – John Zwinck Nov 17 '16 at 14:41
  • What does "I want to make video stream from this data" mean? The data already seems to be a stream. Do you want to save it? (if so, in what format?) Do you want to display it (if so, where? In a brwoser, in a dedicated window etc?) Mind that Stackoverflow is a programming website, so you need to be more specific in your question and not ask questions like "What is the best way to achieve ___?" – ImportanceOfBeingErnest Nov 17 '16 at 15:22
  • Of course, sorry. I want to make some "window" via Tk (e.g). Which will be update each time after receiving data – weider Nov 17 '16 at 15:34
  • There is e.g. [this tutorial](http://www.pyimagesearch.com/2016/05/30/displaying-a-video-feed-with-opencv-and-tkinter/) about Tkinter and openCV and also [a question](http://stackoverflow.com/questions/17073227/display-an-opencv-video-in-tkinter-using-multiprocessing) on SO. If you already have the array, you can ignore the CV part and directly put the image to the `tk.Label`. Matplotlib may actually be too slow for 10 ms updates. Again: Mind my comment above and also the one from CGritton. – ImportanceOfBeingErnest Nov 17 '16 at 23:29

0 Answers0