Giter Club home page Giter Club logo

driemworks-ar's Introduction

Driemworks

Driemworks is an open source augmented reality platform powered by OpenCV and OpenGL.

Motivation

Example (keypoint detection and tracking: see OpenARActivity.java) OpenARActivity screenshot

Built with

  • java
  • gradle
  • openCV
  • openGL

OpenCV Support

OpenCV support is supplied by the OpenCVFragment. To use the OpenCVFragment in your activity, the activity must implement CameraBridgeViewBase.CvCameraViewListener2.

Example

public class MyActivity extends FragmentActivity implements CameraBridgeViewBase.CvCameraViewListener2 {

    @Override
    public void onCreate(Bundle savedInstanceState) {
        ...
        FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
        // add opencv fragment
        transaction.add(new OpenCVFragment(), "OpenCVFragment");
        transaction.commit();
        ...
    }

	@Override
    public Mat onCameraFrame(CameraBridgeViewBase.CvCameraViewFrame inputFrame) {
		// your opencv logic here
	}
}

OpenGL Support

OpenGL support is supplied by the OpenGLFragment. To provide OpenGL and OpenCV support in an activity, the activity must implement CameraBridgeViewBase.CvCameraViewListener2 and extend AbstractARActivity.

For a renderer with an orientation provider, the renderer should extend AbstractOrientationRenderer

Example

public class MyActivity extends AbstractARActivity implements CameraBridgeViewBase.CvCameraViewListener2 {

    @Override
    public void onCreate(Bundle savedInstanceState) {
        setRenderer(new CubeRenderer());
        setContentView(R.layout.opengl_opencv_layout);
        setGlSurfaceViewId(R.id.opengl_surface_view);
        setOpenCVSurfaceViewId(R.id.opencv_surface_view);
        ...
        FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
        // add opengl fragment
        transaction.add(new OpenGLFragment(), "OpenGLGFragment");
        // add opencv fragment
        transaction.add(new OpenCVFragment(), "OpenCVFragment");
        transaction.commit();
        ...
    }

	@Override
    public Mat onCameraFrame(CameraBridgeViewBase.CvCameraViewFrame inputFrame) {
		// your opencv logic here
	}
}

Prerequisites

Follow the guide (https://opencv.org/platforms/android/) on getting started with OpenCV4Androicd

driemworks-ar's People

Contributors

driemworks avatar pascal66 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

driemworks-ar's Issues

Create Camera Configuration Activity

Given The User has an android device
When The User camera calibration activity is called
Then The User should be able to calculate the focal point and the principal point of the camera
Based on some checkered pattern

Given The User has an android device
When the User calculates the focal point and the principal point of the camera
Then these values should be stored in a hidden file somehere on the device for future use of the application

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.