Bootloading an ATmega88 for Arduino [w/ code]

Just wanted to put up a small tut on how to put an Arduino bootloader on an ATmega88.

I very roughly followed: 
http://www.ladyada.net/learn/avr/avrdude.html
And 
http://itp.nyu.edu/physcomp/Tutorials/ArduinoBreadboard (Although they make it way too complicated)
And ATMEL's datasheet for ATmega88 is also very good to have open at all times: 
http://www.atmel.com/Images/2545s.pdf

First, put everything on a breadboard: (This took me a while... Thanks D.Mellis and M.Feldmeier!!)

(Fritzing is awesome)
Continue reading "Bootloading an ATmega88 for Arduino [w/ code]"

Share

Online places to buy hardware

Hi
I always strive to be more open with my knowledge, so I decided to publish more posts of lesser "scientific" value and more just helpful stuff in various domains.
This time I want to share a list of website where you can purchase hardware for hacking and building.
Many are unhappy with the one-stop-shop Mc. Master-Carr and looking for an alternative. So here is what I found:

That's it!
Roy.

Share

Structure from Motion and 3D reconstruction on the easy in OpenCV 2.3+ [w/ code]

Hello
This time I'll discuss a basic implementation of a Structure from Motion method, following the steps Hartley and Zisserman show in "The Bible" book: "Multiple View Geometry". I will show how simply their linear method can be implemented in OpenCV.

I treat this as a kind of tutorial, or a toy example, of how to perform Structure from Motion in OpenCV.
See related posts on using Qt instead of FLTK, triangulation and decomposing the essential matrix.

Update 2017: For a more in-depth tutorial see the new Mastering OpenCV book, chapter 3. Also see a recent post on upgrading to OpenCV3.

Let's get down to business...
Continue reading "Structure from Motion and 3D reconstruction on the easy in OpenCV 2.3+ [w/ code]"

Share

Simple Kalman filter for tracking using OpenCV 2.2 [w/ code]

Hi,
I wanted to put up a quick note on how to use Kalman Filters in OpenCV 2.2 with the C++ API, because all I could find online was using the old C API. Plus the kalman.cpp example that ships with OpenCV is kind of crappy and really doesn't explain how to use the Kalman Filter.
I'm no expert on Kalman filters though, this is just a quick hack I got going as a test for a project. It worked, so I'm posting the results.
Continue reading "Simple Kalman filter for tracking using OpenCV 2.2 [w/ code]"

Share

Download all your Last.fm loved tracks in two simple steps

I'm a fan of Last.fm online radio, and I have a habit of marking every good song that I hear as a "loved track". Over the years I got quite a list, and so I decided to turn it into my jogging playlist. But for that, I need all the songs downloaded to my computer so I can put them on my mobile. While Last.fm does link to Amazon for downloading all the loved songs for pay, I'm going to walk the fine moral line here and suggest how you can download every song from existing free YouTube videos.
If it really bothers you, think of it as if I created a YouTube playlist and now I'm using my data plan to stream the songs off YT itself..
Moral issues resolved, we can move on to the scripting.

Update (4/27/12): youtube-dl.py has moved: https://github.com/rg3/youtube-dl/, and also added a very neat --extract-audio option so you can get the songs in audio right away (it basically does a conversion in a second step).
Continue reading "Download all your Last.fm loved tracks in two simple steps"

Share

10 lines-of-code OCR HTTP service with Python, Tesseract and Tornado

Hi

I believe that every builder-hacker should have their own little Swiss-army-knife server that just does everything they need, but as a webservice. You can basically do anything as a service nowadays: image/audio/video manipulation, mock-cloud data storage, offload heavy computation, and so on.
Tornado, the lightweight Python webserver is perfect for this, and since so many of the projects these days have Python binding (see python-tesseract), it should be a breeze to integrate them with minimal work.
Let's see how it's done

Continue reading "10 lines-of-code OCR HTTP service with Python, Tesseract and Tornado"

Share

Hand gesture recognition via model fitting in energy minimization w/OpenCV

hands with model fittedHi

Just wanted to share a thing I made - a simple 2D hand pose estimator, using a skeleton model fitting. Basically there has been a crap load of work on hand pose estimation, but I was inspired by this ancient work. The problem is setting out to find a good solution, and everything is very hard to understand and implement. In such cases I like to be inspired by a method, and just set out with my own implementation. This way, I understand whats going on, simplify it, and share it with you!

Anyway, let's get down to business.

Edit (6/5/2014): Also see some of my other work on hand gesture recognition using smart contours and particle filters

Continue reading "Hand gesture recognition via model fitting in energy minimization w/OpenCV"

Share

Image Recoloring using Gaussian Mixture Model and Expectation Maximization [OpenCV, w/Code]

Hi,
I'll present a quick and simple implementation of image recoloring, in fact more like color transfer between images, using OpenCV in C++ environment. The basis of the algorithm is learning the source color distribution with a GMM using EM, and then applying changes to the target color distribution. It's fairly easy to implement with OpenCV, as all the "tools" are built in.

I was inspired by Lior Shapira's work that was presented in Eurographics 09 about image appearance manipulation, and a work about recoloring for the colorblind by Huang et al presented at ICASSP 09. Both works deal with color manipulation using Gaussian Mixture Models.

Update 5/28/2015: Adrien contributed code that works with OpenCV v3! Thanks! https://gist.github.com/adriweb/815c1ac34a0929292db7

Let's see how it's done!
Continue reading "Image Recoloring using Gaussian Mixture Model and Expectation Maximization [OpenCV, w/Code]"

Share

Bust out your own graphcut based image segmentation with OpenCV [w/ code]

This is a tutorial on using Graph-Cuts and Gaussian-Mixture-Models for image segmentation with OpenCV in C++ environment.

Been wokring on my masters thesis for a while now, and the path of my work came across image segmentation. Naturally I became interested in Max-Flow Graph Cuts algorithms, being the "hottest fish in the fish-market" right now if the fish market was the image segmentation scene.

So I went looking for a CPP implementation of graphcut, only to find out that OpenCV already implemented it in v2.0 as part of their GrabCut impl. But I wanted to explore a bit, so I found this implementation by Olga Vexler, which is build upon Kolmogorov's framework for max-flow algorithms. I was also inspired by Shai Bagon's usage example of this implementation for Matlab.

Let's jump in...
Continue reading "Bust out your own graphcut based image segmentation with OpenCV [w/ code]"

Share