Download Bi-i Vision System Programming Guide

Transcript
THE BI-I SDK
5.5.4.1. Bit-Wise Logic on Binary Images
The logical unit of the processor array is the only digital module in the ACE16k. This performs a bit-wise logical
operation on binary images, but the output image can be also an analog gray scale image, therefore the output
parameter is a reference of an object of a helper class, called TCImageOut which is a container for a specified
image memory ID. For all logic operations except 'not' the input images are always C_LLM1 and C_LLM2,
therefore these operations have no input parameters.
Example 5.27. Bit-wise logic operations with TACE
TACE ace;
//Logical XOR operation to a binary output image memory
ace.Logic(C_LLM2, ACE_LOG_XOR);
//Logical XOR operation to a gray scale output image memory
ace.Logic(C_LAM5, ACE_LOG_XOR);
//Not Operation from C_LLM1 to C_LLM2.
ace.Not(C_LLM2, C_LLM1);
5.5.4.2. Template Execution and TACEtransient class
The template execution (also known as transient evolution) is an analog operation in ACE16k. Te program for this
operation is the template. This program contains the weights for connecting the processor units and the internal
analog voltage references. The result is depends on the running time of the operation.
There are four basic modes of template execution:
Template execution modes (Mode parameter in the template structure)
1.
Template with feed back and without spatial variant offset. All elements of feedback matrix have effect: the
output values of neighboring processors are fed back to the input of middle processor unit with the specified
weights. In the control matrix, only the middle element has effect: the input values of the neighboring processors are not connected to the input of middle processor unit.
2.
Template with feed back and with spatial variant offset. This is same as the mode 1, however it has a spatial
variant offset with the weight of the bias element of the template.
3.
Template with feed forward and without spatial variant offset. In the feedback matrix, only the middle element
has effect: only the own output is fed back to the input. All elements of control matrix have effect: the input
values of neighboring processors are connected to the input of middle processor unit.
4.
Template with feed forward and with spatial variant offset. This is same as the mode 3, however it has a spatial
variant offset with the weight of the bias element of the template.
The control of template execution is performed by a helper class called TACEtransient. This class contains all
parameters that are needed for this operation, and stores the pointer to the corresponding TACE object. The Set()
member function sets base parameters of execution, but there are some parameters, which can be changed separately
(These are set by Set function to default). These functionality are used for more complex operations.
•
Boundary condition: Working mode of cells (processor units) on the bound of processor array.
•
Writing mask: Output analog memory writing mask.
•
Freezing mask: Evolution enabling mask.
•
Iteration: Number of transients in the operation.
The example below shows a continuous time template execution on a gray scale image with writing mask. It runs
for 2 microseconds and stops. This example is useful for gray scale operations such as sobel filter laplace, inversion,
etc.
61