JeVois Tutorials
1.22
JeVois Smart Embedded Machine Vision Tutorials
|
|
In this tutorial, we modify some existing sandbox machine vision module written in Python and already pre-installed on the standard JeVois microSD image. We do this by accessing the microSD inside JeVois live over the USB connection.
For this tutorial, you do not need to install any software (except for a video capture program, if you do not already have one): We will directly edit the Python code on the microSD card that is inside JeVois.
Here, we will focus on step-by-step instructions for how to make all of this work.
We need to send the command usbsd
to JeVois over a serial link to let it know that we want to export the microSD over USB. You can do that by first connecting to JeVois using a serial terminal and then typing this command. For example, use the Arduino IDE to connect, as done in Using the Arduino IDE (Integrated Development Environment) to talk to JeVois.
Here, since we only want to give that one command to JeVois, we can instead do:
Make sure your indentation is correct as Python is picky about that. The lines you paste in place of the old line 59 should be indented by the same amount as the lines immediatly above and below.
Here is the result (you need to show a blue object to JeVois, here we showed our favorite USB flash drive):
We now have something that is beginning to ressemble the basic color tracker of Tuning the color-based object tracker using a python graphical interface, in just a few lines of Python code.
As always, you can connect to JeVois using the serial-over-USB port and issue a setpar serlog USB
to see any error messages that might occur if your code has mistakes.
In addition, we have worked very hard to add a new feature that displays these errors directly in the video stream. For example, insert the line:
boo
say, at line 59. Then try to capture video from JeVois, you should see: