Toddler Sunday Programming To the top
"Sudoku Automatic Answer" (Android version) is an application that automatically solves the problem of Sudoku (Sudoku) when you take a picture and shows the answer. So, for example, you can shorten the time to solve a large number of questions in Sudoku's prize book, check the answers to questions that do not have answers, or check whether your own questions can be answered correctly. Can be used to do.
In this article, we will explain each function implemented in Sudoku automatic answer as Tips.
--Download the app here. --Click here to get the project source (https://devmart.jp/businesses/127). --The commentary article for the iOS version of "Sudoku Automatic Answer" is here.
Sudoku automatic answer is developed and executed in the following environment.
--Development environment: macOS, Android Studio (3.3 ~ 3.4), Java --Execution environment: Android 5.0 or above
Sudoku automatic answer has two screens. One is a unique view that displays Sudoku problems (9x9 squares and numbers in each square) and accepts operations to edit the numbers, multiple buttons to call the function, and an advertisement (AdMob). .. The other is a camera screen that uses the Camera2 API to take pictures of Sudoku problems. In this application, the question of the library (9x9 squares) is cut out from the photograph taken by the camera, the number of each square is recognized, and it is imported as the target data to be answered, but for cutting out the squares, It uses OpenCV and uses the OCR library (tess-two) for number recognition. The answer process is the original heuristic algorithm.
In order to realize this application, the following functions are implemented and each will be explained as Tips.
--Incorporate AdMob (AdMob SDK) --Display ads (AdMob SDK) --Incorporate OpenCV library --Cut out a rectangular area from a photo (OpenCV) --Incorporate OCR library (tess-two) --Recognize characters with OCR function (tess-two) --Write the data stored in the asset to a file --Generate your own view (FrameLayout, View) --Draw in your own view (View) --Redraw the view after determining the screen layout (Frame Layout) --Implementing original camera function (Camera2) --Get permission to use the camera from the user --Exchange data between screens (activity) (Intent) --Save image (Bitmap) to file (FileOutputStream) --Cut out a part of the image (Bitmap) --Perform asynchronous processing (separate thread processing) (AsyncTaskLoader) --Display / turn off the waiting indicator (round and round) (Progress Bar) --Get the version number of the app (Package Manager) --Display the menu (Menu) --Customize the shape of the button (Button) --Multilingual support
Recommended Posts