JeVois  1.0
JeVois Smart Embedded Machine Vision Toolkit
Command-line interface user guide

Command-line interface overview

In addition to interacting with your JeVois camera through a video capture software, you can also use any of two available serial ports:

  • Hardware serial port through the 4-pin connector on the smart camera (see above).
  • Serial-over-USB port that appears to your host computer at the same time as the video camera appears on the serial bus.

To use the serial-over-usb port:

  • Linux: look for the port, for example, inspect messages displayed when you type dmesg in a Linux terminal after you have connected your JeVois smart camera. Allow at least 10 seconds for the smart camera to boot up and to be detected by your host computer. The output of the dmesg command should contain some messages about detection of your JeVois smart camera, both its video component and its serial port component:
[...]
[4768736.704777] usb 1-1.3: new high-speed USB device number 13 using xhci_hcd
[4768736.809464] usb 1-1.3: New USB device found, idVendor=1d6b, idProduct=0102
[4768736.809470] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[4768736.809473] usb 1-1.3: Product: JeVois-A33 Smart Camera
[4768736.809476] usb 1-1.3: Manufacturer: JeVois Inc
[4768736.847915] uvcvideo: Found UVC 1.00 device JeVois-A33 Smart Camera (1d6b:0102)
[4768736.849892] input: JeVois-A33 Smart Camera as /devices/pci0000:00/0000:00:1c.6/0000:09:00.0/usb1/1-1/1-1.3/1-1.3:1.0/input/input29
[4768736.851499] cdc_acm 1-1.3:1.2: ttyACM0: USB ACM device

The JeVois smart camera was detected as a UVC (USB Video Class) device and a corresponding video device entry was created in /devices/pci... which typically would then also be aliased to /dev/video0 for easier access.

In addition, the serial-over-USB port of the JeVois camera was detected as a CDC-ACM serial port, and was assigned device name ttyACM0 in this example.

Usually the serial-over-USB port is initalized at /dev/ttyACM0 on your host computer. Start a terminal program. Default configuration is 115200 8N1. For example:

sudo screen /dev/ttyACM0 115200

You can also use minicom or other serial communication software.

Note
Many Linux distributions, including Ubuntu, monitor the connection of modems, so that they can be detected in a plug-and-play manner. Because the JeVois serial-over-USB port looks to a host computer like a new modem (this is so that no driver is required), your host computer may try to send modem configuration commands to JeVois as you connect it. JeVois will safely ignore these commands, but it may take a few minutes for your host computer to give up on trying to initialize JeVois as a modem that can dial out over telephone lines. While your host computer is trying to configure JeVois as a modem, the commands it sends will interfere with any commands you may type. To avoid this and to allow you to use the serial-over-USB port as soon as it is detected by your host, turn off the modem manager feature of your Linux host. For example, on Ubuntu:
sudo killall ModemManager
  • Windows: start Hyperterminal or similar (e.g., Tera Term, serial monitor feature of the Arduino software), select the serial device, and open it with 115200 8N1.
  • Mac: Either use screen as for Linux, but with device name /dev/tty.usbmodemXXXX (where XXXX will vary depending on your computer), or other serial software like ZTerm.
Note
Note that by default, command echo is turned off, which means that you will not see what you type. This is to avoid sending back to an Arduino all the commands it might want to send to the JeVois camera. Most serial communication software have an option to "turn on local echo" which will allow you to see what you type but will be handled by your serial terminal program as opposed to having JeVois send back all the characters you type.
Because the command-line interface is mainly intended for machine-to-machine communication, no editing capability is provided at this point. That means that if you type an incorrect character and try to delete it, both the incorrect character and the delete character will be sent to JeVois, and your command will just fail. If you have a tendency to make many typos as you type, just type your commands in any editor of your choice, and then simply copy and paste them into the JeVois command-line interface.

Once connected, you can use the command-line interface. Supported commands are as follows (further detailed in the following sections):

help - print help message
info - show system information including CPU speed, load and temperature
setpar <name> <value> - set a parameter value
getpar <name> - get a parameter value(s)
runscript <filename> - run script commands in specified file
setcam <ctrl> <val> - set camera control <ctrl> to value <val>
getcam <ctrl> - get value of camera control <ctrl>
listmappings - list all available video mappings
setmapping <num> - select video mapping <num>, only possible while not streaming to USB
ping - returns 'ALIVE'
serlog <string> - forward string to the serial port(s) specified by the serlog parameter
serout <string> - forward string to the serial port(s) specified by the serout parameter

General Options:
  --tracelevel (unsigned int) default=[0]
    Set the minimum trace level to display
       Exported By: engine

  --loglevel (jevois::manager::LogLevel) default=[info] List:[fatal|error|info|debug]
    Set the minimum log level to display
       Exported By: engine

Engine Options:
  --serout (jevois::engine::SerPort) default=[None] List:[None|All|Hard|USB]
    Send module serial messages to selected serial port(s)
       Exported By: engine

  --camreg (bool) default=[false]
    Enable raw access to camera registers through setcamreg and getcamreg
       Exported By: engine

  --cpumax (unsigned int) default=[1344] List:[120|240|312|408|480|504|600|648|720|816|912|1008|1044|1056|1080|1104|1116|1152|1200|1224|1248|1296|1344]
    CPU maximum frequency in MHz
       Exported By: engine

  --serlog (jevois::engine::SerPort) default=[None] List:[None|All|Hard|USB]
    Show log and debug messages on selected serial port(s)
       Exported By: engine

  --cpumode (jevois::engine::CPUmode) default=[Performance] List:[PowerSave|Conservative|OnDemand|Interactive|Performance]
    CPU frequency modulation mode
       Exported By: engine

AVAILABLE CAMERA CONTROLS:

- brightness [int] min=-3 max=3 step=1 def=0 curr=0
- contrast [int] min=0 max=6 step=1 def=3 curr=3
- saturation [int] min=0 max=4 step=1 def=2 curr=2
- autowb [bool] default=1 curr=0
- dowb [int] min=0 max=1 step=1 def=0 curr=1
- redbal [int] min=0 max=255 step=1 def=128 curr=125
- bluebal [int] min=0 max=255 step=1 def=128 curr=151
- autogain [bool] default=1 curr=1
- gain [int] min=16 max=1023 step=1 def=16 curr=58
- hflip [bool] default=0 curr=0
- vflip [bool] default=0 curr=0
- powerfreq [menu] values 0:disabled 1:50hz 2:60hz curr=2
- sharpness [int] min=0 max=32 step=1 def=6 curr=6
- autoexp [menu] values 0:auto 1:manual curr=0
- absexp [int] min=1 max=1000 step=1 def=1000 curr=500
- presetwb [menu] values 0:manual 1:auto 2:incandescent 3:fluorescent 4:fluorescent_h 5:horizon 6:daylight 7:flash 8:cloudy 9:shade curr=1

Additional parameters and additional commands may be available depending on which machine vision module is currently loaded. For example, the SaveVideo module allows two new commands, start (to start recording video to disk) and stop (to stop recording to disk). It also brings in a few new options which are specific to video encoding. When this module is loaded (by selecting the corresponding video resolution in your camera viewer software), typing help will show these new sections:

PARAMETERS:

Video Saving Options:  
  --fourcc (string) default=[MJPG] Regex:[^\w{4}$]
    FourCC of the codec to use. The OpenCV VideoWriter doc is unclear as to which codecs are supported. Presumably, the ffmpeg library is used inside OpenCV. Hence any video encoder supported by ffmpeg should work. Tested codecs include: MJPG, MP4V, AVC1. Make sure you also pick the right filename extension (e.g., .avi for MJPG, .mp4 for MP4V, etc)
       Exported By: SaveVideo

  --fps (double) default=[30]
    Video frames/sec as stored in the file and to be used during playback
       Exported By: SaveVideo

  --filename (string) default=[video%06d.avi]
    Name of the video file to write. If path is not absolute, /jevois/data/savevideo/ will be prepended to it. Name should contain a printf-like directive for one int argument, which will start at 0 and be incremented on each streamoff command.
       Exported By: SaveVideo

and

MODULE-SPECIFIC COMMANDS:

start - start saving video
stop - stop saving video and increment video file number

Command-line interface usage

Commands are case-sensitive and must be entered exactly as shown here. Because the command-line interface is mostly for use by machines (e.g., an Arduino) and to optimize speed, as mentioned above only very minimal forgiveness for typos and other deviations from the required command format are tolerated.

Serial communication types

JeVois distinguishes between two types of serial communications:

1) serlog: For log messages (error messages, notices to users, etc). Log messages are categorized into severity tiers, and always start with DBG (for debug level), INF (info level), ERR (error level), or FTL (fatal error level).

2) serout: For text-based outputs intended to be consumed by a machine (e.g., coordinates of an object detected by JeVois, to send to an Arduino).

The assignment of actual ports, such as hardware 4-pin connector vs serial-over-USB port, to serlog and serout is controlled by parameters, detailed below. The assignment is very flexible, for example, you can decide to send serlog messages to both the 4-pin hardware serial port and to the serial-over-USB port, or or to no port, or to just one port, etc while sending serout messages to the hardware 4-pin serial port only, or all ports, no ports, etc.

Command-line general behavior

When a command is received by the JeVois engine on a given serial port, it is executed and any output is sent back to that same serial port.

All successful commands end with a final line that says

OK

Failed commands issue some error message instead, which always starts with ERR, such as:

ERR Unsupported command

Many commands do not produce any additional outputs, and hence only return either a line that says OK or one that starts with ERR

Command-line end-of-line markers

The default end-of-line behavior for JeVois is "sloppy" which consists of:

  • on input (strings sent to JeVois), any of CR (0x0d or [\r]), LF (0x0a or [\n]), CRLF, 0xd0 (issued by some keyboards instead of Return), or 0x00 [\0] are accepted as valid end-of-line markers. Characters received up to the end-of-line marker and exclusive of it will be considered one command which will be parsed and executed.
  • for outputs (strings sent by JeVois), the JeVois camera issues CRLF end of line characters.

This is configurable upon startup of the JeVois smart camera. Please see the jevois::serial::linestyle parameter of jevois::Serial for details. Note, however, that this paremeter becomes hidden after JeVois has started. Hence, you can only change serial end-of-line behavior through the initscript.cfg script that is executed upon boot up of the JeVois smart camera. See initscript.cfg for details.

Command-line general commands and parameters

General commands always available irrespective of which vision module is loaded are described here.

help - print help message

Prints the help message. The help message is sent to the serial port that issued the help command only.

info - show system information including CPU speed, load and temperature

Shows some vital information about the JeVois smart camera:

INFO: JeVois 1.0
INFO: Linux version 3.4.39
INFO: CPU: 1344MHz, 32C, load: 1.02 1.01 0.86 1/50 83
INFO: MemTotal:         238452 kB, MemFree:          194292 kB
OK

setpar <name> <val> - set a parameter value

For example, the command

setpar cpumax 1200

returns

OK

and a subsequent command

info

would show the updated CPU frequency of 1200 MHz:

INFO: JeVois 1.0
INFO: Linux version 3.4.39
INFO: CPU: 1200MHz, 31C, load: 1.00 1.01 0.89 1/50 83
INFO: MemTotal:         238452 kB, MemFree:          194292 kB
OK

getpar <name> - get a parameter value(s)

The answer to this command consists of the parameter name followed by the current parameter value. For example, the command

getpar cpumax

returns (assuming the parameter has just been set to 1200 as above)

cpumax 1200
OK

runscript <filename> - run script commands in specified file

Runs a script, which is just a file that contains commands in exactly the same format as they would be typed interactively over the command-line interface. If the filename is not absolute (does not start with a / symbol), then the filename is assumed to be relative to the location of the currently-loaded vision module.

setcam <ctrl> <val> - set camera control <ctrl> to value <val>

Set a camera control. The help message gives a list of available camera controls and their permitted values. Beware that some controls are not effective in some modes, for example, you should turn autoexp (auto exposure control) off before you try setting a value to absexp (manual exposure value).

For example

setcam autogain 0
setcam gain 232

getcam <ctrl> - get value of camera control <ctrl>

For example, following the above setcam commands, issuing

getcam gain

would return

gain 232
OK

Note that sometimes the camera sensor hardware will modify values given through setcam, for example round them off, clip them, etc and getcam allows you to get back the value that was actually set into the sensor chip.

listmappings - list all available video mappings

Lists all the video mappings, which define the associations between a camera image size, frame rate, and pixel format, a USB output image size, frame rate, and pixel format, and which machine vision module to run. The definitions of mappings are in the videomappings.cfg file. The listmappings command allow you to obtain the numerical index of a given mapping in the list, shich you can later use with the setmapping command. For example:

listmappings

may return a list like (depending on the contents of videomappings.cfg)

AVAILABLE VIDEO MAPPINGS:

    0 - OUTPUT: NONE 0x0 @ 0fps CAMERA: YUYV 320x240 @ 60fps) MODULE: SaveVideo
    1 - OUTPUT: NONE 0x0 @ 0fps CAMERA: YUYV 320x240 @ 30fps) MODULE: RoadNavigation
    2 - OUTPUT: NONE 0x0 @ 0fps CAMERA: YUYV 320x240 @ 30fps) MODULE: SaveVideo
    3 - OUTPUT: NONE 0x0 @ 0fps CAMERA: YUYV 176x144 @ 120fps) MODULE: SaveVideo
    4 - OUTPUT: RGGB 640x480 @ 30fps CAMERA: RGGB 640x480 @ 30fps) MODULE: PassThrough
    5 - OUTPUT: RGGB 352x288 @ 60fps CAMERA: RGGB 352x288 @ 60fps) MODULE: PassThrough
    6 - OUTPUT: RGGB 176x144 @ 120fps CAMERA: RGGB 176x144 @ 120fps) MODULE: PassThrough
    7 - OUTPUT: MJPG 352x288 @ 60fps CAMERA: RGGB 352x288 @ 60fps) MODULE: Convert
    8 - OUTPUT: MJPG 320x240 @ 60fps CAMERA: RGBP 320x240 @ 60fps) MODULE: Convert
    9 - OUTPUT: MJPG 176x144 @ 120fps CAMERA: RGGB 176x144 @ 120fps) MODULE: Convert
   10 - OUTPUT: RGBP 320x240 @ 22fps CAMERA: YUYV 320x240 @ 22fps) MODULE: DemoGPU
   11 - OUTPUT: YUYV 960x240 @ 30fps CAMERA: YUYV 320x240 @ 30fps) MODULE: DemoNeon
   12 - OUTPUT: YUYV 640x312 @ 50fps CAMERA: YUYV 320x240 @ 50fps) MODULE: DemoSalGistFaceObj
   13 - OUTPUT: YUYV 640x300 @ 60fps CAMERA: YUYV 320x240 @ 60fps) MODULE: DemoSaliency
   14 - OUTPUT: YUYV 640x300 @ 10fps CAMERA: YUYV 320x240 @ 10fps) MODULE: BurnTest
   15 - OUTPUT: YUYV 352x288 @ 60fps CAMERA: YUYV 352x288 @ 60fps) MODULE: SaveVideo
   16 - OUTPUT: YUYV 320x288 @ 30fps CAMERA: YUYV 320x240 @ 30fps) MODULE: SaliencySURF
   17 - OUTPUT: YUYV 320x286 @ 30fps CAMERA: YUYV 320x240 @ 30fps) MODULE: DemoQRcode
   18 - OUTPUT: YUYV 320x260 @ 30fps CAMERA: YUYV 320x240 @ 30fps) MODULE: DemoArUco
   19 - OUTPUT: YUYV 320x256 @ 30fps CAMERA: YUYV 320x240 @ 30fps) MODULE: RoadNavigation
   20 - OUTPUT: YUYV 320x254 @ 60fps CAMERA: YUYV 320x240 @ 60fps) MODULE: ObjectTracker
   21 - OUTPUT: YUYV 320x252 @ 30fps CAMERA: YUYV 320x240 @ 30fps) MODULE: ObjectDetect
   22 - OUTPUT: YUYV 320x240 @ 60fps CAMERA: YUYV 320x240 @ 60fps) MODULE: SaveVideo
   23 - OUTPUT: YUYV 320x240 @ 30fps CAMERA: YUYV 320x240 @ 30fps) MODULE: SaveVideo
   24 - OUTPUT: YUYV 320x120 @ 30fps CAMERA: YUYV 160x120 @ 30fps) MODULE: DemoBackgroundSubtract
   25 - OUTPUT: YUYV 176x160 @ 120fps CAMERA: YUYV 176x144 @ 120fps) MODULE: RoadNavigation
   26 - OUTPUT: YUYV 176x144 @ 120fps CAMERA: YUYV 176x144 @ 120fps) MODULE: SaveVideo
   27 - OUTPUT: YUYV 160x120 @ 60fps CAMERA: YUYV 160x120 @ 60fps) MODULE: SaveVideo
   28 - OUTPUT: YUYV 88x72 @ 120fps CAMERA: YUYV 88x72 @ 120fps) MODULE: SaveVideo
   29 - OUTPUT: YUYV 64x192 @ 25fps CAMERA: YUYV 320x240 @ 25fps) MODULE: SalientRegions
   30 - OUTPUT: GREY 320x960 @ 45fps CAMERA: YUYV 320x240 @ 45fps) MODULE: EdgeDetectionX4
   31 - OUTPUT: GREY 320x240 @ 59fps CAMERA: YUYV 320x240 @ 59fps) MODULE: EdgeDetection
   32 - OUTPUT: GREY 320x240 @ 30fps CAMERA: YUYV 320x240 @ 30fps) MODULE: SuperPixelSeg
   33 - OUTPUT: GREY 176x288 @ 100fps CAMERA: YUYV 176x144 @ 100fps) MODULE: OpticalFlow
   34 - OUTPUT: GREY 176x144 @ 120fps CAMERA: YUYV 176x144 @ 120fps) MODULE: DemoEyeTracker
   35 - OUTPUT: GREY 176x144 @ 119fps CAMERA: YUYV 176x144 @ 119fps) MODULE: EdgeDetection
   36 - OUTPUT: GREY 160x495 @ 60fps CAMERA: YUYV 160x120 @ 60fps) MODULE: DemoCPUGPU
   37 - OUTPUT: GREY 128x117 @ 5fps CAMERA: YUYV 160x120 @ 5fps) MODULE: DenseSift
   38 - OUTPUT: GREY 120x25 @ 60fps CAMERA: YUYV 320x240 @ 60fps) MODULE: SaliencyGist
OK

See the section on videomappings.cfg for more information about video mappings.

setmapping <num> - select video mapping <num>, only possible while not streaming to USB

Usually, video mappings are selected by the host computer, by selecting a given output resolution, frame rate, and pixel format. In some instances, however, setmapping is useful:

  1. If the current mapping has a USB output pixel format of NONE, i.e., there currently is no video being streamed over USB.
  2. If the host is currently not streaming from the JeVois camera and one (or an Arduino) wants to select a particular mapping (typically, this is useful to select a mapping with NONE usb output, as mappings with streaming video over USB will be selected when one starts a video camera software on th ehost computer anyway).

Example:

setmapping 0

will return

OK

if the host computer is not currently streaming video from JeVois over USB, and the mapping will then be changed to 0. But if video is streaming to the host computer, the answer will be:

ERR Command error [setmapping 0]: Cannot set mapping while streaming: Stop your webcam program on the host computer first.

Simply close your camera capture software on th ehost computer and try again.

Note
For mappings that stream output video over USB, the host computer also determines when to start streaming (when you start your camera capture software on the host) and when to stop streaming (when you quit that program). However, for mappings where USB output is NONE, there is no camera capture software running on the host and hence one needs to instruct the JeVois camera to start or stop streaming (see streamon and streamoff commands below).
We do not automatically start sreaming when a mode with NONE USB output is selected because one may want to first do addtional configurations before streaming. For example, one may select a mode with the SaveVideo module that will save camera frames to disk, then set parameters of that module to select a given file name and video encoding format, and only then start streaming.

When a mode with USB output of type NONE is selected, two additional commands become available:

streamon - start camera video streaming

This command will only exist if the current video mapping has a USB output of type NONE.

streamoff - stop camera video streaming

This command will only exist if the current video mapping has a USB output of type NONE.

When using a mapping with USB output of type NONE, you must manually issue a streamoff command before you can issue your next setmapping command.

ping - returns 'ALIVE'

The purpose of this command is to check whether the JeVois smart camera has crashed, for example while testing a new machine vision module currently vbeing developed and debugged.

serlog <string> - forward string to the serial port(s) specified by the serlog parameter

This works in conjunction with the serlog parameter, which determines which serial port is used for log messages. The serlog command just forwards the given string to the serial port selected by the serlog parameter.

This is useful, for example, to allow an Arduino connected to the hardware serial port of JeVois to send debug messages that can be read by a human connected to the serial-over-USB port of JeVois.

For example, an Arduino connected to the hardware 4-pin connector of JeVois may issue over its serial port:

setpar serlog USB
serlog Arduino started
serlog Arduino compass calibrated

and a human (or another machine) connected to the JeVois camera using the serial-over-USB port would then see:

Arduino started
Arduino compass calibrated

Remember that log messages (e.g., error messages) issued by the JeVois camera itself are also sent to the port selected by the serlog parameter.

serout <string> - forward string to the serial port(s) specified by the serout parameter

This operates like the serlog command but uses the serial port selected by the serout parameter.

For example, to interactively debug some Arduino code, one may want to manually type the kinds of strings that a JeVois machine vision module would issue, to make sure that the Arduino always correctly interprets them. Assume that we are debugging the pan/tilt Arduino code provided with JeVois. One may want to try to issue a number of "T2D targetx targety" messages by hand to check that the pan/tilt camera moves in the correct way. With the Arduino connected to the 4-pin hardware serial port of JeVois, and a human interacting with JeVois through the serial-over-USB port, the human could type:

setpar serout Hard
serout T2D 0 0
serout T2D 1000 1000
serout T2D -1000 -1000
serout T2D &^%$@ try to crash arduino by using buggy T2D command

The "T2D x y" strings would then be forwarded to the Arduino, which should move the pan/tilt motors accordingly. With the last (ill-formatted) T2D command, the Arduino should correctly reject it and not move the motors.

Remember that module data output messages (e.g., coordinates of a detected target object) issued by the JeVois camera itself are also sent to the port selected by the serout parameter.

General parameters available on the command line

As mentioned above, different machine vision modules will add parameters (and possibly new commands) available to users over the command line. Here we describe the parameters that are exported by the Engine. Those are always available, regardless of which machine vision module is currently loaded:

loglevel (jevois::manager::LogLevel) default=[info] List:[fatal|error|info|debug] - Set the minimum log level to display

Log messages are issued by JeVois code using provided commands LDEBUG(), LINFO(), LERROR() and LFATAL(). The loglevel parameter allows a user to select at runtime the level of log verbosity. Messages at the selected level or more severe will be displayed. For example, when selecting a loglevel of info, LINFO(), LERROR() and LFATAL() messages will be displayed.

Note
As an optimization of speed, one can disable at compile-time the DEBUG level log messages, thereby avoiding wasting some CPU to test for the current value of loglevel and to then decide whether or not to issue a debug message. When JEVOIS_LDEBUG_ENABLE is turned off during compilation of JeVois those tests are bypassed at compile-time and all LDEBUG() commands are simply no-operations (they do nothing and do not use any CPU, as if they just had been removed).
Hence, the possible value debug will not appear as one of the possible loglevel values if JEVOIS_LDEBUG_ENABLE was off during compilation of JeVois.

tracelevel (unsigned int) default=[0] - Set the minimum trace level to display

Programmers may use the JEVOIS_TRACE() macro to issue debugging messages that will tell a user when a particular function is executed. JEVOIS_TRACE() will issue one message when the function starts, and another when it ends. This is useful to detect where a module under development might be locking up and should be fixed.

JEVOIS_TRACE takes one argument, which is an integer number called level. The tracelevel parameter can then be adjusted to only show trace messages that have a level below the current value of tracelevel. The higher the tracelevel, the more messages you will see. Programmers decide on which trace level to use in various functions.

Note
Because JEVOIS_TRACE() issues its trace messages using LDEBUG(), those will not appear unless JeVois was compiled with JEVOIS_LDEBUG_ENABLE turned on, which is not the case by default. The reason for this is to avoid wasting time doing tests for whether or not we should issue a debug message when running in production model. Likewise, JeVois must have been compiled with JEVOIS_TRACE_ENABLE turned on for trace messages to work.

serout (jevois::engine::SerPort) default=[None] List:[None|All|Hard|USB] - Send module serial messages to selected serial port(s)

The value of this parameter indicates to which serial port(s) messages of type serout will be sent.

See discussion of the serout command above.

serlog (jevois::engine::SerPort) default=[None] List:[None|All|Hard|USB] - Show log and debug messages on selected serial port(s)

The value of this parameter indicates to which serial port(s) messages of type serlog will be sent.

See discussion of the serlog command above.

cpumax (unsigned int) default=[1344] List:[120|240|312|408|480|504|600|648|720|816|912|1008|1044|1056|1080|1104|1116|1152|1200|1224|1248|1296|1344] - CPU maximum frequency in MHz

Allows a user (or Arduino) to set the maximum frequency at which the JeVois CPU will run. This may be useful in some situations to limit CPU speed, for example when powering JeVois from a battery that is running low.

cpumode (jevois::engine::CPUmode) default=[Performance] List:[PowerSave|Conservative|OnDemand|Interactive|Performance] - CPU frequency modulation mode

Allows users to select different schemes for hoe the JeVois CPU frequency may be adjusted on the fly during operation. This is also known as a frequency governor in the Linux community.

By default, the assumption is that a JeVois smart camera will always be processing video at its maximum possible speed. Hence, by default cpumode is set to Performance. Other modes will slow the CPU down when it is not heavily used, for example while the CPU is waiting for the next image from the camera.

Note
Generally speaking, unless you are using your JeVois camera in some extreme situation, we recommend keeping cpumode at its default setting of Performance, as this will provide the most reliable frame rates. Large fluctuations in frame rates may appear when using other modes.

camreg (bool) default=[false] - Enable raw access to camera registers through setcamreg and getcamreg

This command allows one to enable direct access to the low-level registers on the sensor chip of the JeVois smart camera. It is turned off by default. This is for low-level hackers only, who are trying to improve image quality by trying different settings of the low-level camera sensor registers.

Warning
It is very easy to crash your JeVois smart camera when you fiddle with the low-level registers. You have been warned. One wrong value and the whole smart camera goes down.

When parameter camreg is set to true, two new commands become available:

  • setcamreg <reg> <val> - set raw camera register <reg> to value <val>
  • getcamreg <reg> - get value of raw camera register <reg>

In both cases, reg and val are unsigned 8-bit values. For convenience, both decimal values and hexadeciman values (using a prefix 0x to indicate hexadecimal) are supported.

Command-line scripts

Sometimes, it is useful to set some parameters or execute some commands when a module is loaded.

JeVois allows you to store parameter settings and commands in a file named script.cfg stored in the directory of a module. The file script.cfg may contain any sequence of commands as you would type them interactively in the JeVois command-line interface.

Here is an example for the ObjectTracker module, which tracks objects based on their color. For this module, it is a good idea to set the JeVois camera sensor to full manual mode, as automatic gain, exposure, and white balance would otherwise affect the RGB pixel values of the same object under different viewpoints and locations with respect to the light sources. Since tracking in the ObjectTracker is based on the color values returned by the sensor, full manual camera mode gives more reliable tracking.

1 # Demo configuration script for ObjectTracker module.
2 
3 # Set camera to fixed color balance, gain, and exposure, so that we get more reliable colors than we would obtain under
4 # automatic mode:
5 setcam autowb false
6 setcam autogain false
7 setcam autoexp false
8 setcam redbal 110
9 setcam bluebal 170
10 setcam gain 16
11 setcam absexp 500
12 
13 # Detect a light blue flash drive by setting the appropriate value ranges for Hue, Saturation, and Value in the
14 # ObjectTracker module:
15 setpar hrange 95...110
16 setpar srange 100...255
17 setpar vrange 60...253

The script.cfg file for ObjectTracker is stored on your microSD at JEVOIS:/modules/JeVois/ObjectTracker/script.cfg