PYTHON 2.7 PROCESSES HANGING AT OPENCV 3.0 FUNCTION

asked 2016-06-12 04:48:03 -0600

Dear All,

I've been using a Python/OpenCV/Raspberry Pi 3 and a Pi Camera to recognise hundreds of white squares in each frame. In an attempt to get the frame rate a bit higher than 8 FPS I tried splitting the image and then Python multiprocessing and multiprocessing.Array ctypes to get all of the Pi 3's spare cores working on thresholding and contouring.

However each process appears to hang when it encounters the OpenCV Threshold function. The Pi window displays no diagnostic print messages I put after each OpenCV function. No error messages are displayed and the processor load continues at 18% (probably image capture program) until I stop Python with ctrl-Z. This is the first time I've come across a hang. The main code in the process worked ok previously in a Python function.

Does anyone have any suggestions or examples of working code (I tried queues first to send the image array to the processes but it was too slow - 200ms for 600k pixels).?.

Regards

Nick

edit retag flag offensive close merge delete