Webcam Camera Example



I’m unable to get a proper image out from the Camera in the nengo extras package.
Images appear to end up as a color gradient no matter which camera I end up using. I’m following the examples from the “Classifying Webcam Images” but have had no luck.

I am able to generate an image outside of nengo using OpenCV and gstreamer but not with using the Camera capability in nengo extras. Am I missing something to get a proper picture out from the Camera as a node?


If OpenCV is working for you, it should be fairly quick to wrap that in a Node you write yourself. Assuming your setup is something like this, then your Node would look like

cap = cv2.VideoCapture(0)
def camera_func(t):
    _, frame =
    return np.ravel(frame)
node = nengo.Node(camera_func)