算法流程
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/c53ab445c336266b505df1e3e472217c.png)
界面设计
1.UI界面一:
- 两个Button元素+一个TextView元素
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/4aad4ee9c3dfc9824ec2d755b7c6865c.jpeg)
- XML界面设计
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout 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:padding="16dp"
tools:context="com.example.opencvtest.MainActivity">
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:text="拍照"
android:id="@+id/take_picture_btn"
/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"