BWS Sample Class Documentation

Base class for any kind of samples (patterns for the different traits).

[DataContract(Namespace = "http://schemas.bioid.com/2011/12/bws")]
public class Sample
{
    [DataMember]
    public Trait Trait { get; set; }
    [DataMember]
    public byte[] Data { get; set; }
    [DataMember]
    public string Tag { get; set; }
}
    

Sample.Trait

The Trait this sample belongs to.

Sample.Data

The sample data itself. The data is represented by an array of bytes, which is typically simply a byte-stream containing an image- or wave-file.

Sample.Tag

An optional tag associated with this sample. The value of this tag is intended to be one or more strings (concatenated with a space), that describes some kind of demand or characteristics of the sample. The interpretation depends on the trait of the sample, the operation performed and the flags specified with the operation.

For example, face-samples used with the verify/identify/enroll operation using the LiveFaceDetection flag can specify the expected head movement direction relative to the preceding sample (up, down, left, right). In case you expect that the person in front of the camera moved his head horizontally you can set the tag "right left".

Supported Formats

Images

Images can be sent in various formats including BMP, GIF, TIFF, JPEG and PNG files. Anyway, as it is common and reasonable to compress images that are sent over the internet, we highly recommend to use lossless compression mechanisms like PNG's Deflate algorithm. Some traits (like the face trait) also do not require to use color images, so sending grayscale images can reduce the amount of data even more.

Audio

We currently only support WAVE (a RIFF based waveform audio file format) files, PCM encoded with 8 or 16 Bits per sample (expected sample rate is 22.050 Hz), mono or stereo. The files must not contain any metadata chunks besides 'fmt' and 'data'. The files should contain relatively short passphrases with about one to two seconds in duration.