Friday, October 11, 2013

GNU for ARM bare metal toolchain installation on Ubuntu 12.04 LTS

Hi all.
Here I'm writing about installation of GNU arm-eabi toolchain on Ubuntu 12.04.

1. Dependency install (x64 system, do this with care)

 First, you need to install dependencies below. If you are using 64-bit Ubuntu, you should install ia32-libs for using GNU-arm binary for 32-bit compatibility. Also, several utilities for the future use, install following packages.

sudo apt-get install python-serial python-argparse openocd \
    flex bison libncurses5-dev autoconf texinfo build-essential \
    libftdi-dev libtool zlib1g-dev genromfs ia32-libs git-core wget

2. Toolchain download 

I'm assuming that you will install toolchain in your home directory.
I prefer to download built binaries because there is no specific reason for
compiling compiler on the machine (also takes long time!).

You can select whatever version from https://launchpad.net/gcc-arm-embedded/
But this is know-to-work version in my case.

I'm using "axel" for faster download. It makes several download task simultaneously, utilizing multi session download.

sudo apt-get axel
cd ~
axel https://launchpad.net/gcc-arm-embedded/4.6/4.6-2012-q2-update/+download/gcc-arm-none-eabi-4_6-2012q2-20120614.tar.bz2
tar -vjxf gcc-arm-none-eabi-4_6-2012q2-20120614.tar.bz2
exportline="export PATH=$HOME/gcc-arm-none-eabi-4_6-2012q2/bin:\$PATH"
if grep -Fxq "$exportline" ~/.bashrc; then echo nothing to do ; else echo $exportline >> ~/.bashrc; fi
source ~/.bashrc

3.Installation check
$ arm-none-eabi-gcc --version

You should see following message.

arm-none-eabi-gcc (GNU Tools for ARM Embedded Processors) 4.6.2 20120613 (release) [ARM/embedded-4_6-branch revision 188521]
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Friday, October 4, 2013

About Speeded Up Robust Features (SURF)

I recently started to implementing SURF for my visual SLAM project.
During exploration of algorithm implementation, I found many projects that well implements the original idea by Herbert Bay et al.
Whatever modern feature descriptor you are using, most scale-invariant feature descriptors output sequence of floating numbers that encodes given image patch.
Along with the vector of descriptors, scale, detected octave are also important variables for the feature.

In this article, I'll explain what is the *scale*.

The scale is a scalar variable describes the width of Gaussian kernel which roughly gives an idea of distance of feature.

In case the OpenCV, the scale can be obtained as follows.
The KeyPoint structure, let say kpt, has a member variable 'size' which the number represents the size of the patch. To obtain the filter size, use std::sqrt(kpt.size).

In the original paper, the smallest filter size is 9x9. So the scale will be

   scale = 1.2 * ( filter_size / 9 )

[Links]

  1. http://experienceopencv.blogspot.kr/2011/01/surf-detector.html
  2. http://www.computerrobotvision.org/2010/tutorial_day/tam_surf_rev3.pdf