Home > BubbleCollect

BubbleCollect

BubbleCollect is a project mainly written in C and C++, it's free.

Bubblebot

Created by: Eleanor O'Rourke ([email protected]) Nicola Dell ([email protected]) Vincent Lung ([email protected])

Based on the CVCamera example in OpenCV.

Source tree information Quick description of the content in the root folder:

AndroidManifest.xml - Manifest of the Android application android-opencv.mk - Build settings for C++ components LastKnownGoodBuild - Contains the apk file for the last known good build Makefile - Makefile for C++ components README - This file build.xml - Build manifest for the Android application default.properties - Default build properties for the Android application jni - Source tree for C++ components local.* - Build configuration file opencv - The minimum set of the OpenCV library needed to build BubbleBot proguard.cfg - Proguard configuration file res - Source tree for Java resources src - Source tree for Java components

Main BubbleBot source file information All Android java activites are under the src/com/bubblebot/ folder: BubbleBot.java - BubbleBot Main menu BubbleCollect.java - Activity launched from main menu for capturing a form image using live camera feed AfterPhotoTaken.java - Activity called after BubbleCollect to evaulate the captured image BubbleProcess.java - Activity called after AfterPhotoTaken to process the captured image DisplayProcessedForm.java - Activity called after BubbleProcess to display the processed image DisplayProcessedData.java - Activity optionally called by DisplayProcessedForm to display data extracted from processed image ViewBubbleForms.java - Activity launched from main menu to view previously processed forms BubbleInstructions.java - Activity launched from main menu to display user instructions jni/ - Everything under this folder are generated by SWIG to Java-to-C++ invocation

All files under the opencv/ folder came from the OpenCV library. The following files in the opencv/android/android-jni/src/com/opencv/camera/ folder are heavily modified for the BubbleBot application: NativePreviewer.java - A library that sets up the camera for previewing and handles other camera operations. NativeProcessor.java - A library that processes the live camera feed from NativePreviewer.

All BubbleBot C++ code are under the jni/ felder: Android.mk - Makefile Application.mk - Makefile .i - Interface files created for SWIG to generate java files for Java-to-C++ invocation .h - Header files Feedback.cpp - C++ library for visual feedback component Processor.cpp - C++ library for form processing, form detection and form digitalization gen/ - Files generated by SWIG for Java-to-C++ invocation

Building the project Follow the Prerequisites section at http://opencv.willowgarage.com/wiki/Android to install all prerequisites on your machine.

In the example below, we assume that: The root folder of BubbleBot is /Users/Myself The root folder of the Android R4 Crystax NDK is /opt/local/android-ndk-r4-crystax The root folder of the Android SDK is /opt/local/android-sdk-mac_x86

You need to update the following build configuration files: 1) Edit android-opencv.mk, change line 7 to the update the location of the opencv/ folder: OPENCV_ROOT := /Users/Myself/BubbleCollect/opencv

2) Edit local.env.mk, update line 3 with the location of the Android NDK ANDROID_NDK_ROOT=/opt/local/android-ndk-r4-crystax

3) Edit local.properties, update line 10 with the location of the Android SDK sdk.dir=/opt/local/android-sdk-mac_x86

To clean the project: 1) Enter "make clean" 2) Enter "ant clean"

To build the project: 1) Enter "make" to build the C++ components 2) Enter "ant debug" to bulid the Java compononts and the Android application Alternatively, enter "ant install" in step 2 to install the Android application to the connected emulator or phone after the application is built.