Giter VIP home page Giter VIP logo

matrect's Introduction

matrect

Draw rectangles on images in Matlab and store their locations.

To use, make sure the files are in your path.

Sample Call:

collect_data('/Users/astorer/Dev/matrect/img','alex')

The first argument is the path to the image files. The second argument is the name of the person drawing rectangles. Their data will be stored in, e.g., alex.mat.

Options

  • c -- Press to change box from transparent to colored
  • r -- Press and hold to use mouse to rotate box
  • x -- Press and hold to scale x direction of box
  • y -- Press and hold to scale y direction of box
  • 0 -- Press to reset to initial position
  • 1 -- Press and hold to move one side of the box in the x direction
  • 2 -- Press and hold to move one side of the box in the x direction
  • 3 -- Press and hold to move one side of the box in the y direction
  • 4 -- Press and hold to move one side of the box in the y direction
  • n -- Press to toggle between quit and continue when figure is closed
  • Use the mouse to drag the box

Data

Data is saved in the same location as the images, as alex.dat, or whichever name was provided to the collect_data function. This contains a structure called s, which looks like this:

         id: 'alex'
    lastimg: 'SURFBOARDS-COVER.jpg'
       data: {[1x1 struct]  [1x1 struct]}

The data within s is a single rectangle:

>> s.data{1}

ans = 

      img: '1965lookingintoscience1.jpg'
    XData: [4x1 double]
    YData: [4x1 double]
     time: '28-Mar-2014 16:02:58'

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.