Yes, you would write a small python module that runs on jevois and simply:
- get the next image as a numpy array in your process() function
- in there, just loop over the pixels and issue a bunch of jevois.sendSerial() commands to send the values over the serial port
have a look here to get started:
http://jevois.org/tutorials/ProgrammerInvHello.html
in this code:
import libjevois as jevois
import cv2
import numpy as np
class Hello:
def process(self, inframe, outframe):
img = inframe.getCvBGR()
outframe.sendCv(img)
you would implement that looping over pixels and sending the serial messages using jevois.sendSerial() before the last sendCv() line.
examples of jevois.sendSerial() are here: http://jevois.org/tutorials/ProgrammerInvSerial.html
Note that at this point you would still be streaming video. Once this works in the inventor, you would convert your code to headless by implementing a processNoUSB() function with essentially the same code as in process() except no sendCv() line at the end. See http://jevois.org/tutorials/UserHeadless.html for more info about headless mode.