Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
This method returns the duration of a training. It is the approximate time needed by Cortex to decide if a training is a success or a failure. See BCI for details.
The result is an object containing these fields:
The time should be 8 seconds, for both mental command and facial expression.
Name
Type
Required
Description
cortexToken
string
yes
A token returned by authorize.
detection
string
yes
Must be "mentalCommand" or "facialExpression".
session
string
yes
A session id returned by createSession.
Name
Type
Description
time
number
The approximate duration of a training, in second.
detection
string
The detection you set in the request.
This method returns the brain map of a profile. The brain map is a graphic representation of the mental command training of the user. It indicates which actions are most distinct from each other and from the neutral state as measured by how often the training data is misclassified. The better training you do, the more separated the coordinates will be.
Check out the usage in our BCI app.
You must set one of these 2 parameters: profile or session. Read this for details.
The result is an array of objects. Each object is represents a trained actions and contains these fields:
This method returns the training threshold of the mental command detection. It also returns the score of the last mental command training.
The training threshold provides an indication of minimum threshold that you should target for when training the action, and it changes according to number of total actions that you have currently activated. Any training score above the threshold is very likely to improve your profile. Any training significantly below the threshold is likely to reduce the quality of your profile.
Check out the usage in our app.
You must set one of these 2 parameters: profile or session. for details.
The result is an object containing these fields:
This method can get or set the threshold of a facial expression action for a specific profile.
Actions with a low threshold are less likely to be detected. Actions with a high threshold will be detected more often.
You must set one of these 2 parameters: profile or session. for details.
If the status is "get", then the result is a number
that is the current threshold of the action.
If the status is "set", then the result is a string
that is a success message.
This method is to get or set the active actions for the mental command detection.
If an action is inactive, then the mental command detection won't detect it anymore. Deactivate an action do not erase its trainings from the profile.
Check out and in our BCI app.
You must set one of these 2 parameters: profile or session. for details.
If the status is "get", then the result is an array of strings
that is the list of active actions.
If the status is "set", then the result is an object with these fields:
This method returns the list of the trained actions of a profile. For each action, you also see how many times the user trained this action.
You must set one of these 2 parameters: profile or session. for details.
If you set the session, then this method reads information from the profile that is currently loaded for the headset of this session.
If you set profile then this method reads information from the hard drive. The values you get can be different from reading from the session, especially if the profile was load, edited, and not saved yet.
The result is an object containing these fields:
The objects in trainedActions have 2 fields:
In this section, you will find some advanced BCI features. Please read the section first.
The methods in this section are to read and modify the attributes of a training profile. Changing these attributes affects the way the facial expression and mental command detections work. It can make an action easier to detect, or it can completely disable an action.
You can use to change the attributes of a profile and see how it affects the detections.
Most of the methods takes 2 optional parameters, a profile name and a session id.
You must set one of these 2 parameters, and omit the second parameter.
If you set the profile, then Cortex will read the attributes of a profile from the hard drive. You can only read the attributes, you cannot change them. The profile is read only.
If you set the session, then Cortex will read the attributes of a profile currently loaded in-memory. You can also change these attributes. The profile is in read-write mode. After you edited the attributes, you should to persist your changes.
If Cortex tells you that profile is a required parameter, then please set this parameter to an empty string.
There is a bug in Cortex 2.0.0. The parameter profile is required, even if you set the parameter session. So, to read/write attributes from a session, you should set the session to your session id and set profile to an empty string. Don't set it to null, don't omit it. This bug is fixed in Cortex version 2.1.0 and above.
Name
Type
Required
Description
cortexToken
string
yes
A token returned by authorize.
profile
string
no
A profile name.
session
string
no
A session id returned by createSession.
Name
Type
Description
action
string
The action name.
coordinates
array of 2 numbers
The (x, y) coordinates of this action in the brain map. x is in range [-1.0, 1.0] and y is in range [0.0, 1.0].
Name | Type | Required | Description |
cortexToken |
| yes |
profile |
| no | A profile name |
session |
| no |
Name | Type | Description |
currentThreshold |
| The threshold of the mental command detection. |
lastTrainingScore |
| The score of the last mental command training. |
Name | Type | Required | Description |
cortexToken |
| yes |
status |
| yes | Must be "get" or "set". |
action |
| yes | You get or set the threshold for this action. |
profile |
| no | A profile name. |
session |
| no |
value |
| no | If the status is "set", this parameter must be a number between 0 and 1000. This will be the new threshold of the action. |
Name | Type | Required | Description |
cortexToken |
| yes |
status |
| yes | Must be "set" or "get". |
profile |
| no | A profile name. |
session |
| no |
actions |
| no | If the status is "set", this parameter is the list of actions to activate. You can't activate more than 4 actions. This doesn't include "neutral". |
Name | Type | Description |
actions |
| The active actions. |
message |
| A success message. |
Name | Type | Required | Description |
cortexToken |
| yes |
detection |
| yes | Must be "mentalCommand" or "facialExpression". |
profile |
| no | The name of a profile. |
session |
| no |
Name | Type | Description |
trainedActions |
| Contains 1 object for each trained action. |
totalTimesTraining |
| The total number of training the user did since the creation of this profile. |
Name | Type | Description |
action |
| The name of the action. |
times |
| How many times the user trained this action. |
Name | Type | Required | Description |
profile |
| no | The name of a profile. |
session |
| no | A session id returned by . |
This method can get or set the signature used by the facial expression detection.
The "universal" signature contains some generic parameters. It doesn't need (nor accept) any training. It is the default signature. Cortex uses it automatically when the profile doesn't contain any training.
The "trained" signature uses the training from the user. The profile must contain at least one training before you can switch to this signature.
You must set one of these 2 parameters: profile or session. Read this for details.
The result is an object containing these fields:
This method get or set the sensitivity of the 4 active mental command actions.
Check out the usage in our BCI app.
You must set one of these 2 parameters: profile or session. Read this for details.
The array values contains the sensitivity of each active actions. The order of the values must follow the order of the active actions, as returned by mentalCommandActiveAction.
If the status is "get", then the result is an array of 4 numbers.
If the status is "set", then the result is a success message.
This method returns the skill rating of a mental command action, or the overall mental command skill rating. This is a measure of how often you can trigger the desired action as measured in the previous trainings. A higher rating indicates stronger ability to perform that action.
Deprecated: this method is superseded by mentalCommandBrainMap and will be removed in the future.
You must set one of these 2 parameters: profile or session. Read this for details.
The result is a number
that is the requested skill rating.
A token returned by .
A session id returned by .
A token returned by .
A session id returned by .
A token returned by .
A session id returned by .
A token returned by .
A session id returned by .
Name
Type
Required
Description
cortexToken
string
yes
A token returned by authorize.
status
string
yes
Must be "get" or "set".
profile
string
no
The name of a profile.
session
string
no
A session id returned by createSession.
signature
string
no
If the status is "set", then this parameter must be "universal" or "trained".
Name
Type
Description
currentSig
string
The current signature used by the profile. Can be "universal" or "trained".
availableSig
array of strings
The signatures you can use with the profile. The "universal" one is always available, but the "trained" one requires some training.
Name
Type
Required
Description
cortexToken
string
yes
A token returned by authorize.
status
string
yes
Must be "get" or "set".
profile
string
no
A profile name.
session
string
no
A session id returned by createSession.
values
array of 4 numbers
no
If the status is "set", this parameters is the new sensitivities. Each value must be between 1 and 10. Bigger number indicates higher sensitivity.
Name
Type
Required
Description
cortexToken
string
yes
A token returned by authorize.
profile
string
no
A profile name.
session
string
no
A session id returned by createSession.
action
string
no
The mental command action. If omitted, then this method returns the overall skill ratting.