1) A streaming server script based on https://github.com/berak/opencv_smallfr ... g_serve.py that outputs a live camera feed to the web
2) A motion detection script, that detects movement from a camera
Only one of these scripts can access the NOIR camera board at once, so I need a way of passing/sharing each frame gathered to the other script.
They both grab the frame from the NOIR camera board using opencv2's
Code: Select all
rc,img = capture.read()
As the camera frame rate is substantial (24f/s), I don't think it's feasible to save the img (numpy array) to a file on a disc that they can both access; but I may be wrong!
I've been scratching my head and searching the net for examples on scripts that pass data, but alas i'm stuck.
How could I share a numpy array (approximately a megabyte of data) between two running python programs on the same Raspberry PI, and could someone kindly provide me some example code?