Coder Social home page Coder Social logo

strohmfn / bubbleview Goto Github PK

View Code? Open in Web Editor NEW

This project forked from turkeyes/bubbleview

0.0 1.0 0.0 78.05 MB

Crowdsourcing human attention using a cursor-based moving-window methodology.

Home Page: http://bubbleview.namwkim.org/

License: MIT License

CSS 5.10% HTML 26.07% JavaScript 68.83%

bubbleview's Introduction

BubbleView: replacing eye-tracking to crowdsource image importance

Demo: http://massvis.mit.edu/bubbleview/

Usage Description

We briefly describe how to use the bubbleview code based on the demo.

Add the necessary javascript files to your html file.

  <script src="js/stackblur.min.js"></script>
  <script src="js/nouislider.min.js"></script>
  <script src="js/diff.min.js"></script>
  <script src="js/bubbleview.js"></script>

nouislider.min.js is used for the time slider and diff.min.js is used for tracking description changes. You don't need diff.min.js if your task does not invole image description.

The bubbleview.js depends on stackblur.js a real-time image bluring library. We slightly modified its code as the original code forcibly changs the size of canvas to match the size of an input image. In our experiments, we did not use the stackblur library, instead pre-processed images to generate blurred images using a Gaussian blur filter using Matlab's imfilter(image, H, 'replicate') where H is fspecial('gaussian', radius, radius).

The bubbleview.js exports two functions setup(...) and monitor(...) whose definitions are:

  function setup(imgUrl, canvasID, bubbleR, blurR, task){
    ...
  }
  function monitor(imgUrl, canvasID, bubbleR, blurR, seeBubbles, seeOriginal, clicks, maxTime){
    ...
  }

bubbleR (bubble radius) and blurR (blur radius) are defined in pixels. task is an optional user-defined callback and it will be called whenever a user clicks on canvas to generate a bubble; each bubble (center, radius, timestamp etc) will be passed as a parameter to the callback.

clicks is an optional list of bubbles generated based on user clicks. monitor() expects its format to be the same as the one passed to the user callback; that is, an item in the list should have cx, cy and timestamp. maxTime is an optional timestamp limiting the number of bubbles drawn on the canvas (see the time slider in the demo). monitor() returns the total number of bubbles drawn given the maxTime option.

Code for Launching Experiments

At this moment, we do not publicly release the code used for running our experiments on Amazon's Mechanical Turk. This code requires more complex development settings including a database, a web server, and scripts for automatically managing MTurk HITs. If you are interested in this code, please contact [email protected].

bubbleview's People

Contributors

namwkim avatar

Watchers

 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.