MCPcopy Index your code
hub / github.com/Rohithkvsp/Form-N-Fun

github.com/Rohithkvsp/Form-N-Fun @v1.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.1 ↗ · + Follow
2,501 symbols 4,493 edges 110 files 88 documented · 4%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Form-N-Fun

Form ‘N’ Fun is an android maze game based on real time computer vision. The uniqueness of this game is that the user can draw his own mazes on a white paper with pen/pencil and play. The game detects the maze and user can play using the accelerometer. This android app uses contours algorithms in OpenCV to detect maze that is drawn on the paper. This app uses JBox2d engine for simulating the rigid bodies.

Download APK

Apk can be found in apk folder, download and install the apk.

Modifications if needed 1) Resolution: Resolution is fixed to 1280x960 (less than or equal). Resolution can be changed by modifing this line.

2) Limiting the Pitch and Roll: Pitch and Roll are limited to 3.8, limiting value can be changed by modifing MIN and MAX. Here is the implementation of limiting function.

3) Force on the ball: Force on the ball can be changed here.

4) Color of the ball: Color of the ball can be modified here.

Download Android NDK r16b from https://developer.android.com/ndk/downloads/older_releases.html and extract the file, On Mac I extracted to /Users/Name/Documents/Android/android-ndk-r16b

Open the local.properties file and set ndk.dir to the path of Android NDK folder.

on Windows local.properties

sdk.dir = C\:\\android_sdk
ndk.dir = C\:\\android_ndk

on Mac local.properties

sdk.dir = /Users/Name/Library/Android/sdk
ndk.dir = /Users/Name/Documents/Android/android-ndk-r16b

Build Instructions with CV4:

Download OpenCV for Android (I used OpenCV 4.1.0) from http://opencv.org/releases.html and extract the file. I extracted the file to C:\Opencv\OpenCV-android-sdk-4.1.0 (On Windows) or /Users/Name/Documents/Android/OpenCV-android-sdk-4.1.0 (On Mac)

Open the Android.mk file in jni folder, modify the export OPENCV_PACKAGE_DIR to extracted OpenCV Path

on Windows.

export OPENCV_PACKAGE_DIR = C:/Opencv/OpenCV-android-sdk-4.1.0

on Mac.

export OPENCV_PACKAGE_DIR = /Users/Name/Documents/Android/OpenCV-android-sdk-4.1.0

Run the app after making the above changes.

Build Instructions with CV3:

Download OpenCV for Android (I used OpenCV 3.4.1) from http://opencv.org/releases.html and extract the file. I extracted the file to C:\Opencv\OpenCV-android-sdk-3.4.1 (On Windows) or /Users/Name/Documents/Android/OpenCV-android-sdk-3.4.1 (On Mac)

Open the Android.mk file in jni folder, modify the export OPENCV_PACKAGE_DIR to extracted OpenCV Path

on Windows.

export OPENCV_PACKAGE_DIR = C:/Opencv/OpenCV-android-sdk-3.4.1

on Mac.

export OPENCV_PACKAGE_DIR = /Users/Name/Documents/Android/OpenCV-android-sdk-3.4.1

remove LOCAL_CPPFLAGS in line 14 in Android.mk to build with CV3

LOCAL_CPPFLAGS := -DCV4

Run the app after making the above changes.

Note:

I build it on Mac for all the Devices but I tested it on Google PIXEL XL.

APP_ABI := arm64-v8a armeabi-v7a x86 x86_64

If you want to build the App for a particular device then modify APP_ABI to device ABIs in Application.mk in jni folder.

For example, to build App only for Google PIXEL XL then modify APP_ABI to APP_ABI:=arm64-v8a in Application.mk (Pixel XL has ARMv8 based CPU supports AArch64).

APP_ABI := arm64-v8a

Extension points exported contracts — how you extend this code

CvCameraViewListener2 (Interface)
(no doc) [4 implementers]
opencv-java/src/main/java/org/opencv/android/CameraBridgeViewBase.java
CvCameraViewFrame (Interface)
This class interface is abstract representation of single frame from camera for onCameraFrame callback Attention: Do not [2 …
opencv-java/src/main/java/org/opencv/android/CameraBridgeViewBase.java
LoaderCallbackInterface (Interface)
Interface for callback object in case of asynchronous initialization of OpenCV. [2 implementers]
opencv-java/src/main/java/org/opencv/android/LoaderCallbackInterface.java
InstallCallbackInterface (Interface)
Installation callback interface. [1 implementers]
opencv-java/src/main/java/org/opencv/android/InstallCallbackInterface.java
CvCameraViewListener (Interface)
(no doc) [2 implementers]
opencv-java/src/main/java/org/opencv/android/CameraBridgeViewBase.java

Core symbols most depended-on inside this repo

vector_Mat_to_Mat
called by 78
opencv-java/src/main/java/org/opencv/utils/Converters.java
get
called by 61
opencv-java/src/main/java/org/opencv/core/Mat.java
size
called by 41
opencv-java/src/main/java/org/opencv/core/Mat.java
release
called by 40
opencv-java/src/main/java/org/opencv/core/Mat.java
checkVector
called by 35
opencv-java/src/main/java/org/opencv/core/Mat.java
add
called by 33
opencv-java/src/main/java/org/opencv/core/Core.java
put
called by 31
opencv-java/src/main/java/org/opencv/core/Mat.java
empty
called by 29
opencv-java/src/main/java/org/opencv/core/Mat.java

Shape

Method 2,379
Class 110
Function 6
Interface 6

Languages

Java100%
C++1%

Modules by API surface

opencv-java/src/main/java/org/opencv/imgproc/Imgproc.java315 symbols
opencv-java/src/main/java/org/opencv/core/Core.java260 symbols
opencv-java/src/main/java/org/opencv/calib3d/Calib3d.java126 symbols
opencv-java/src/main/java/org/opencv/core/Mat.java107 symbols
opencv-java/src/main/java/org/opencv/photo/Photo.java78 symbols
opencv-java/src/main/java/org/opencv/ml/TrainData.java75 symbols
opencv-java/src/main/java/org/opencv/objdetect/HOGDescriptor.java64 symbols
opencv-java/src/main/java/org/opencv/video/KalmanFilter.java52 symbols
opencv-java/src/main/java/org/opencv/video/BackgroundSubtractorMOG2.java52 symbols
opencv-java/src/main/java/org/opencv/ml/ANN_MLP.java52 symbols
opencv-java/src/main/java/org/opencv/ml/SVM.java50 symbols
opencv-java/src/main/java/org/opencv/android/CameraBridgeViewBase.java46 symbols

For agents

$ claude mcp add Form-N-Fun \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact