@regulaforensics/face-sdk
Version:
This is an npm module for Regula Face SDK. It allows you to easily compaire faces using your phone's camera.
25 lines (21 loc) • 815 B
JavaScript
import { MatchFacesImage } from './match_faces_image'
import { MatchFacesDetectionFace } from './match_faces_detection_face'
import { MatchFacesException } from './match_faces_exception'
export class MatchFacesDetection {
imageIndex
image
faces
error
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new MatchFacesDetection()
result.imageIndex = jsonObject["imageIndex"]
result.image = MatchFacesImage.fromJson(jsonObject["image"])
result.faces = []
if (jsonObject["faces"] != null)
for (const item of jsonObject["faces"])
result.faces.push(MatchFacesDetectionFace.fromJson(item))
result.error = MatchFacesException.fromJson(jsonObject["error"])
return result
}
}