Archive

Archive for the ‘Software’ Category

Making Panoramas

May 9th, 2009 No comments

In my trip to San Francisco, I had the chance to see many beautiful things. And I wanted to be able to remember them and show them to my friends and family.

San Francisco Seen Form Twin Peaks Park

San Francisco Seen Form Twin Peaks Park

Besides taking simple photos, sometimes you need a wider view- angle to really capture the scenery. The obvious solution to this is making a panorama. This means you take many pictures of different sections of your subject and then align them and stitch them together so to form a bigger picture.

Many people believe this is a very difficult procedure and that the results are never as good as expected, and they are partially correct. In order to get a nice looking panoramic picture hat will align and stitch together correctly you need to follow some rules:

  • Make sure that contiguous pictures have a good 30% overlap between them.
  • Make sure the overlapping areas contains some hard object, like a building. If they overlap only over the sky or some water, then the stitching together will be more difficult.
  • Make sure you follow a simple pattern when shooting the photos. Follow a horizontal line, for instance, and shoot the pictures in order. Also, if your making a taller panorama, I suggest you shoot many horizontal lines that will stack up together. This will make things easier when recognizing which photos to stitch together.
  • Make sure all the pictures have a similar exposure. This should be no problem if you are shooting your pictures all at once.
  • Make sure your subject is always on the same focal plane. You can have many focal panes but it will make the stitching more difficult.

Once you have shot all the pictures you can start the stitching. In order to so so, you can use an excellent software package called Hugin. Of course since I’m using it, Hugin is open source and (thus) cross-platform. Is is a very intuitive program to use and since there are many good tutorials about it, I won’t be outlining the instructions on how to use it.

Once you stitched your images together (which can be done in the three steps the wizards takes you trough) you will end up with a big TIFF or JPG file.  Now you are basically done. Now you just need to crop it and made any desired adjustments with a picture editing program lie Gimp.

The only problem is that if you want to share this picture it can be hard since it may be too big for sending by email and will take a long time to (upload and) download if you put it on a website.

Now you can use the Google Maps Image Cutter. This little Java program developed by UCL enables you to use the Google Maps engine as a picture viewing system. It creates many copies of your image at various resolutions and chops those images into small square pieces. Then when you view the image trough the google maps engine, you are only loading the small squares at which you are currently looking at the resolution corresponding to your zoom level.

Here you can enjoy a few examples I made (click on the title to view them in full screen).

View code
Title: Downtown San Francisco
Description: A panorama shot from the Twin Peaks Park.
View code
Title: Downtown and East San Francisco
Description: A larger panorama shot from the Twin Peaks Park.
View code
Title: South San Francisco
Description: Another panorama shot from the Twin Peaks Park.

Keep in mind that Hugin is very powerful and can do much more than simply stitching a few images together. Also, there might be a few issues with the file writing routine when trying to run the Google Maps Image Cutter in Linux.

To WordPress from Blogger

April 17th, 2009 1 comment

I recently moved my blog from Blogger to an independently hosted WordPress installation and I needed to dynamically redirect the visitors going into the old pages so that the could see the new ones.

There are many tutorials on how to do this on the net but they usually involve fairly complex procedures and require modifying the Blogger HTML code and installing some plug-ins in WordPress. But, what I really wanted was a simple way of redirecting each blog post into its new version.

My solution:

I decided to write a little java script code that will do the job since it is a fairly simple task. All that is required to translate one of my permalinks is to strip the “.blogspot” part, and the “.html” part (see the example below).

Example:

Old address:  http://carlitoscontraptions.blogspot.com/2009/03/smoking-cyclops.html

New address: http://carlitoscontraptions.com/2009/03/smoking-cyclops/

The script:

<script type=”text/javascript”>

function redirect()
{
oldURL = document.URL;
oldURL = oldURL.replace(/.blogspot/, “”);
oldURL = oldURL.replace(/.html/, “/”);
window.location.href=oldURL;
}

window.setTimeout(‘redirect()’,5000);
</script>

This script consist of two parts: (1) a function that strips the unneeded parts from the current page URL, and (2) a time delay that executes this code after 5 s.

The only thing left to do is to insert this code into an HTML/Java script box in the Blogger layout editor and that’s it. No messy template edition required.

Categories: Project, Software Tags:

Arduino Launcher for the KDE menu

August 17th, 2007 1 comment

The Arduino software is good and works very well under Linux. Nevertheless, it doesn’t create a menu item when installed and it can be tricky to create one for those who are not very used to Linux (like me).

In order to add a KDE menu launcher for the Arduino software, open the KDE Menu Editor, create a new item and put

cd /opt/arduino-0007/; ./arduino

in the Command field. Also, make sure that Run in terminal is checked and replace /opt/arduino-0007/ by your own installation path.

I’m sure there are thousands of other ways of doing this (including many than only require a few commands in the terminal) but at least this ways is pretty simple and and can be done without knowing that much about Linux.

Categories: Arduino, Software Tags:

Nice Linux Software

March 18th, 2007 1 comment

Amarok
Forget about iTunes, and even Winamp. Amarok is the best music library organizer there is. I was a big fan of Winamp before now Amarok is my player of choice.

With Amarok, you can download album covers, lyrics, see songs related to the one you’re playing, have artist info from Wikipedia, submit player tracks to last.fm, keeps lots of stats about your songs, manage your iPod (and other portable players), subscribe to podcasts, burn CDs (through k3b), and many many other features.

Inkscape
Inkscape is a free vector drawing program. It is full of features, allows to create professional quality vector drawing and is really light. Really, amazing software.

OpenOffice.org
OO.o is the office suite you always wanted. Imagine an office suite where all the features work as they should. Where you can apply styles to your text and be safe to think the program wont mess it up by applying the formatting it thinks is right. Where you can do “advanced” page numbering (e.g. numbering only some pages while leaving other pages unnumbered for instance) without having to spend lots of time getting it right (if you ever manage to get it right). OO.o is all that and more (that I have not discovered yet).

For those wondering about M$ Office compatibility, I can say that Word compatibility is not that good, Powerpoint compatibility seems flawless, and I have not tried the rest.

Beagle
Beagle allows to index and search files on the computer. IMHO it is much better than Google desktop search. It searches inside almost every file type and even in rss feeds very fast.

Automatix
Although installing software on Ubuntu is quite easy (you simply select it in the package manager) some things may be slightly more tricky to install (such as nVidia drivers). Automatix allows you to install all the most popular programs with very few clicks.

VMware
Although you might be thinking that compared to all this, other mainstream OS seem useless and costly, they are sometimes necessary. For instance I need to use Photoshop, OrCad or SolidWorks (they have not released a Linux version for these programs yet) and sometimes (unfortunately) M$ word (if I have to write a text for someone who only uses M$ software).

There are many solutions for this situations: (1) using wine (which allows to natively run win apps on Linux, but compatibility is still poor), (2) dual booting (which is not very good since you have to restart each time you need to change OS), (3) using VMware (the best solution IMHO).

With VMware you can run any OS on top of Linux. The mainstream OS runs as fast (or just slightly slower) than its normal speed on top of Ubuntu on my system. VMware even allows to connect peripherals to the virtual machine so you can print or your an iPod for instance.
Note that many of these programs are cross platform so they work on other OS as well.

Categories: Software Tags:

More Linux

March 8th, 2007 No comments

The good thing about Linux is that it is light and manages the hardware well. This means that my computer runs fast nicely. This was not the case when I was running a commercial mainstream OS, my computer was so slow ans sluggish that i thought I needed a newer faster one.

Now I can run heavy applications such as Azureus without any trouble (before, I had to use Bitcomet since Azureus was really really excruciatingly slow). I can even run lots of applications at the same time fast and reliably.

Also, the startup time is pretty fast.

Desktop Environments

I thought Linux did not have any eye candy and that eye candy is heavy and makes your machine slow. Wrong. You can configure pretty much everything of the Gnome appearance. There are skins, wallpapers that support transparencies (PNG SVG), icons of any size you wish (PNG, SVG), nice transparent docks, etc.

For those who have a 3D graphics card (like me), there is Beryl. Beryls is truly beautiful. There are lots of screencasts on the net about it so I’ll let the video speak for itself.

Amazingly enough all this beautiful eye candy works on my computer pretty well.
For further and really extensive customization there is KDE. If Gnome is configurable, then KDE is the definition of configuration itself. Pretty much all the parameters can be easily changed through a GUI in order to obtain a desktop experience that fully suits your personal needs and taste.

Here are some extra screenshots of Nautilus (the gnome file manager) and Konqueror (the KDE file manager, FTP/SSH client, internet browser, image viewer and coffee machine). Notice the nice nautilus thumbnails, the function packed Konqueror and the tight integration between the KDE applications (e.g. Konqueror and Akregator).

Categories: Software Tags: