人脸采集代码提交
This commit is contained in:
@@ -0,0 +1,170 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/bg_collect_shape"
|
||||
tools:context=".MainActivity">
|
||||
|
||||
<!-- <ImageView-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="match_parent"-->
|
||||
<!-- android:src="@drawable/bg_collect_shape"/>-->
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvTitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginVertical="50dp"
|
||||
android:gravity="center"
|
||||
android:text="人脸采集"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="40sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<com.google.android.material.divider.MaterialDivider
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
app:dividerColor="#3391CEFF" />
|
||||
|
||||
<!-- android:layout_width="640dp"-->
|
||||
<FrameLayout
|
||||
android:id="@+id/flCameraView"
|
||||
android:layout_width="852dp"
|
||||
android:layout_height="480dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginVertical="50dp"
|
||||
android:visibility="visible">
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/flFace"
|
||||
android:layout_width="640dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center_horizontal"
|
||||
app:cardBackgroundColor="@android:color/transparent"
|
||||
app:cardCornerRadius="10dp"
|
||||
app:cardElevation="0dp">
|
||||
|
||||
<TextureView
|
||||
android:id="@+id/dual_camera_texture_preview_rgb"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:visibility="visible" />
|
||||
|
||||
<com.sw.plate.utils.arcface.FaceRectView
|
||||
android:id="@+id/dual_camera_face_rect_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<!-- <eightbitlab.com.blurview.BlurView-->
|
||||
<!-- android:id="@+id/target"-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="match_parent"-->
|
||||
<!-- app:blurOverlayColor="#4482CD">-->
|
||||
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom"
|
||||
android:adjustViewBounds="true"
|
||||
android:src="@drawable/bg_face_wrap"
|
||||
android:visibility="visible" />
|
||||
|
||||
<!-- </eightbitlab.com.blurview.BlurView>-->
|
||||
|
||||
<!-- <com.google.android.material.imageview.ShapeableImageView-->
|
||||
<!-- android:id="@+id/ivRecImage"-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="match_parent"-->
|
||||
<!-- android:scaleType="centerCrop"-->
|
||||
<!-- android:visibility="gone"-->
|
||||
<!-- app:shapeAppearance="@style/round10dpCornerStyle"-->
|
||||
<!-- tools:src="@mipmap/ic_launcher_round" />-->
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvFaceTip"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="50dp"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="center_vertical"
|
||||
android:text="请正视摄像头,保持面部居中于取景框内"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="26sp"
|
||||
android:textStyle="bold"
|
||||
android:visibility="visible" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/layoutState"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="50dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:visibility="gone">
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/pbCollectLoading"
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="36dp"
|
||||
android:indeterminateTint="@color/white" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvCollectState"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="10dp"
|
||||
android:text="采集中......"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="26sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="30dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatButton
|
||||
android:id="@+id/btnCollectFace"
|
||||
android:layout_width="300dp"
|
||||
android:layout_height="100dp"
|
||||
android:layout_margin="20dp"
|
||||
android:background="@drawable/bg_collect_btn"
|
||||
android:text="开始采集"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="40sp"
|
||||
android:textStyle="normal" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/flRecognizeIr"
|
||||
android:layout_width="4dp"
|
||||
android:layout_height="3dp"
|
||||
android:layout_gravity="bottom">
|
||||
|
||||
<TextureView
|
||||
android:id="@+id/dual_camera_texture_preview_ir"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<com.sw.plate.utils.arcface.FaceRectView
|
||||
android:id="@+id/dual_camera_face_rect_view_ir"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
</FrameLayout>
|
||||
</FrameLayout>
|
||||
Reference in New Issue
Block a user