Cheap Head Tracking

April 4th, 2009

I did a very simple lasr cut PVC frame where you can place your infrared LEDS.

It’s a simple 3 point model cap as the lego one:

You just need:

  1. wires
  2. 1 switch
  3. 2 AA batteries
  4. 3 IrLEDS (I used 100mA ones)
  5. any support (I used mine)

If you are lazy to make one you can buy one from my website:

http://shop.robomotic.com/

To find other distributors go here:

http://www.pixelpartner.de/openKMQen.htm

Lego Head Tracking

April 2nd, 2009

Do you have a lego mindstorm NXT?
Do you want to play videogames using optical motion tracking?
This the idea I just had yesterday when playing with my robots.

What you need:

  • 3 lego nxt light sensors
  • 3 lego nxt cables
  • lego nxt core
  • a webcam which doesn’t have an IR optical filter OR a nintendo wiimote
  • a floppy disk
  • free-track software for windows

How it works:

the lego light sensors emits light in the visible and infra red spectrum
this 3 beams are captured by your camera
the coordinates of the 3 dots are used by the software free-track to estimate the player position
the head position is used in the game to look around

How to build it:

I used a 3 point cap model: build a triangle structure as in figure 1. I did it in such a way that you can attach it to a sport cap.

If your camera has ann IR filter you are in big trouble but you can still remove it as described here.
If you have a camera without an IR filter you are very lucky: open a floppy disk and remove the magnetic disk. Cut it and pose it in front of the camera lens as in figure 2.

Measure the distances as in figure 3 and insert them in the free-track configuration.

The Free-Track configuration can be downloaded from Free-Track configuration to use with Lego Head Tracker.

Write a simple program for the lego nxt that switches on and off the sensors when the user hold down the contact sensor. The simple program in NXT-G can be downloaded from Lego Nxt program

You can also use RoboRealm to track them:

The RoboRealm configuration file is Robo Realm script file.
And now enjoy your game!

If you are lazy to make one you can buy one from my website:

http://shop.robomotic.com/

To find other distributors go here:

http://www.pixelpartner.de/openKMQen.htm

PHD job available in our lab

November 12th, 2008

PHd position available in
Location: University of Glasgow, Scotland
Rankine Building, Engineering
Website application form available here

Phd is funded by GRPe which is a joint venture of industries and universities, official page is here.
Topic: computational neuroscience\biophysic
Requisites:

  • bachelor degree in one of the following: engineering, physic, math, biology
  • excellent programming skills in C\C++
  • numerical methods for equation solving
  • intermediate english knowledge
  • optional: cable and compartmental neuron models

Payment: 1078 pounds x month (tax free) funded by GRPe
Optionally: living expenses included
Nationality: EU\UK

Email me for more info
epokh [AT] elec.gla.ac.uk

Example of some previous research:

http://www.epokh.org/blog/?page_id=23

Lego NXT indoor security SMS

October 3rd, 2008

This is a first prototype of a secubot that monitor my room: it controls with its ultra sound sensor if the door has been opened and sends an sms to my mobile phone.
The first version works like that:

lego nxt turtle [sensors and filters] <—- bluetooth —–> python nxt interface —-> sms gateway

The firmware is the original lego and the connection is managed by python nxt libraries and it works perfectly on linux/ubuntu (for more details on the installation just go here).
The distance sensor output is  filtered to avoid false alarms (it’s basically a 4th order band pass FIR filter).
The second version I’m working on is made like this:
lego nxt turtle | nxc program bluetooth interface< —-> bluetooth <—> mobile phone java application

the mobile phone is inside the turtle and so you don’t need internet to send sms notifications.

The is sentinel-cvs extracted from my CVS which I will set up later on.

P.S.
I used intellisoftware sms gateway but you can use your own sms gateway, if you want an account to my quebby messanger system drop me a comment.

GRP-E Conference

September 22nd, 2008

Joint Research Institute (JRI) in Electronics, Communications and Power Systems:

Electronic and Electrical Engineering

Glasgow and Strathclyde Universities

The Glasgow Research Partnership in Engineering (GRP-E) is a major programme of investment in collaborative research involving the Scottish Funding Council and the four universities in the West of Scotland. The GRP-E in Engineering aims to build world class research capability under three Joint Research Institutes (JRI), one of which is the JRI in Electronics, Communications and Power Systems.”

Poster A0 for the GRPe conference

Poster in A1 format for GRPe conference

portrait poster for GRPe

Reversing TinEye

September 15th, 2008

TinEye is an indexing engine made for finding images.
It’s actually indexing 901 million images and the retrieval time is quite fast: for the popular Lenna image in ( 512 × 512 pixels, file size: 463 KB, MIME type: image/png)

233 results
searched over 901 million images in 1.031 seconds

What algorithm make the search so efficient? Of course doing it in real time is not possible therefore the engine compare the submitted image with the database of signatures/hashes built by the tineye robots/crawlers similar to what google does with web pages.
I’ve done some experiments with the tineye search engine to estimate what features the hash function uses to compare images.
The sample image used (JPEG image, 980×306, 221.5 KB) is from emirate arabs and it’s indexed uniquely by tineye (there are indeed 20 images but they are all equal: same website with different languages).

20 results
searched over 901 million images in 0.138 seconds

The comparison signature is investigate taking the original image, processing it and submitting for search. The first approach is in the space domain and the second one in the frequency domain.

Space domain analysis

For the space analysis on the left there’s the applied filter on the original image and on the right there’s reported the number of results reported by tineye.
Gaussian noise 10×10 pixel : 20 results
Gaussian noise 15×15 pixel : 12 results
Gaussian noise 20×20 pixel: 0 results
Gaussian noise 50×50 pixel: 0 results

Pixelize 4×4 pixel: 20 results
Pixelize 8×8 pixel: 12 results
contrast 60%: 20 results
contrast 90%: 12 results
contrast 100%: 12 results
linear color mapping: 0 results
exponential color mapping: 12 results
double exponential color mapping: 0 results

dilate 1 pass: 20 results
erode 1 pass: 12 results
erode 2 pass: 12 results
sharpen 50 pixel wide: 20 results

Flips

Flip horizzontal: 0 results

Flip vertical: 0 results

Rotation

1 degree rotation: 20 results
6 degree rotation: 20 results
90 degree rotation: 0 results

Cropping

original image size 980×306

crop1 512×304 rel=51.90% Yes 22
crop2 369×304 rel= 37.41% Yes 22
crop3 237×150 rel=11.85% No
crop4 190×222 rel=14.06 % No
crop5 225×306 rel=22.96% Yes 3
crop6 225×215 rel=16.13% No

colorize

hue 200
saturation 30
light 0
Yes 12

theta1
threshold 205 to 255
No

sobel filter: 0 results

It’s very surprising to see how the hashing function isn’t robust to rotation and mirroring.
My guess is that the comparison function is based on different measure of the image, a possible guess:

  • color statistic
  • image segmentation
  • frequency domain (maybe)

and using a bayesian classifier to guess if the image is similar or not.
Why frequency domain? Because the horizzontal flip swaps the FFT coefficients (along the vertical axis) keeping nevertheless the histogram of the image equal and it tineye is insensible to it.


Indeed using a low pass filter in the frequency domain gives still positive results even if the histogram of the image is changed. I’m investigating different filters at the moment to discover more (please be patient I don’t have so much time at the moment)

Frequency domain (high pass)

I’m using an high pass filter to check if the hash take into account higher frequencies which the human eye can’t perceive. It seems that tineye consider them because I got positive results even with different histograms.
FFThigh pass 1
down to 100 pixels
up to 0 pixels tolerance 5%
12 results
fft high pass2 down to 10 pixels up to 0
12 results
fft high pass3 down to 2 pixels up to 0
12 results

Entropy

I recently discovered that the tineye doesn’t compute the signatures if the image has a low entropy: quite interesting.
For instance an image with an entropy of :

  • 0 bit
  • 1 bit

is not accepted for the hashing

Assisted computer learning: is it effective?

September 5th, 2008

I would like to asess how much efficient is to learn a foreign language using a software training program based on the approach trial-and-error. There are many scenarios where assisted learning could be executed by intelligent non-human agents: think about the most basic gym machines which guides you to achieve the correct push up or the recent golf swing assistant. The question is what a social agent ads more in term of quality in this kind of learning schemas?
The software I’m using is an open source training game for nintendo ds “JDS project version 1.30″ that teaches you the japanese writing system.

Project JDS is a tool to help you memorize the different Japanese ‘alphabets’ or hiragana and katakana.

What’s in it?
- Romaji (latin letters) to hiragana
- Romaji to katakana
- Hiragana to katakana
- Hiragana to romaji
- Hiragana writing
- Katakana to hiragana
- Katakana to romaji
- Katakana writing
- Voiced sounds
- Pronouncation of each character
- Select specific sets for learning
- Number of strokes of each character
- Animated stroke order
- Stylus operated
- Help
- Progress score

This program has recieved many good reviews and a huge donation for cancer research.

Training sessions are conducted by a subject (me) which had no previous exposure to japanese language.
The subject is 25 years old and had no previous knowledge whatsoever of asian languages. Training sessions are done every day and reported on this blog every week.

Day 1:

Katakana to Romaji (3th column: Ra RI RU RE RO):
90/100 correct and execution time 4 minutes
Katakana writing:
26/32 correct and execution time 5 minutes

Day 2:

Katakana to Romaji (3th column: Ra RI RU RE RO and 4th column Ya Yu Yo):
96/100 correct and execution time 5 minutes
Katakana writing:
xx 26/32 correct and execution time 5 minutes xx

Robot and business

August 19th, 2008

I made a question to myself: what kind of sectors in robotic are profitable nowadays for a researchers?
I came up with the following list:

  • classical robot industry: assembly on production chains and heavy work assitance
  • remote controlled application (UV=unmanned vehicle):
    • UV for the army: spy drones
    • UV for oil pipe inspecction
    • UV for space application: exploration and repairment
  • house surveillance and security
  • domotic: cleaning and assistance (i.e. food and medicine)
  • hobbyst: the well know robotic kits, the most popular is the lego kit
  • entartainment: animatronics and android like agents

Cybernetic prosthesis and awareness

August 10th, 2008

Human have been using prosthesis from long time ago. The first complex prosthesis being developed were the glasses (whose inventor is still a dispute). Artificial limbs are even older : egyptians used them to restore walking ability to amputed workers.

Artificial implants became more integrated in the human body as our knowledge increased: from the contact lenses to the cochlear implant. The cochlear implant is one of the first device that directly produce neuronal signals into the cochlear nerves. It’s amazing if you think about it. The more we go in the periphery of the body the more the electrical signals are easy to reproduce. A german company called Otto Bock, recently managed to restore full gait to a patient with full spinal cord injury embedding a transmitter and a receiver to bypass the spinal rupture (photos from the fair in Germany).

Artificial retinas are also in a good state of implementation. The problem is that: where is our identity?

The brain is a neuronal network as well as our sensor-motor network. Cybernetic principle of the embodiment tell us that our “self” is the “controller” in the closed loop. We produce neural output and sense neural input. One could say: oky the brain is the central processing unit and if you touch it you loose your identity. But think about patient with some brain injuries\malfunctions: amnesia in any forms, corpus callosum removed patient (the well known syndrome alien hand) or with cortex disorders (schizophrenia) and many others. If I loose part of my memory, am I still me? If i loose one part of my brain am I still me?

If I transfer a body atom by atom into another location, I’m still me?

This questions are very hard to answer because we don’t know our boundaries and how self-awareness is implemented into the brain. Mirror neurons are an answer only for imitative learning.

Will we find the part of the brain responsible for sel-awareness? Or it’s just our memories, encoded as echo states into the brain?

Cibernetica sociale

August 8th, 2008

Sveglio. Che ore sono? Non importa, so cosa devo fare: controllare i risultati del simulatore.

Sono due dannate settimane che ci sto lavorando, un mondo virtuale con agenti intelligenti che devono nutrirsi da risorse condivise.

Come possono organizzarsi, come può emergere un ordine da questo sistema caotico dove ogni agente apprende costantemente

e si comporta in modo non predicibile? Ho bisogno di zuccheri altrimenti svengo sono giorni che non mangio in modo decente.

Vado in cucina, un disastro, apro il frigo e afferro la bottiglia del latte. L’odore non è così allettante, deve essere scaduto.

Mi vesto di fretta e furia, esco di casa: la luce è accecante, mi abituo dopo pochi minuti. Mi trovo a disagio: è questa la realtà, sembra

tutto così artificiale, sto ancora sognando? Esco da Kelvinway e mi dirigo al negozio di alimentari più vicino. Devo attraversare la strada e allora prenoto il semaforo, le macchine al segnale si fermano e attraverso. Un evento normale e banale, ma certo! Un segnale, il rosso una convenzione, e l’autista si ferma.

La chiave è nella comunicazione intenzionale: ho voluto attraversare la strada ma prima ho comunicato la mia volontà attivando il rosso.

Questo mi ha reso più predicibile, e l’autista in base alla sua esperienza sa che deve fermarsi. Entro nel negozio compro un po di frutta, e mi sorprendo ancora: una fila ordinata per pagare alla cassa. L’ordine è così evidente. Dopotutto è vero, comunichiamo per ridurre l’entropia. Che follia! Ognuno nel suo ruolo, predicibile e prevedibile. L’uomo non ama l’incertezza, e la società è il prodotto di questo desiderio. Penso ancora al mio sistema caoitco, ora è chiaro dove devo andare a parare: la comunicazione.