Code Monkey home page Code Monkey logo

vksensecam's Introduction

About

In 2012-03 I had the chance to test Vicon Revue (v1) for Lifelogging. The Vicon Revue is the commercial product of the Microsoft SenseCam.

Vicon Revue is a neck worn digital camera with sensors. It takes (small) photographs whenever the sensors get a pattern that causes the firmware to make a snapshot. With the set of photographs you can see where you have been while wearing the device. Using those photographs for generating a small video helps people remembering their life. This has come to attention in the research of memory impairments.

I analyzed the Adobe AIR based software for downloading the data from the Vicon Revue and for reviewing the photographs later on. And I realized that I need an alternative software method to access and review the data: Adobe AIR will not be around forever and I want to avoid any lock-in effect.

The Issues

During the analyzing phase, I found out that the original JPEG photographs do have correct Exif metadata included. Additionally, in every image folder, there is a file named «SENSOR.CSV» in CSV format which contains the sensor data and their time stamps.

After Vicon Revue Desktop moves the data from the device to your computer, the Exif metadata gets overwritten with the time stamps of the import process. Unfortunately, this is where you lose the time information within the photographs.

To get to the original times you have to either parse the «SENSOR.CSV» or the additionally created SQLite v3 database. The SQLite database contains all values from all «SENSOR.CSV» files and anything you add within Vicon Revue Desktop (notes, tags, titles, …).

But I want to use the photographs outside of Vicon Revue Desktop too!

Therefore I found the standard behavior a bit «rude». My solution I present here adds metadata like the time-stamps to the photo files itself and to the corresponding «SENSOR.CSV» files as well. When you do this before the import process of Vicon Revue Desktop, you keep the time information (not within Exif but) within the file names at least.

Usage

… as in v0.1 on 2012-03-23:

Usage:
         vksensecam-getphotos.py [options]

This script does has *two* different modes of operation depending
on the format of the given SENSOR.CSV:

MODE 1:
This script copies sensor data and photographs from a "Microsoft
SenseCam" or "Vicon Revue v1" device to your hard disk and:
   * creates a download folder on your hard disk
     like e.g. "/configuredpath/2012-03-23T21.18_SenseCam_data"
   * copies SENSOR.CSV and photographs to this download folder
   * add meta-data such as ISO time-stamps to the file names of photos
     like e.g. "2012-03-21T10.41.48_SenseCam_IR_00001810.JPG"
   * re-writes the SENSOR.CSV according to the new file names
   * stores original SENSOR.CSV as a backup
   * Note: EXIF meta-data of the photos is kept unchanged in the 
           photographs. Usually they are fine (reflect their exposure
           time-stamp and such).

No data is changed on the device itself! You can use other software
like Vicon Revue Desktop as well afterwards.

Example invocations on GNU/Linux or Mac OS X:
  vksensecam-getphotos.py --simulate    ... please use this if unsure!
  vksensecam-getphotos.py --verbose     ... to get all the noise details
                                            what is going on
  vksensecam-getphotos.py               ... this is all you need when 
                                            everything is set up

MODE 2:
If the given SENSOR.CSV is recognized having the format of an already
downloaded file (Vicon Revue Desktop changes date-stamp separator
characters to slashes), the tool assumes an already downloaded
data-set. In this case it does (in the same folder as the SENSOR.CSV):
   * rename photo file names like described above
   * changes entries in SENSOR.CSV according to the new file names
   * saves original SENSOR.CSV as a backup
   * Note: EXIF meta-data is already likely overwritten by Vicon 
           Revue Desktop before

Example invocations on GNU/Linux or Mac OS X:
  vksensecam-getphotos.py -f /path/to/sensorfile --simulate
             ... please use this if unsure!
  vksensecam-getphotos.py -f /path/to/sensorfile
             ... this is all you need when everything is set up

If unsure, please use the simulate option!
Basic configuration is done in the first section of the script.

  :copyright:  (c) 2012 by Karl Voit <[email protected]>
  :license:    GPL v2 or any later version
  :bugreports: <[email protected]>


Options:
  -h, --help            show this help message and exit
  -f PATH, --folder=PATH
                        (optional) override default folder for SENSOR.CSV
                        which is "/media/A295-005B/DATA"
  -v, --verbose         enable verbose mode
  -q, --quiet           do not output anything but just errors on console
  -s, --simulate        do not change any file on disk, just report what would
                        happen
  --version             display version and exit

Bonus-Tools

vksensecam-ls.sh

The short shell script lists the files which are “interesting” to the user:

  • images that were taken because of pressing the “take a photo”-button
  • images that were renamed from their original file name

This gives a quick overview over a set of SenseCam images if the user has already screened the images and renamed important image files.

vksensecam-openmanualfotos.sh

This sort shell script uses a command called “open” (exists on Mac OS X and can easily be done for GNU/Linux) to open all images that were invoked manually. If you close the image viewer, the next one opens.

This is very handy to quickly find and rename images which were shot on purpose - using the button.

Background Information

License

This documentation is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.

The script file is licenced under GPL v3 or newer.

vksensecam's People

Contributors

novoid avatar

Stargazers

 avatar

Watchers

 avatar  avatar  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.