Tuesday 26 February 2013

MODIS Image Processing Stream

A MODIS Image Processing Stream

Inputs:

  • MODIS mosaics (eg Arctic, Antarctic)
  • Data Flow?
  • Image granules from Rapidfire
Products:

  • Time lapse movies
  • Custom images/mosaics
  • Cloud cover masks
  • Motion vectors
Components

  • Data retriever, per collection (may require metadata collector)
  • MetaDatabase & Metadata producer
  • Cloud mask tool
  • Movie composer
  • Optical flow detector/filter
Currently:

  • Data retriever is a batch file/php for the arctic mosaic, and Watchdog/WatchFTP for granules. Good enough for now, but we need to have a tool to decide if new data should be downloaded and how.
  • Metadata producer/Database - nothing
  • Cloudmask tool - I have an R script that will process arctic mosaic tiles and create a fair result.  For granules, the MOD35-L2 product is available.
  • Movie composer, can be done with batch scripts with varying levels of sophistication using Imagemagick, Mapserver, gdal, and ffmpeg (also sed).  It would be useful to have a web front end for specifying and managing requests and products.
  • Optical flow detector/filter - combination of OpenCV and R at this point, could be batched but needs work.

Friday 22 February 2013

Canon A2300 Mount

Here is a simple mount for the Canon A2300 camera, constructed from an aluminum bracket salvaged from an old scanner plus a piece of angle bracket.  Weight is 186g, including the bracket, fixing bolt, camera and release cable.

I used some foam weatherstrip to pad the part that touches the camera, but I doubt it will reduce any vibrations between the bracket and the camera. 

Still to be addressed:  the connection to the airframe.  It would be interesting to use some sort of shock absorbing link there, not sure what would work...

Canon Camera Shutter Release Cable

Using a Canon handheld camera with the APM 2.5 looks to be an easy low cost method of collecting some aerial imagery.  We have a couple of suitable cameras to try out:

Canon Powershot A2300:  16MP, $100 at Walmart
Canon Powershot SD800IS:  7.1MB, $25 off Craigslist

Both cameras are supported by the Canon Hack Development Kit (CHDK) which adds two valuable features to these low cost devices:  scripting and a remote shutter release via the USB port.

The remote shutter release simply monitors the presence of a voltage on the USB power pin.  Following the instructions here, I made up a test cable using a battery and a momentary contact switch.  Testing with various voltages, it seems to need at least 4.1V to reliably trigger the shutter.
CHDK Remote Cable Test Rig W/4.8V Battery


To connect to the APM, we'll need to use one of the digital I/O pins (3.3V) as a trigger, with voltage supplied by the 5V supply pin.  Testing with the battery indicates that the current drain is negligible, so here is the circuit we came up with, based on a 4049 hex inverting buffer:
CHDK Camera Circuit
Here's the completed circuit, needs some strain reliefs, heatshrink, 
A small ceramic capacitor is bridged across 5V-GND as a buffer.  On initial testing, it works!  Next steps are to test with the APM and fine tune the scripting on the camera and autopilot.
Many thanks to my friend paulb for the expert advice, parts, soldering, and correction of errors.  I did, however, supply the beer.

Here is a discussion and some code for scripting the camera.