Currently there is no documentation or help file available for the 'MemBrain Picture Driver'.

This short description shall provide some help for getting started. If you have additional 
questions or problems in using the Picture Driver then please contact me at thomas.jetter@membrain-nn.de
or via the MemBrain homepage http://www.membrain-nn.de

Most of the steps described below have only to be performed once as the Picture Driver stores
this information when being closed.

The Picture Driver does not need an installation. Just copy the MBPicDriver.exe to a separate
directory on your hard-disk and start it (e.g. using double-click).

It is important to mention that the driver is not able to run in the same directory as MemBrain!
This is, because  MemBrain as well as the Picture Driver store information about settings in 
files that partially have the same names but the contents are different. 


Here is how to use the driver for the first time.


1.) Start the Picture-Driver

2.) Adjust the Picture-Driver settings:
Click Button 'Configuration':
- Select 'Server Settings' to adjust the port at which the Picture Driver shall be accessible (Default: 2048). The field 'IP Address' 
  left empty.
- Check the box beneath 'Enable Remote Start/Stop of Sampling'
- Use the button 'Browse...' to select the picture file that shall be read in.
- Use the button 'Capture Rate...' to adjust the time in between two picture sample cycles.
- Adjust 'Resolution X' resp. 'Resolution Y': This determines the number of neurons in your input matrix you will get within MemBrain
  and thus also the format of your neuron-picture. Chose an aspect ratio close to that of your original picture. The Picture Driver
  will automatically stretch the read in picture to match the complete neuron input matrix.
- Origin X resp. Origin Y determine the position of the upper left neuron within MemBrain after the first import of the neurons from
  the driver. However, you can move the imported neuron picture later on in MemBrain. Best is to just leave these settings to defaults.
- The 'Pixel Distance' determines the distance between two pixels of your input matrix with respect to the neuron center points. Since 
  every neuron (i.e. 'pixel') that is generated by the driver has a width of 45, a value close to 45 for the 'Pixel Distance'would 
  theoretically result in the neurons being placed just beneath each other without gaps. However, depending on the zoom factor within
  MemBrain there may occur black lines in your input picture. This can be avoided by movong the neurons closer together. The default 
  value of 25 produces good results usually, so leave it as is, at least for your first steps.
  
3.) Check the Box beneath 'Show Last Captured Picture'.

4.) Click the Button 'Activate'. This might cause your Firewall software to alert and request if the MemBrain Picture Driver should
    be allowed to act as a server. You have to allow this.

All these steps have only to be performed once after the first start of the Picture Driver, unless to want to change some of the 
settings again. The one exception is the click on the button 'Activate'. However, with the corresponding checkbox you can also have
the driver being activated automatically after it is started.

5.) In MemBrain
- If you are running MemBrain and the Picture Driver on the same computer then you have to: Choose <Weblink><Server Settings> 
  and do one of the following: 
	- Disable the checkbox 'Allow Operation As Server'
	  or
	- Adjust MemBrain to use a port different from that of the Picture Driver. 
	
  The reason for that is that two servers can not listen for connection requests on one and the same port on the same computer system
  (i.e. IP-Address). However, for accessing the Picture-Driver MemBrain does not have to operate as server as the Picture Driver is the
  network server in this scenario. Nevertheless if you want to connect to this MemBrain instance from out other MemBrain instances 
  in parallel, too, you have to choose the second option.
    	  
- Choose <Weblink><External Neurons Manager>. The External Neuron Manager opens.

6.) Within the 'External Neurons Manager'
- If you are running the Picture driver on the same machine as MemBrain itself then choose LOCALHOST in the drop down field named 
  'Name of Host Connection'. 
- If you are running the Picture driver on another machine as MemBrain then you have to enter the IP-Address of that remote computer 
  here.
- Enter the port number assigned to the Picture Driver (see step 2. above)
- Click on button 'Request Neurons'. Answer to the following question with 'Yes'. This question only appears if you haven't activated
  MemBrain's Weblink already manually. If your Firewall software alerts, then allow again.
- Now you can see all neurons published by the Picture Driver in the selection list of the 'External Neuron Manger'. Click somewhere 
  into the selection list and press <Ctrl> + 'A' on your keyboard to select all entries. 
- Click button <Invoke>. You should receive a message now that all neurons have been invoked successfully. You can see them now in the 
  MemBrain drawing area. All of the invoked neurons are already selected.
- Close the 'External Neurons Manager'.

7.) In MemBrain
- Press <ENTER> on the keyboard in order to edit the properties of all the selected (newly invoked) neurons in parallel. If the 
  neurons are not selected anymore for some reason (e.g. you klicked into the drawing area) then select them first by pressing 
  <CTRL> + 'A' on your keyboard or by drawing a selection rectangle around them.

- Button 'Appearance': Deactivate the options 'Display Name' and 'Display Activation' and activate 'Is Pixel'. Confirm all windows with
  <OK>. Now it's a good time to save your net for the first time.
Note: The option 'Is Pixel' causes the neurons in MemBrain to be displayed completely rectangular (without rounded corners), without
a borderline and with the coloring ranging from black to white with the activation going from 0 to 1. Also the input and ooutput arrows
are suppressed when the neurons are not selected.

8.) 
- Click somewhere beneath the selected neurons. Now you will actually see nothing, as all pixels are black (activation 0) initially.


9.) Perform two 'Think Steps' in MemBrain. Now you can see the read in picture as Black & White neuron-bitmap in MemBrain.
    If you start the 'Auto Think' process of MemBrain you will see that the picture is read in by the driver repetitively and the
    data is transferred to MemBrain. You can replace the picture file read in by the driver while the driver is running. Thus, if
    you have a Webcam connected to your computer and if you have a software that stores the picture from the Webcam to the file
    read in by the driver you can get a new picture from the Webcam transmitted to MemBrain cyclically.

You can now connect the neurons as you do usually with any other input neuron. If you select <Weblink><Deactivate Weblink> then the
connection to the picture driver will be interrupted and MemBrain will take control over the 'pixel' neurons. I.e. you can treat the 
neurons as if they would have been added manually as normal input neurons. For example you can assign activations to the neurons 
using data from the Lesson Editor or you can teach the net with data from a lesson. Once you re-activate MemBrain's Weblink the
neurons will be automatically re-connected to the driver (if possible) and will receive their activation from the driver again instead
of receiving it from MemBrain.
If an extern neuron in MemBraun is not connected to its public counterpart for some reason, it will display the abbreviation 'NC' 
(for 'Not Connected') in its lower right corner.

Even if you can not assign an activation to an external neuron when it is connected to its public counterpart (which resides inside the 
Picture Driver for example) you can retrieve its current activation for storing it to a lesson for example. Using the Lesson Editor
you can capture input patterns while the neurons are connected to the picture driver:
In the Lesson-Editor click on <Names From Net> to synchronize the Lesson with the net. Then click on <New Pattern From Net> and the
current pattern will be added to the lesson no matter if the external neurons are connected to the picture driver or not.







Other important information:

It is important to mention the differnce between the buttons 'Activate' and 'Start' on the Picture Driver:

'Activate' activates the Weblink of the driver, i.e. MemBrain can access the neurons published by the driver. If you deactivate the 
driver again (button 'Deactivate') then all TCP/IP connections to the driver will be closed automatically. Thus, this functionality 
is equivalent to MemBrain's menu option <Weblink><Activate Weblink> resp. <Weblink><Deactivate Weblink>.

Clicking on the button 'Start' starts the continuous picture sampling process of the driver with the capture rate specified in the 
settings (see section2. above). When started then the picture driver updates the activations of the internally kept public pixel 
neurons with data from thr read in picture. 
If you have the checkbox 'Enable Remote Start/Stop of Sampling' enabled as described above, the driver will automatically start 
sampling the picture once MemBrain starts its 'Auto Think' process or sample the picture one time only everytime when MemBrain 
performs a 'Think Step'.
However, the process of sampling the picture and transmitting the 'pixel data' to MemBrain are not synchronized. I.e. it will take two 
'Think Steps' in MemBrain until the picture data will arrive in MemBrain: One to sample the picture while MemBrain will receive the 
'old' data from the driver and another one where MemBrain will receive the data sampled with the last 'Think Step'.


