Sunday 31 January 2010

GPS Integration

The first tests with automatic GPS integration have been successfully conducted: while driving, a Bluetooth GPS provided the location. The database was extended to include location, speed, and heading as additional variables for each captured image. Right now the interface is not yet there for displaying or using those values, but I will soon work on it.

I disabled the automatic image capture and switched to a manual capture, which is triggered by an external numeric keyboard block. This allows me to quickly capture an image when I see a scene that may be worth capturing.

Tuesday 26 January 2010

Automatic Resizing

The PHP and JavaScript code of the image display component of this site has been modified to adapt itself automatically to the screen size. This can be seen on the main page where the very latest public captured image is shown: the image display part is using an IFRAME, and the size of this IFRAME is controlled by the size of the browser window. This IFRAME has a minimum width and a maximum width. The IFRAME is nested within a floating DIV; this allows the IFRAME to float under the sidebar in case the available browser space becomes too small for a horizontal display.

Within the IFRAME, a PHP script is launched which displays an image, filling the complete available width. This means, it is not necessary to specify this width anymore; the image will automatically be shown properly within the IFRAME.

The height of the IFRAME is partially controlled automatically: it is set by the enclosing parent which writes the IFRAME code, also based on the width. However, it is currently not adapting itself to the actual height of the IFRAME content; this means that the content (mostly determined by the image caption and description) may be further down, requiring the automatic display of a scrollbar in case the IFRAME is set too short.

Several elements on this main page are arranged as floating DIVs, allowing an automatic vertical stacking in case of a small display, for example on a mobile phone. I have tried this out on the MS Mobile Internet Explorer on Windows Mobile 6, and it works fine.

Sunday 24 January 2010

More Road Tests

Today I did some more tests with the capture system on the road, driving through Leeds. I had integrated GPS capture, where a Bluetooth GPS provided updates on location and speed. The initial recordings had an error in the scripts, but the latest run worked ok.

I also integrated a privacy flag, where the user can select to have the uploaded images stored out of the public view. This will result in the images neither being shown in the overview of all pictures nor in the individual latest image.

To do next:
I want to integrate Google Maps in the site, to show the locations where the pictures were taken. This is a major development which needs some work. Still on the agenda is of course to open the site to test users and allow accounts to be created.

First Road Tests

On 17. and 23. January I have carried out the first road tests of the software which goes along with this site: I mounted a video camera in my car and connected it to my capture software. This software then captured an image, based on the "difference" to the previous images. This algorithm simply compares pixel by pixel of two images and computes the sum of the absolute differences in each of the RGB channels. This sum is then divided by the number of bytes of each picture, resulting in a "normalised" value where 255 would be the maximum value.

It turns out that even when the image is not changing, there is an average noise change of 2 (out of 255), which means that the intensity of the captured light is fluctuating. This is to be expected, so a valu2 of 2 should not trigger yet any new image capture.

I did some very simple and only heuristic experiments: when the camera is looking from a static location at a scene which is basically not-changing, e.g. a group of buildings, then it takes in average about 5-10 minutes until the measured change of the value amounts to 10. This could warrant some more investigations into the statistics of the intensity change characteristics over the day. Naturally, the change of the sun's position will always lead to a change of the image pixel values over time, being dark at night and bright during the day, and also having colour shifts during morning and evening (more reddish).

When the camera is mounted in a moving vehicle, the changes are of course to be expected to me more drastically. There is, however, some constant pattern when driving on a road: the dark road surface ahead and the bright sky in the upper half provide some constancy in the overall image pattern.

When I experimented with the threshold of this normalised image change value, I found the value 40 to provide reasonable results: in cases of drastic changes, for example when turning into a new street, the image was updated frequently. But when driving steadily on a road, the image was not very often updated.

The setup used a shared internet connection through a Windows Mobile phone, so that the captured image could directly be uploaded to the server.

The web pages provide an overview on all captured pictures, as well as the image that was captured most recently.

Further plans: integration of GPS for position update, individual privacy setting for not giving public access to captured images, and multi-user logon to this site.

Wednesday 20 January 2010

About

The "Save My Tracks" website idea is already a few years old: I wanted to create a place where people could upload their GPS tracks and from where they could embed them in their own web site. I had made some early experiments back in 2007 and 2008, but never progressed the software to be installed on a public server.

In summer 2009 I decided to set up a site and reserve an appropriate domain name - but it took until January 2010 to have the first content on the site. However, this first content had only partially to do with what I had originally intended: instead of GPS tracks, I uploaded pictures. This was to test the capability of the software which I had written for automatic image capture and upload. It worked well, in conjunction with PHP (which handled the picture upload) and a MySQL database where the locations of the pictures were stored.

Currently there is not much on this site; I will post here on this blog details about the further development.