Go to the first, previous, next, last section, table of contents, index.

Persistent Variables

The vision system uses several persistent variables. These variables are stored in a special place in memory which is not rewritten when the system is reset. In addition, they can be stored in the serial EEPROM on the vision board so they can survive power down (see section Setting and Storing Persistents). Many behaviors of the vision system and ARC can be modified through use of persistents.

Some of the persistents pertaining to vision processing are set as side effects of various commands. For example, the filter level and startup behavior can be changed using special TPUVIS commands. However, there are some less commonly adjusted, though interesting persistents which must be set by name using the following commands.

Listing All Persistents

From TPUVIS prompt mode
Type `P', then type `?' RET at the TPUVIS prompt. If you decide not to change anything at this time, hit RET to exit. See section Debugging and Miscellaneous Detail.
tpuvis [a]> P
Set which persistent? (? for list) ?
Persistents table:
          orient_subsamp = 0:
               baud_rate = 9600:
                    ...
              color_grow = 5:
Set which persistent? (? for list)      [hit RET]
tpuvis [a]>
From Saphira interaction mode
NOT AVAILABLE
From the ARC prompt
Use the ARC `persist' command.
arc> persist
          sony_sharpness = 127:
            serialb_baud = 9600:
                 boxsize = 20:
                .....
             frameborder = 5:

Examining a Particular Persistent

From TPUVIS prompt mode
Type `P', then type the name of the persistent followed by RET at the prompt. This brings up a prompt at which you could type a new value. Just hit RET again to leave the value the same. See section Debugging and Miscellaneous Detail.
tpuvis [a]> P
Set which persistent? (? for list) color_grow
New value for color_grow [currently 5]: 
From Saphira interaction mode
Send a PSOS packet containing P<name>. For example, to check the sensitivity of the edge detection, send `Pedge_thresh' in a PSOS packet (see section Saphira Packet Protocol). It will respond with a packet containing edge_thresh = 100. See section Saphira Mode Persistent Commands.
From the ARC prompt
Type `set persistent'.
arc> set color_grow
color_grow = 5

Setting and Storing Persistents

From TPUVIS prompt mode
Type `P' at the TPUVIS prompt, then type the name of the persistent followed by RET at the prompt. This brings up a prompt at which you can type a new value (followed by RET). See section Training and Configuring Channels Detail.
tpuvis [a]> P
Set which persistent? (? for list) color_grow
New value for color_grow [currently 5]: 10
From Saphira interaction mode
Send a PSOS packet containing the string `P<persistent name>=<value>'. For example, if you want to set the value of edge_thresh to 200, send `Pedge_thresh=200' in a packet. It will respond with edge_thresh = 200 (was 100). See section Miscellaneous Saphira mode commands.
From the ARC prompt
Type `set persistent value'.
arc> set color_grow 10
color_grow set to 10

To store the current values of all persistents to the serial EEPROM on the vision system, use the capital 'S' command. This works in either TPUVIS or Saphira interaction mode. Even without using this command, parameters will persist across resetting the system. However, persistent variables are not guaranteed to persist across power cycling the system unless saved to EEPROM.

This is true regardless of what mode the persistent was changed from. Therefore, while you can examine and modify persistents from the ARC prompt even if the vision software is not currently loaded, you can only save the parameters to the serial EEPROM when the vision software is loaded and running.

Important Persistents

Here are some important persistents. This is an incomplete list; see section Listing All Persistents, for information on getting a complete list of persistents (without documentation).

baud_rate (default 38400).
This controls the baud rate initially used for port A on system power-up. This is usually set as a side effect of the baud ARC command, or by a call to set_baud_rate() in the code. The Pioneer software will set this to 9600 every time the code is run (i.e., every reset and every time the program is run from the command line).
boxsize (default 20).
For each frame of incremental color training, a small box centered around the RGB value of the center of the tracked target is added to the training volume. The size of this box is set by the boxsize persistent value. The larger this size is, the greater the effect of each incremental training frame. See section Training the Vision System to See a Target Color, for more information.
color_grow (default 5).
This affects `<' and `>' color training commands. The value controls how much is removed from or added to the edges of the thresholding set each time one of these commands is issued. Setting this value is somewhat analogous to choosing what grit of sandpaper to use. Increasing this number makes each command have a larger effect, and decreasing this number makes each command have a smaller effect. See section Training the Vision System to See a Target Color, for more information.
diffthresh (default 5000).
This affects the lower case `s' color training command. The value specifies how different a color can be from the center color and still be considered to be part of the same object. Increase this value if the system is not classifying a large enough region as belonging to the training target. Decrease this value if the system is classifying too large a region as belonging to the object. See section Training the Vision System to See a Target Color, for more information.
orient_subsamp (default 0).
This determines whether subsampling is performed on the edge data for purposes of computing angular orientation and aspect ratio. Since angular orientation determination is a relatively costly procedure, you might need to subsample the data if you wish to maintain 60 Hz performance with large numbers of edges (i.e. blobs that fill the screen vertically). This parameter does not affect other calculations, such as calculations of centroid or area.

The options are:

serialb_baud (default 9600).
This controls the baud rate initially used for port B on system power-up. Since port B is implemented using the 68332's TPU, this port is unreliable at speeds over 9600 baud (see section Using the RS-232 Ports).
Sony Digitizer Settings
These values affect the way the Sony digitizer converts the analog NTSC video from the camera into digital RGB values. If set using the regular method of setting persistents, these values will not take effect until the next reset. Use the TPUVIS `A' command to set them with immediate effect. To see the effect of changing these values, look at frame grabs of a fixed scene before and after the change.
sony_apl (default 127, range 0 to 255).
This controls the amount of auto gain the Sony NTSC digitizer module will use. Decrease this number to make the Sony digitizer perform less autogain, and increase it to make it do more.
sony_hue (default 127, range 0 to 255).
This modifies the hue adjustment applied by the Sony NTSC digitizer. Changing this will affect how a given color phase in the NTSC video input is converted to RGB hue. Generally you should not change this value.
sony_saturation (default 127, range 0 to 255).
This modifies the saturation adjustment applied by the Sony NTSC digitizer. Changing this will affect how saturated the colors are when digigitized. At a value of 0, you get a grayscale image (this will not interact well with color thresholding). At a value of 255 colors are extremely saturated. High saturation is generally good for thresholding--however, if this is set too high, normally unsaturated colors such as browns and grays will show up as saturated colors (such as orange and blue) and interfere with tracking only the truly saturated colors. For this reason, we generally keep this setting at 127.
sony_sharpness (default 127, range 0 to 255).
This modifies the sharpness adjustment applied by the Sony NTSC digitizer. Changing this will affect how crisp or fuzzy the image appears.

Go to the first, previous, next, last section, table of contents, index.