Download CogniSoft SDK Technical Manual

Transcript
1
1
2
3
4
5
6
7
8
9
Table of Contents
Table of Contents...................................................................................................................................................3
Introduction ...........................................................................................................................................................4
SDK Contents .........................................................................................................................................................5
3.1
Files and Folders...........................................................................................................................................5
Definitions .............................................................................................................................................................6
4.1
Vector byte array .........................................................................................................................................6
4.2
Length ..........................................................................................................................................................6
4.3
K ...................................................................................................................................................................6
4.4
Recognition Status code ...............................................................................................................................6
4.5
Neuron content byte array ..........................................................................................................................6
Initialization functions ...........................................................................................................................................7
5.1
int Version();.................................................................................................................................................7
5.2
int Connect(int DeviceID); ............................................................................................................................7
5.3
int Disconnect(); ...........................................................................................................................................7
Learning and Recognition functions ......................................................................................................................8
6.1
int Status = Broadcast(byte vector[], int length) ..........................................................................................8
6.2
int Learn(byte vector[], int length, int category)..........................................................................................8
6.3
int Recognize(byte vector[], int length, int K, int distance[], int category[], int Nid[]) ................................8
6.4
int CommittedNeurons(); .............................................................................................................................8
6.5
void ClearNeurons(); ....................................................................................................................................8
6.6
void ReadNeuron(int NeuronID, byte neuron[]); .........................................................................................9
6.7
int ReadNeurons(byte *neurons, int ncount); .............................................................................................9
6.8
int WriteNeurons(byte *neurons, int ncount); ............................................................................................9
6.9
int SaveNeurons(char *Filename); ...............................................................................................................9
6.10
int LoadNeurons(char *Filename); ...............................................................................................................9
Vector Batch Processing ......................................................................................................................................10
7.1
int LearnVectors(byte *vectors, int vectNbr, int vectLen, int *categories); ..............................................10
7.2
void RecognizeVectors(byte *vectors, int vectNbr, int vectLen, int K, int *distances, int *categories, int
*nids); 10
7.3
int MatchVectors(byte *vectorsRef, int vectRefNbr, byte *vectors, int vectNbr, int vectLen, int
maxDistance, int *indexPairs, int *matchDistances); ..............................................................................................11
Network Register Access Level ............................................................................................................................12
8.1
The CogniMem registers ............................................................................................................................12
8.2
int Write(byte module, byte reg, int data) .................................................................................................12
8.3
int Read(byte module, byte reg) ................................................................................................................12
8.4
int Readout(byte module, byte reg, int *data) ..........................................................................................12
8.5
int Write_Addr(int addr, int length_inByte, byte data[]) ...........................................................................12
8.6
int Read_Addr(int addr, int length_inByte, byte data[]) ............................................................................13
Cycle Accurate timings.........................................................................................................................................14
9.1
void EnableClockCounter() .........................................................................................................................14
9.2
void DisableClockCounter() ........................................................................................................................14
9.3
int ReadClockCounter() ..............................................................................................................................14
9.4
void ClearClockCounter() ...........................................................................................................................14
9.5
Example: .....................................................................................................................................................14
CogniPat Toolkit User’s Manual
3