Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
340 views
in Technique[技术] by (71.8m points)

python - Streaming a 64px heatmap onto a webpage

So I have been trying to figure out this one for a long time and I have no clue how to do this... So I have the thermal image sensor that I control with a Python script that can output an 8x8 array of values. These are raw values that I process as I want, it doesn't really matter.

The thing is that I would really love to stream them using Flask but I have no clue if this is possible. The stream of incoming arrays would be constant and so one solution that I though about is using p5.js as a heatmap plotter, but I actually have no idea on how I could make the javascript read the data that is directly coming from the python script. I thought about creating some JSON data, but this doesn't seem like the right solution as I would need to read and write the data at the same time from the file. I looked at using requests, but I'm unfortunately not at the level of expertise of solving this by myself.

I'm kind of new to the world of streaming, and I have found precious little information to use, so I'm turning towards you all in search of a solution. I thank you all in advance for your answers,

Jonas


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...