Appearance
Subject Demographic Information
In order to provide highly accurate results, the SDK requires demographic information regarding the user who is taking the measurement. This information is not mandatory, but it improves the accuracy of the vital signs that are calculated by the system. The demographic information consists of three fields:
- Sex (as classified at birth) [unspecified / male / female]
- Age [years]
- Weight [Kilograms]
- Height [Centimeters]
The application can provide the demographic information as part of the session initialization.
In the following example, the sex is female, the age is 35 years, the weight is 65 kilograms and the height is 165 centimeters. In the example the measurement session is a face session, but it can be used in a PPG Device session as well.
Swift
do {
let licenseDetails = LicenseDetails(licenseKey: "<ENTER_YOUR_LICENSE_KEY>")
let subjectDemographic = SubjectDemographic(sex: .female, age: 35, weight: 65, height: 165)
try let session = FaceSessionBuilder()
.withSubjectDemographic(subjectDemographic)
.withImageListener(self)
.withVitalSignsListener(self)
.withSessionInfoListener(self)
.build(licenseDetails: licenseDetails);
}
catch {
let nsError = error as NSError
print("Received Error. Domain: \(nsError.domain) Code: \(nsError.code)")
}Objective-C
BIOLicenseDetails *licenseDetails = [[BIOLicenseDetails alloc] initWithLicenseKey:@"<ENTER_YOUR_LICENSE_KEY>"];
BIOSubjectDemographic *subjectDemographic = [[BIOSubjectDemographic alloc] initWithSex:BIOSexFemale
age:@(35)
weight:@(65)
height:@(165)];
BIOFaceSessionBuilder *sessionBuilder = [[[[[[BIOFaceSessionBuilder alloc] init]
withSubjectDemographic:subjectDemographic]
withImageListener:self]
withVitalSignsListener:self]
withSessionInfoListener:self];
NSError *error = nil;
id<BIOSession> _Nullable session = [sessionBuilder buildWithLicenseDetails:licenseDetails
error:&error];
if (error != nil) {
NSLog(@"Received Error. Domain: %@ Code: %ld", error.domain, (long)error.code);
}If any of the demographic parameters is unknown, it is recommended to provide the known parameters and to leave the others 'null'/'unspecified'.
Important
When a session is created with demographic information, all measurements performed during that session use the same demographic information. Therefore, a new session must be created in order to update the demographic information.