Personal Blog

    Artículos publicados por lipman

    After reading no more than 10 pages of a new chapter of my new book, a basic and problematic thought came to my mind. First of all, I was thinking about how modern object recognition algorithms work. They are hazardously based on statistics which may or may not work depending on training samples. Regardless of the classifier used, which may be SVM, K-means, NN, etc, they all end up separating a hyperspace through a hyperplane to later let the user or the corresponding algorithm differentiate and draw certain conclusions. As far as I know, this is the general idea of how classifiers work, despite refined techniques to improve results such as boosting or cross-validation, to mention just a couple of examples.

    Therefore, I was thinking about the perfect way to recognize (classify) objects having a look, as it is usual in engineering, to the nature: how it works in humans. Let us say that I want a machine to learn how to detect a pen given a picture. Let us not go in depth into certain intricacies such as the size (proportion), number of pens, orientation or color (I am being extremely optimistic). A pen, as any other object have some features that we can enunciate, mostly based on its contour and texture:
    -Rectangle contour (or cilindric in 3 dimensions)
    -Pointy end (part that we use to write)

    Even if we somehow are able to mathematically model that information (optimistically), let us not forget that that features may correspond to thousands of different objects in the world. How do we know then that we have a pen in the table rather than a chopstick? Here comes the key: environment. We will probably find a pen in an office and a chopstick in an Asian kitchen, and when I say probably that means that statistics are inevitably needed.

    The question now is: how do we know we are in a kitchen or some other place? You only need to imagine that you have a button which can randomly teletransport you into any room of your house. After you open your eyes and analize every object in the room, you will be able to make a very accurate guess. But how can you distinguish or classify objects if you previously have no information about where you are (environment)? Here is the paradox.

    A clever guy could have realized that not always it is needed to analyze every single object to know where you are. In case of your bedroom, you may think that the most important object is the bed. Thus, after detecting this element you have an environment and you can continue recogning objects. Nonetheless, in spite of this new conclussion that we can recognize an environment given certain recognized objects, many unanswered questions come to my mind:

    -What if we have just a partial image which does not include any crucial recognizable object to learn about the environment?
    -Is it possible to model any environment? (how do you realized that you’re floating in the space or relaxing in the countryside)
    -What if those crucial recognizable objects have common features and tend confuse our algorithm?

    It is not especially hard to come up with innumerable questions like those.

    This is not even close to the super cool Japanese Robo One robot competitions, but close enough. Sumobot competitions consist of a duel between two robots which have to push each other to make the other leave the arena. There are some specifications that must be followed such as dimensions and weight among others, but the rule is simple: the other robot has to leave the arena.


    The arena is basicly a black circle within a white margin. This white margin is important because it will help the robot to know where the boundary is.


    In our class we are using these robots which you have to build them up using components you can see there, called Sumobot. I would like to remark the most important parts:

    • 2 Servo motors
    • 2 Infrared LEDs
    • 2 Infrared readers
    • 2 QTI sensors (to detect the boundary)

    By default, if we follow Sumobot’s instructions, we would use its serial port to transfer our programs to its core, but we’re using instead an AVR Butterfly (ATMega 169).

    Servo motors are connected to timer counter 1 pins (ports PB5 and PB6) which will output the corresponding signal to make the wheels move.
    QTI readers and Infrared readers are connected to other pins (PB0, PB1, PB2 and PB3). In case of QTI readers, when they detect white, the pin will be set to zero, otherwise it will be set to 1. In case of Infrared readers, when they detect an obstacle, the pin will be set to 0, otherwise it will be set to 1.
    Infrared LEDs are connected to timer counter 0 pin (port PB4) which is set to a frequency of 38.5 KHz. This frequency is not arbitrary since the Infrared reader is only able to properly read reflected infrared signals under that frequency.

    Here we can watch several videos about how it works

    Here I show my complete library that hopefully will increase with the pass of the years. Anyway, many books are missing, specially novels (since I’ve read a Kindle version or a borrowed them).
    Computer Science / Programming

    Computer Science / Programming

    Creación de sitios web con PHP5 (Development of web sites in PHP5) CSS3 CSS, DHTML & AJAX Javascript
    Programación en C: metodología, algoritmos y estructura de datos (C programming: methodology, algorithms and data structures) Análisis forense digital en entornos Windows (Digital forensic analysis in Windows environment) Hacking con buscadores: Google, Bing & Shodan (Hacking with search engines: Google, Bing & Shodan)


    Más rápido que la velocidad de la luz (Faster than the speed of light) Crónicas de los átomos y de las estrellas (Chronicles of atoms and stars) Alicia en el país de los cuantos: una alegoría de la física cuántica (Alice in the land of quantums: an allegory of quantum physics) La partícula divina (The divine particle)
    El significado de la relatividad (The meaning of relativity) Introducción a la astrofísica (Introduction to astrophysics)


    Grafología (Graphology) El rostro y la personalidad (Face and personality)


    A Guide to Japanese Grammar: A Japanese approach to learning Japanese grammar Essentials of Swedish Grammar: A Practical Guide to the Mastery of Swedish


    El juego de Ender (Ender’s game)


    Vivir de luz (Living on light) Un geek en Japón (A geek in Japan) Fronteras de lo imposible (Borders of “the impossible”)

    1.1.-Quick Description
    1.2.-Why this Home Media Center is so cool?
    1.3.-Video Presentation
    2.1.-First steps
    4.-Skills acquired


    This is my Final Project Work (a project we have to do when we finish our bachelor). One of the reasons why I chose this to be my project was because I wanted to develop something that you can use. As I like theoretical stuff, it would have been interesting to invest my time researching about some nice topic, but actually, it wasn’t 100% up to me because since I’m doing an exchange abroad, I need to get credits in my home university and we all decided the topic of my project. Still, I’m quite happy with the results because in the end I could develop something interesting, I could use some knowledge I had about the topic (and some code) and, of course, I learned.

    1.1.-Quick Description

    I developed a HMC (Home Media Center) which is able to play media files using a Raspberry Pi as a server.
    After you install the script in the RPi, you can directly plug the TV cable to it and start using it. It can read USB devices and shared folder across the network.

    1.2.-Why this Home Media Center is so cool?

    Well, it’s not so cool, and the GUI has to be improved (//TODO), but I developed something I didn’t find in other home media centers. I’m using a wireless dongle which is connected to the USB port, this way, the RPi can check wireless networks and connect to them as well. This is really convinient since not all people have the TV screen next to the router, so it’s more clean and comfortable to use wireless technology. Anyway, depending on your wireless dongle and router (and in general, the wireless conection quality) you will be able to play some certain files depending on the bit/s needed to play them. If your router and the Pi are very far, the connection quality will be poor and not high definition files will be able to be played.

    Didn’t you understand? In a few words: you can have your Pi connected to the TV and your router, and play files located in any other device in the same network.

    This three diagrams will ilustrate better what you can do:

    We can actually make more complex diagrams such as connecting a switch to the RPi and so on. This is really flexible.

    1.3.-Video Presentation

    Slides: Download


    In a few words: Install Raspbian and update it, download the code and run Finally, change some settings and reboot it.

    During the installation process it will ask us twice (or three times actually) for a MySQL password. Please, write root. The first and second time you will write this will be when installing the database itself (password and confirmation). The third time will be when updating the database. If you don’t write root, the webserver is not going to work because it assumes that that password is root.

    ~$ sudo apt-get update -y && sudo apt-get upgrade -y
    ~$ wget
    ~$ unzip
    ~$ cd hmc
    ~$ chmod 777
    ~$ sudo ./

    After this is finished, now we need to not get any pop up when inserting an USB device. For this, it is needed to go to the file manager (next to the Start button), in to the toolbar click on “Edit”, “Preferences”, go to “Volume Management” tab, and uncheck “Show available options for removable media when they are inserted”. For the future, this will be done automatically in the file.

    Finally, we need to reboot it.

    2.1.-First steps

    First steps


    As a good open source project has, I made a wiki which will be updated every time I modify or I need to clarify/specify something about the project. I think it’s the best way to fully explain how the system works and therefore encourage more people to use it and modify it. I tried to explain it as clear as possible and keep it simple.

    Here is the wiki:

    Anyway, if you have any question, you’re free to ask me.

    4.-Skills acquired

    After I developed this project, I acquired and improved some skills I can proudly announce:

    • Introduction to Python.
    • More experience developing and designing web pages.
    • More experience with shell script.
    • Better understanding about Linux (startup, services, processes, …).
    • More experience about development methodologies.
    • Software testing.
    • Maintenance of a Wiki web page.


    Do whatever you want except selling it or any part of the code. This project is intended to be free and open for everybody, so people can see the code, learn, and more people can download it.

    During my epic trip to Poland and Czech Republic with some friends an incident happened. At the half of the trip I realized that there was something wrong with my Kindle screen, but I didn’t know what was going on with it. I was thinking that probably the problem is that’s broken, but I wasn’t sure at all and I tried to restart and reset a couple of times.

    When I arrived at home, I tried to find pictures of a broken screen Kindle, and it was definitely that. Now I know how a broken screen looks like.

    Broken screen

    I bought this Kindle around 4 years ago, and I liked it very much, even more than this non-keyboard version Kindle that we can see nowadays, so I didn’t want to buy a new one which is actually more expensive than repairing my old one. I was afraid because I haven’t opened any device like that before, but there is always a first time for everything, and the time came. By the way, nowadays I think we can buy a new Kindle for less than 100€ and I paid around 250€ for this one (it was expensive because it came from the US and I had to pay very high taxes).

    Anyway, I found a screen replacement in eBay and it cost around 30€ and one month to arrive. After open the Kindle I realized I need a very small screwdriver, so I ordered a this kind of screwdriver from the Internet and another month I had to wait!

    Replacement. Thanks God the instructions were there.

    As I’ve never done this before, I was afraid and I searched a tutorial, and here it is: but actually, it’s basically this: remove screws, change screen and put them back. Actually, I can say that the most difficult part was putting on and off the plastic case. It’s very difficult and you have to be very careful.

    Different parts of the Kindle.

    One particular part where we have to take special care is then removing those things I marked using red color. We have to lift them up and pull back that thing they have inside. It looks like paper.

    When I fully disarmed my dear Kindle, I could see that the screen was broken indeed.

    Kindle broken screen, how it looks like from inside and outside

    I had a very stupid problem I want to write about, so if you ever do this, charge your battery at first! When I did this the first time, it looked like it didn’t work, so I put the broken one again. After this I realized that the battery was empty, so I charged it and did it again, and

    Kindle working again, aka orgasm