Skip to content

Commit

Permalink
added v11.5.2
Browse files Browse the repository at this point in the history
  • Loading branch information
sMaltsevAcuant committed Mar 14, 2022
1 parent cb901f6 commit fc2f3a7
Show file tree
Hide file tree
Showing 8 changed files with 35 additions and 48 deletions.
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Acuant Android SDK v11.5.1
**February 2022**
# Acuant Android SDK v11.5.2
**March 2022**

See [https://github.com/Acuant/AndroidSDKV11/releases](https://github.com/Acuant/AndroidSDKV11/releases) for release notes.

Expand Down Expand Up @@ -112,19 +112,19 @@ The SDK includes the following modules:

maven { url 'https://maven.google.com' }
maven { url 'https://raw.githubusercontent.com/Acuant/AndroidSdkMaven/main/maven/' }
maven { url 'https://raw.githubusercontent.com/iProov/android/master/maven/' }
maven { url 'https://raw.githubusercontent.com/iProov/android/master/maven/' }
- Add the following dependencies

implementation 'com.acuant:acuantcommon:11.5.1'
implementation 'com.acuant:acuantcamera:11.5.1'
implementation 'com.acuant:acuantimagepreparation:11.5.1'
implementation 'com.acuant:acuantdocumentprocessing:11.5.1'
implementation 'com.acuant:acuantechipreader:11.5.1'
implementation 'com.acuant:acuantipliveness:11.5.1'
implementation 'com.acuant:acuantfacematch:11.5.1'
implementation 'com.acuant:acuantfacecapture:11.5.1'
implementation 'com.acuant:acuantpassiveliveness:11.5.1'
implementation 'com.acuant:acuantcommon:11.5.2'
implementation 'com.acuant:acuantcamera:11.5.2'
implementation 'com.acuant:acuantimagepreparation:11.5.2'
implementation 'com.acuant:acuantdocumentprocessing:11.5.2'
implementation 'com.acuant:acuantechipreader:11.5.2'
implementation 'com.acuant:acuantipliveness:11.5.2'
implementation 'com.acuant:acuantfacematch:11.5.2'
implementation 'com.acuant:acuantfacecapture:11.5.2'
implementation 'com.acuant:acuantpassiveliveness:11.5.2'

1. Create an xml file with the following tags (If you plan to use bearer tokens to initialize, then username and password can be left blank):

Expand Down
10 changes: 4 additions & 6 deletions acuantcamera/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,11 @@ dependencies {

// App compat and UI things
implementation 'androidx.appcompat:appcompat:1.4.1'
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.4.0'
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.4.1'
implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
//noinspection GradleDependency
implementation 'androidx.window:window:1.0.0-alpha09' //newer versions changed the api, not updating yet

// CameraX library
def camerax_version = '1.1.0-beta01'
def camerax_version = '1.1.0-beta02'
implementation "androidx.camera:camera-core:$camerax_version"
implementation "androidx.camera:camera-camera2:$camerax_version"
implementation "androidx.camera:camera-lifecycle:$camerax_version"
Expand All @@ -54,6 +52,6 @@ dependencies {
implementation 'androidx.exifinterface:exifinterface:1.3.3'
implementation 'com.google.mlkit:barcode-scanning:17.0.2'
implementation 'com.rmtheis:tess-two:9.1.0'
implementation 'com.acuant:acuantcommon:11.5.1'
implementation 'com.acuant:acuantimagepreparation:11.5.1'
implementation 'com.acuant:acuantcommon:11.5.2'
implementation 'com.acuant:acuantimagepreparation:11.5.2'
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import androidx.constraintlayout.widget.ConstraintLayout
import androidx.core.content.ContextCompat
import androidx.exifinterface.media.ExifInterface
import androidx.fragment.app.Fragment
import androidx.window.WindowManager
import com.acuant.acuantcamera.R
import com.acuant.acuantcamera.databinding.FragmentCameraBinding
import com.acuant.acuantcamera.interfaces.IAcuantSavedImage
Expand All @@ -42,7 +41,6 @@ abstract class AcuantBaseCameraFragment: Fragment() {
private var orientationEventListener: OrientationEventListener? = null
private var preview: Preview? = null
private var failedToFocus: Boolean = false
private lateinit var windowManager: WindowManager
protected var imageCapture: ImageCapture? = null
protected var capturing: Boolean = false
protected var fragmentCameraBinding: FragmentCameraBinding? = null
Expand Down Expand Up @@ -140,9 +138,6 @@ abstract class AcuantBaseCameraFragment: Fragment() {
// Initialize our background executor
cameraExecutor = Executors.newSingleThreadExecutor()

//Initialize WindowManager to retrieve display metrics
windowManager = WindowManager(view.context)

// Wait for the views to be properly laid out
fragmentCameraBinding?.viewFinder?.post {
val binding = fragmentCameraBinding
Expand Down
12 changes: 5 additions & 7 deletions acuantfacecapture/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,22 +34,20 @@ dependencies {

// App compat and UI things
implementation 'androidx.appcompat:appcompat:1.4.1'
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.4.0'
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.4.1'
implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
//noinspection GradleDependency
implementation 'androidx.window:window:1.0.0-alpha09' //newer versions changed the api, not updating yet

// CameraX library
def camerax_version = '1.1.0-beta01'
def camerax_version = '1.1.0-beta02'
implementation "androidx.camera:camera-core:$camerax_version"
implementation "androidx.camera:camera-camera2:$camerax_version"
implementation "androidx.camera:camera-lifecycle:$camerax_version"
implementation "androidx.camera:camera-view:$camerax_version"

//acuant specific stuff
implementation 'com.google.mlkit:face-detection:16.1.4'
implementation 'com.acuant:acuantcommon:11.5.1'
implementation 'com.acuant:acuantimagepreparation:11.5.1'
implementation 'com.google.mlkit:face-detection:16.1.5'
implementation 'com.acuant:acuantcommon:11.5.2'
implementation 'com.acuant:acuantimagepreparation:11.5.2'

testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import androidx.camera.core.impl.utils.Exif
import androidx.camera.lifecycle.ProcessCameraProvider
import androidx.core.content.ContextCompat
import androidx.fragment.app.Fragment
import androidx.window.WindowManager
import com.acuant.acuantcommon.model.AcuantError
import com.acuant.acuantcommon.model.ErrorCodes
import com.acuant.acuantcommon.model.ErrorDescriptions
Expand Down Expand Up @@ -43,7 +42,6 @@ abstract class AcuantBaseFaceCameraFragment: Fragment() {
private var camera: Camera? = null
private var cameraProvider: ProcessCameraProvider? = null
private var preview: Preview? = null
private lateinit var windowManager: WindowManager
protected var capturing: Boolean = false
protected var fragmentCameraBinding: FragmentFaceCameraBinding? = null
protected var imageAnalyzer: ImageAnalysis? = null //set up by implementations
Expand Down Expand Up @@ -108,9 +106,6 @@ abstract class AcuantBaseFaceCameraFragment: Fragment() {
// Initialize our background executor
cameraExecutor = Executors.newSingleThreadExecutor()

//Initialize WindowManager to retrieve display metrics
windowManager = WindowManager(view.context)

// Wait for the views to be properly laid out
fragmentCameraBinding?.viewFinder?.post {
val binding = fragmentCameraBinding
Expand Down Expand Up @@ -171,9 +166,10 @@ abstract class AcuantBaseFaceCameraFragment: Fragment() {
/** Declare and bind preview, capture and analysis use cases */
private fun bindCameraUseCases() {

val metrics = windowManager.getCurrentWindowMetrics().bounds
val width: Int = requireContext().resources.displayMetrics.widthPixels
val height: Int = requireContext().resources.displayMetrics.heightPixels

val screenAspectRatio = aspectRatio(metrics.width(), metrics.height())
val screenAspectRatio = aspectRatio(width, height)

val rotation = fragmentCameraBinding!!.viewFinder.display.rotation

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ class AcuantFaceCaptureFragment: AcuantBaseFaceCameraFragment() {
}

companion object {
private const val MOVEMENT_THRESHOLD = 15
private const val MOVEMENT_THRESHOLD = 22

private fun didFaceMove(facePosition: Rect?, lastFacePosition: Rect?): Boolean {
if (facePosition == null || lastFacePosition == null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ class FaceFrameAnalyzer internal constructor(private val listener: FaceFrameList
.build())

private const val TOO_CLOSE_THRESH = 0.815f
private const val TOO_FAR_THRESH = 0.685f
private const val TOO_FAR_THRESH = 0.635f
private const val EYE_CLOSED_THRESHOLD = 0.3f
private const val Y_ROT_ANGLE = 10
private const val Z_ROT_ANGLE = 15
Expand Down
18 changes: 9 additions & 9 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,17 @@ dependencies {

//If you do not plan to modify the camera code you can use these two regular maven dependencies
// in place of the project ones.
// implementation 'com.acuant:acuantfacecapture:11.5.1'
// implementation 'com.acuant:acuantcamera:11.5.1'
// implementation 'com.acuant:acuantfacecapture:11.5.2'
// implementation 'com.acuant:acuantcamera:11.5.2'
implementation project(path: ':acuantcamera')
implementation project(path: ':acuantfacecapture')
implementation 'com.acuant:acuantcommon:11.5.1'
implementation 'com.acuant:acuantimagepreparation:11.5.1'
implementation 'com.acuant:acuantdocumentprocessing:11.5.1'
implementation 'com.acuant:acuantechipreader:11.5.1'
implementation 'com.acuant:acuantfacematch:11.5.1'
implementation 'com.acuant:acuantipliveness:11.5.1'
implementation 'com.acuant:acuantpassiveliveness:11.5.1'
implementation 'com.acuant:acuantcommon:11.5.2'
implementation 'com.acuant:acuantimagepreparation:11.5.2'
implementation 'com.acuant:acuantdocumentprocessing:11.5.2'
implementation 'com.acuant:acuantechipreader:11.5.2'
implementation 'com.acuant:acuantfacematch:11.5.2'
implementation 'com.acuant:acuantipliveness:11.5.2'
implementation 'com.acuant:acuantpassiveliveness:11.5.2'
}
android {
compileSdkVersion 31
Expand Down

0 comments on commit fc2f3a7

Please sign in to comment.