So i was using PiCam to get video feed, but figured i could try to get the stream to C++ for processing.
Python code:
import time
import picamera
import picamera.array
import cv2
with picamera.PiCamera() as camera:
camera.start_preview()
time.sleep(2)
with picamera.array.PiRGBArray(camera) as stream:
camera.capture(stream, format='bgr')
# At this point the image is available as stream.array
image = stream.array
So, what to do in my .cpp file? I've been looking into boost::python, but their documentation sucks..
Any benefits to send numpy array instead of converting to Cv.Mat directly in the Python code and then call it from C++? Like this.
Any questions? All help appreciated!
Edit: Forgot to mention, have tried this without success. Found pyopencv_to() and pyopencv_from() now, but not sure how to use? Sorry, new to this. (Would have linked the pyopencv_ above, but not allowed to post more than two links.)