Coder Social home page Coder Social logo

jumbotron's Introduction

NOTE - this is in no way complete

Currently it gives a few helper functions for interacting with js-aruco output.


jumbotron

libraries

(not used, but could be useful)

usage

steps

  1. master creates room
  2. clients register as being part of the room, display markers
  3. master observes clients
  4. master closes room, notify clients of world
// mid-level api - recognition

// potentially call several times to observe different angles + new markers
jumbotron.observe(imagedata)

// calculate the world dimensions, and positions of each marker
jumbotron.construct();
// -> {width: 2000, height: 3000, markers: [{id: 32, transform: […]}]}

// get going
jumbotron.start();

Development

This should only matter if you are hacking on the internals and fixing stuff (which would be very appreciated).

Setup

Dependencies are managed by bower, install them with:

bower install

Then you need to serve the files through a web server. SimpleHTTPServer is a pretty easy way to do that

python -m SimpleHTTPServer

Then visit localhost:8000 - most interesting stuff is in the /hacks folder.

recognition approach

The marker recognition is performed by js-aruco. The pose estimation component requires the physical size of the marker, which we don't have. Instead, we use the constraint that all markers lie on the same plane to work out their positions relative to each other. Also, by approaching it this way - it allows us to combine several observations cover larger areas and also handle observations with missing markers.

// the structure of marker output from js-aruco
[
	{id:a, corners:[/*pixel coords*/]},
	{id:b, corners:[/*  ...  */]}
]

The first step is to work out the relative positions from the context of each marker (where the other markers have been transformed to make the marker a 1×1 square positioned at 0,0).

From this, we build a 'relative vector grid', which stores observations between markers.

{
	'a-b':[[2,2]],
	'b-a':[[-2,0]]
}

We then take this to build a representation of the markers in an arbitraty space. The current approach is to cycle through observations:

  • first item becomes the base for the rest of the space
  • any linked markers are translated based from that marker
  • any existing marker is scaled, rotated based on it's own view of other markers

Which should end up with something like:

{
	a: [[1,0,0],[0,1,0],[0,0,1]], // identity
	b: [/* rotate(-45) translate(2,2) scale(2) */],
}

resolves benfoxall/benfoxall.github.com#16

jumbotron's People

Contributors

benfoxall avatar

Stargazers

Dhrubo Paul avatar

Watchers

 avatar James Cloos avatar Chris Hughes avatar  avatar

jumbotron's Issues

alternate markers

snaptag - could look pretty cool
pinch - simple, no camera device needed

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.