Code Monkey home page Code Monkey logo

sudocam-ku's Introduction

SudoCAM-Ku!

An android camera-based augmented reality application that automatically solve and fill Sudoku puzzles by passing the camera over the puzzle. This project is based on a previous work : An automous robot that solve and fill sudoku puzzles (see Sudoku-robot repo for more details).

Get the project

$ git pull https://github.com/Sanahm/SudoCAM-Ku 

How it works?

First you need to take a picture of the sudoku grid by touching the screen when ready (this is not mandatory! It is just to avoid spending a lot of time on computation). After that, you'll need to touch the screen a second time to process the grid and solve it. Once solved the result will automatically be drawn on the camera frame.

An offline processing is also implemented. That it is, you can also solve a puzzle from your phone storage.

Note that this app use image processing method to process grid. That means, better is your image more the processing will succeed! You'll certainly have to try and try again according to the quality of your images .

A video is worth a thousand words: a link to youtube video

Remark

  • As the project size is big ( ~1GB with libs both Tensorflow and OpenCV) , you'll find on my repo just .java, .xml files and asset folder containing the tensorflow training model.

  • The project is fully documented. If you want more information about how processing works, just go and see Sudoku-robot.

How to setup the project

Create a new project on androidStudio and replace the src folder by mine.

You need to install Tensorflow and OpenCV in your AndroidStudio environment. Here are some indications on how to do that:

  • Download the Tensorflow libraries here and decompress. Once done,copy the libandroid_tensorflow_inference_java.jar and the architecture folders inside of the libtensorflow_inference.so in out/native/libtensorflow_inference.so into the android project jniLibs folder locate at src/main/jniLibs.

  • Download the OpenCV android pack here and decompress. I use the 3.1.0 version. Then copy the architecture folders inside OpenCV-android-sdk/sdk/native/libs into the same jniLibs as below.

  • Now update the gradle file

apply plugin: 'com.android.application'

android {
    compileSdkVersion 25
    buildToolsVersion "25.0.3"

    defaultConfig {
        applicationId "com.example.mohamed.sudoku"
        minSdkVersion 16
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:25.0.0'
    compile 'com.android.support:design:25.0.0'
}

Otherwise, find here some links to completly install opencv.

Keywords

  • Computer vision

  • Image classification - Convolutionnal Neural Network (CNN) with Tensorflow

  • Image recognition - Image processing

sudocam-ku's People

Contributors

sanahm avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.