Showing posts with label programming. Show all posts
Showing posts with label programming. Show all posts

Monday, February 25, 2008

Finally: Webcam working

On the PC in my office, there was a problem with prohibited for a long while the setting up of a web cam, but now I finally got around to fid this problem. The web cam is installed and provides pictures every minute. The latest one is here:



About a year ago, I did run a web cam from my laptop, using a software EasyFreeWebCam. Never mind the slightly sleaze applications being advertised for use of this software... I had done a few comparisons, and this software seemed to provide the most customisations. I wanted to set up the software to automatically upload a captured picture onto our web server. However, for some reason this did not work on my office PC but only on my laptop computer. A while I had this running on the laptop, but then I needed the laptop for other purposes, and I wanted to run the webcam also over night.

Today I finally came to revisit this problem. I tried a couple of other capture software packages - none of them worked with the specific situation on my PC. No idea what the problem is. WS_FTP works fine, I can access the web server from this PC. But none of the automatic ftp uploads worked, although the firewall was configured with exceptions to allow uploads.

So what I did today: I wrote a small software in good old MS Visual Studio 6.0, using MFC, for timer-triggered upload of a file onto an ftp server. Works just excellent! The video capture software captures an image every minute and stores it locally. Then my software runs constantly and uploads this file every minute to the ftp server. From there, the web page is configured to reload and show the image every minute, so that always the lastest captured image is shown. There is an inherent potential maximum delay of 2 minutes - but this does not really matter.

The website with the live update also has a Google map on it - I will keep experimenting a bit with it, related to other projects that I am currently working on.

Tuesday, July 17, 2007

Blogs - and Widgets

Blogging is a great way of publishing. I am aware that two of my students have blogs, in which they report on their progress of their PhD work and their activities related to it:

Monika Andergassen's work is about blogging and its use in learning and teaching context.

Johannes Christian's work is about Augmented Reality in an industrial environment.

It is a great idea to publish such a blog: it can be used to link to the international research community, and also to update the supervisor about project progress.

In order to view these blogs conveniently, I have installed a Yahoo Blog widget: First I needed to install the Yahoo Widget Manager, which makes widgets available on the desktop of my computer. Then I installed the Multi RSS Feed Widget by Matt Heidenreich - this allows to have the feeds on the desktop being automatically displayed.

One problem I noticed with this: the date of the blog post somehow gets deleted when I click on individual posts. This is ok when going directly to the blog page, but when looking at the posts through the widget, there is no date shown.

But otherwise, this widget works, and now I can see at a glance what is going on.

I would recommend this type of interaction between students and supervisors who are working at a distance. This method allows to stay in contact and up-to-date, even across different time zones. I will recommend it to all students in whose supervision I am involved.

Tuesday, June 05, 2007

Software for Geo-Tagging

The past few weeks I have stopped uploading pictures to Flickr, because I wanted to geo-tag them before the upload. The tools on Flick for Geotagging are a bit lame: the map takes forever to load, and the whole interaction process seems to be very slow.

Therefore, I have written a software for geo-tagging JPEG pictures: the web page with a download link is on my personal site. You are very welcome to download it and test it. It requires you to install the .NET framework. The software uses Google Maps to do the Geo-Tagging. It also allows to edit a number of other tags.

One feature which I have not seen anywere yet is the possibility to indicate the object location, in addition to the camera location. A triangle, overlaid onto the map, indicates the viewing angle and coverage of the image.

There are plenty of things that can be added into the software: integration of Google Earth / Microsoft Virtual Earth for 3D interaction, and reading of GPS log files for more or less automatic geo-tagging. If I have time, I will work on these topics.

Wednesday, May 30, 2007

C#, .NET, Visual Studio 2005 Express

Last year I taught as a tutor in Alan Crispin's courses "Computer-Based Applications" and "Computer-Based Graphics", which were my first introduction to C#. All these years before I had used C / C++ for all my software development activities: starting in 1990 with the conversion of road tracking software from Pascal to C, then developing new components with ANSI C for a transputer-based cluster. In 1996 I switched to Microsoft's Visual Studio and familiarized myself with C++ and the Microsoft Foundation Classes (MFC). Quite a useful API for programming under Windows - I enjoyed creating ActiveX controls, and wrote a set of classes which allowed me to quickly develop software projects. I stayed up to date with updates for the Visual Studio (VS), but when the Visual Studio .NET came out in 2002, with a further update in 2003, I was not very impressed. Code development seemed much slower and more cumbersome in the .NET version, and I remained faithful to the old Visual Studio 6.0 and its latest service pack #6.

Here at Leeds Met we have site licenses for VS.NET 2003, and due to the requirements for the course I had to make the switch. But then, new versions came out, and Microsoft offered on their website Visual Studio 2005 Express editions, free of charge. After I had installed the Visual Studio Express for C# and also the .NET Framework. The latter one comes in varios versions: 1.0, 1.1, 2.0, 3.0. In order to stay compatible, I installed them all, starting with the oldest version. There are also service packs available - which I installed too.

Working with Visual Studio Express is actually very nice: the IDE supports many tasks, provides quick help. Variable names are automatically completed, methods / properties of classes can be completed automatically. Since I did not know much of the internals of C# and the .NET framework, I often used the built-in help, accessing MSDN either locally or online.

The .NET framework is quite powerful. A really big step forward over MFC. When writing with MFC, I had to write a lot of code to get a simple task done. With .NET, often just a few lines do the trick.

I am now in the process of rewriting most of my previous work / classes / modules into C# and .NET. I think that this framework will stay around for a while - its potential has probably not yet been exploited to its fullest by the software developer community. Excellent classes, with lots of encapsulated functionality. In most cases I just need a small fraction of that functionality - but it is good to know that it is there.

And interesting is that the whole software development kit is free. No need yet for me to purchase a full version of Visual Studio - the Express edition works just fine. Maybe I will eventually find a weak point, but currently I will stay with that platform. Many thanks to MS for making this software available!

Big applause to Microsoft also for their support of XML - this is going to have a big impact in the Open Source community.

My current software development project: a tool for Geo-Tagging JPG images.