![]() |
SCAMP-5c Vision System
1.0.0
An image sensor with a parallel processor on focal plane
|
Go to the source code of this file.
Data Structures | |
class | areg |
operand of this type can only be an analogue register More... | |
Functions | |
pe_rpix () | |
reset PIX (the photodiode) More... | |
pe_rpix (areg a1, areg a2) | |
read the image from PIX in to AREGs, and reset PIX More... | |
areg | pe_mov (areg a1) |
make a copy of an AREG More... | |
areg | pe_add (areg a1, areg a2) |
add two AREGs More... | |
areg | pe_sub (areg a1, areg a2) |
subtract two AREGs More... | |
areg | pe_neg (areg a1) |
invert the polarity of AREG and copy to another AREG More... | |
areg | pe_abs (areg a1) |
take the absolute value of an AREG and copy to another AREG More... | |
pe_div (areg a1, areg a2, areg a3) | |
divide (by half) an AREG into two AREGs More... | |
areg | pe_in (r_int v) |
set an analogue register for all pe with a value More... | |
areg | pe_north (areg a1) |
copy the AREG of the north neighbouring PE More... | |
areg | pe_east (areg a1) |
copy the AREG of the east neighbouring PE More... | |
areg | pe_west (areg a1) |
copy the AREG of the west neighbouring PE More... | |
areg | pe_south (areg a1) |
copy the AREG of the south neighbouring PE More... | |
pe_rpix | ( | ) |
reset PIX (the photodiode)
As this macro clears the light accumulated on the photodiode, it also marks the beginning of a new exposure period.
read the image from PIX in to AREGs, and reset PIX
a1 | stores the image using a range of [0,-127] |
a2 | stores the image using a range of [-127,-127] |
Both of the stored images have positive polarity, but they have different ranges.
For a1, the theoretical range is 0 to 127 from darkest to brightest.
For a2, the theoretical range is -127 to 127 from darkest to brightest.
Example Usage:
The first thing to do in a new frame is likely to be:
divide (by half) an AREG into two AREGs
a1 | the source AREG |
a2 | the first half of the result |
a3 | the second half of the result |
The copy step in this macro is free of offset error. Note, the two results may not be equal, a small mismatch error may still exist despite a compensation procedure being applied within this macro.
Example Usage:
The following line arithmetically achieves "B = A/2, C = A/2":
set an analogue register for all pe with a value
v | a value with a range of [-128,127] |
The value used is an signed 8-bit integer. Thus, value warp will occur when overflow or underflow happens. For example, "in(128)" is essentially "in(-128)" and "in(-129)" is "in(127)".
Example Usage:
Filling register A with 50:
Filling register A with a value read from a slider on the host:
copy the AREG of the east neighbouring PE
a1 | the target AREG of the east neighbouring PE |
copy the AREG of the west neighbouring PE
a1 | the target AREG of the west neighbouring PE |