-
Notifications
You must be signed in to change notification settings - Fork 3
Update Notes
- The following classes are renamed:
DocumentPictureVerifier -> DocumentVerifier
FaceLivenessDetector -> FaceLivenessVerifier
DocumentPictureVerifierState -> DocumentVerifierState
SelfiePictureVerifierState -> SelfieVerifierState
HologramFeedback -> HologramState
GetHologramFeedback -> GetHologramState
- Rendering DSL: extra parameters at the end of a line should be ignored.
- Zenid now has a SelfieVerifier. It takes selfie pictures with no liveness. It two states: Ok and NoFaceFound. Ok means a picture should be taken. It takes the
haarcascade_frontalface_alt2.xmlmodel. Otherwise it is similar to the other verifiers. See SelfieVerifier.h for the API. - The
Orientationparameter is removed from ProcessFrame and GetRenderCommands. The caller is now responsible for the correct orientation. To assist with that, the Image class now has avoid Rotate(RotateFlags rotateFlags)method. Here is a possible implementation:
std::optional<RotateFlags> getRotation(int interfaceOrientation)
{
switch(interfaceOrientation) {
case 0: // .unknown
case 1: // .portrait
return std::nullopt;
case 2: // .portraitUpsideDown
return RotateFlags::Rotate180;
case 3: // .landscapeLeft
return RotateFlags::Rotate90CounterClockwise; //TODO: Check correct orientation
case 4: // .landscapeRight
return RotateFlags::Rotate90Clockwise; //TODO: Check correct orientation
default:
return std::nullopt;
}
}
(...)
Image image(data, widht, height, ImageFormat::BGRA);
const auto rotation = getRotation(document->orientation);
if (rotation) {
image.Rotate(*rotation);
}
verifier->ProcessFrame(image,
&documentRole,
&country,
&pageCode,
nullptr);
- Holograms: implemented GetDocumentCode and GetPageCode.
- Holograms: Removed HologramFeedback::AlignCard. Use HologramFeedback::NoMatchFound instead.
- The library needs to be authorised by the backend. See https://github.com/Licho1/ZenID-issues/issues/697.
- Ellipses are added to the rendering DSL. See https://github.com/Licho1/ZenID-issues/issues/702.
- Rectangle in the rendering DSL no longer has a "filled"|"outline" parameter. Use -1
thicknessfor filled rectangles instead.
-
Experimental The DocumentPitureVerifier and FaceLivenessDetector support an overlay. The drawing instructions for the overlay can be obtained by calling GetRenderCommands. It returns a string that describes the overlay in csv format as described here. The overlay should be updated every frame. It can be called while ProcessFrame is running on another thread.
-
Experimental The DocumentPitureVerifier and FaceLivenessDetector have a debug view that helps with testing. It can be toggled with SetDebugVisualization. A switch for debug mode should be added to testing apps.
-
RecogLibC is now a dynamic library. Source or models from RecogLibC should no longer be used. The library was committed to Zenid-iOS and Zenid-Android.
-
OpenCV is no longer required. There are new overloads for public API methods that don't use cv::Mat. To reduce download size, OpenCV should no longer be used by consumers of the API.
-
DocumentPictureVerifier::ProcessFrameno longer takes theexpectedOutlineparameter. Instead, it takes anOrientationenum that indicates the screen rotation (Up/Right/Down/Left) and an optional DocumentCodes enum. Only Orientation::Up is supported at this time, the client should ensure that the input image is rotated accordingly. -
DocumentPictureVerifier::ProcessFrameshould be given the document code when scanning the back side of a card. -
All headers other than
RecogLibC.hare considered private and are no longer in /include. -
DocumentPictureVerifier::State::Darkwas added. When the verifier is in that state, the user should be informed that the image is too dark.
06/28/2019 (9119231d)
-
FaceLivenessDetector.handDocumentPictureVerifier.hshould not be included in client code. Instead,RecogLibC.hshould be used. It's the only header that is needed from RecogLibC.