SCAMP-5c Vision System  1.0.0
An image sensor with a parallel processor on focal plane
Files
Host and Simulation Functions

Configuration of the simulation and the SCAMP-5 hosting environment. More...

Files

file  host_and_sim.h
 

Detailed Description

Configuration of the simulation and the SCAMP-5 hosting environment.

Introduction

In a SCAMP-5c source code, there are two sections: the host configuration section and the program. The host configuration section configures APRON to cooperate with the SCAMP-5c program. For example, setup a display window for each of the image readout in the program, or create sliders for user to input values to the system.

To make any changes in the config section effective, APRON need to be restarted if it is running. In contrast, when the program is recompiled with only changes in the program seciton, the APRON will automatically reprogram the new ICW file.

Example Usage

// Host Configuration Section
apron.config_begin
sim.pix_source_webcam()// use webcam as image source when in simulation
sim.use_error_model(2)// specify what level of error the simulation will use
host.template('scamp5c_host_template.txt')// specify host template file
host.firmware('ok_s5c_ipu.bit')// specify the bit file to use
host.set_frame_rate(50)// set frame trigger
slider_1 = host.add_slider('parameter a', 0, 255, 127)
slider_2 = host.add_slider('parameter b', 0, 255, 3)
window_1 = host.add_display('Captured')
window_2 = host.add_display('Processed')
apron.config_end
// SCAMP-5c Program Section
...
s0 = usb.slider(slider_1)// s0 will get the value of the slider named "parameter a"
s1 = usb.slider(slider_2)// s0 will get the value of the slider named "parameter b"
usb.aout(A,window_1)// this image will be shown in the window named "Captured"
usb.aout(B,window_2)// this image will be shown in the window named "Processed"
...