Categories
3d code opencv vision

Decomposing the Essential matrix using Horn and Eigen [w/code]

Hi
I’ve been working feverishly to straighten up the Structure from Motion Toy Library, and make it more robust. During my experiments with different methods I wanted to test out a different method for decomposing the Essential matrix to rotation R and translation t, other than that of Hartley and Zisserman using SVD. That’s when I came upon this paper: here by Berthold Horn from 1990, that traces the steps of Longuet-Higgins who came up with the derivation for the Essential matrix. It has a closed form solution that works pretty well, and here it is implemented with the Eigen math library (a very good library to get to know).

Categories
electronics programming Recommended Solutions tips Website

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)

Categories
Recommended tips Website

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.

Categories
3d code graphics opencv opengl programming Recommended video vision Website

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…

Categories
3d code graphics opencv programming school vision

Simple triangulation with OpenCV from Harley & Zisserman [w/ code]

Hi
I sense that a lot of people are looking for a simple triangulation method with OpenCV, when they have two images and matching features.
While OpenCV contains the function cvTriangulatePoints in the triangulation.cpp file, it is not documented, and uses the arcane C API.
Luckily, Hartley and Zisserman describe in their excellent book “Multiple View Geometry” (in many cases considered to be “The Bible” of 3D reconstruction), a simple method for linear triangulation. This method is actually discussed earlier in Hartley’s article “Triangulation“.
I implemented it using the new OpenCV 2.3+ C++ API, which makes it super easy, and here it is before you.
Edit (4/25/2015): In a new post I am using OpenCV’s cv::triangulatePoints() function. The code is available online in a gist.
Edit (6/5/2014): See some of my more recent work on structure from motion in this post on SfM and that post on the recent Qt GUI and SfM library.
Update 2017: See the new Mastering OpenCV3 book with a deeper discussion, and a more recent post on the implications of using OpenCV3 for SfM.

Categories
3d code graphics gui opencv opengl programming school video vision

Spherical harmonics face relighting using OpenCV, OpenGL [w/ code]

Hi!
I’ve been working on implementing a face image relighting algorithm using spherical harmonics, one of the most elegant methods I’ve seen lately.
I start up by aligning a face model with OpenGL to automatically get the canonical face normals, which brushed up my knowledge of GLSL. Then I continue to estimating real faces “spharmonics”, and relighting.
Let’s start!

Categories
code graphics opengl programming video

A Kinect browser plugin with FireBreath [w/ code]

Hi,
Just reporting on a small achievement, part of a big project: Creating a browser plugin to display the Kinect depth map on screen.
The integration was fairly easy, which leads me to think that both FireBreath and OpenNI/Nite are pretty neat framework that are robust..
So let’s see how it’s done

Categories
code graphics opencv opengl programming school video vision

Identity Transfer in Photographs

Hi!
I would like to present something I have been working on recently, a work that immensely affect what I wrote in the blog in the past two years…
To use it:
Go on this page,
Watch the short instruction video,
download the application (MacOSX-Intel-x64 Win32)
and make yourself a model!
It takes just a couple of minutes and it’s very simple…
This work is an academic research project, Please please, take the time to fill out the survey! It is very short..
The results of the survey (the survey alone, no photos of your work) will possibly be published in an academic paper.
Note: No information is sent anywhere in any way outside of your machine (you may even unplug the network). All results are saved locally on your computer, and no inputs are recorded or transmitted. The application contains no malware. The source is available here.
Note II: All stock photos of models used in the application are released under Creative Commons By-NC-SA 2.0 license. Creator: http://www.flickr.com/photos/kk/. If you wish to distribute your results, they should also be released under a CC-By-NC-SA 2.0 license.
Thank you!
Roy.

Categories
code graphics opencv programming

Just a simple Laplacian pyramid blender using OpenCV [w/code]

I want to share a small piece of code to do Laplacian Blending using OpenCV. It’s one of the most basic and canonical methods of image blending, and is a must exercise for any computer graphics student.

Categories
3d code graphics opengl programming Solutions

A GLSL shader showing the normal map [w/ code]


A very simple thing, although I couldn’t find on Google some place to copy-paste off, so here it is: