Wiimote Project » General Wiimote and Technology » Programmers Den » Mathmatic Concept Behind Whiteboard Calibration
: [1]
 : Mathmatic Concept Behind Whiteboard Calibration  ( 7168 ) 0 and 1 Guest are viewing this topic.
Karma: +0/-0
: 3
Offline
 « : April 13, 2010, 07:51:04 PM »

I know this question has been answered multiple times before, but I was hoping I could get a more math based explanation of how calibration works. I need to understand it so I can modify your code to fit my needs and I always enjoy learning something new, but no one I've found explains the meaning behind the code. Could one of you explain the process you use to find the whiteboard plane using three or more input points (be it with matrices, geometry, etc.)? A simple algorithm would be useful too, though not the Warper class please because I can't make heads or tails of it.
Guru
Karma: +28/-0
: 929
Offline
Smoothboard Developer
 « #1 : April 13, 2010, 09:23:47 PM »

Hi,

What changes you would like to make to the code?

Basically, during the calibration each point from the Wiimote's perspective is mapped onto the screen coordinates (as a unit square)

With the homography matrix, any new point from the Wiimote's perspective can then be mapped into the screen coordinates.

There are a lot of resources online related to planar homography.

You may take a look at the following.
http://www.cs.utoronto.ca/~strider/vis-notes/tutHomography04.pdf
http://www.cs.toronto.edu/~jepson/csc2503/tutorials/homography.pdf

Regards,
Boon Jin

Smoothboard
Wii Whiteboard/Wiimote Whiteboard with annotation features and collaborate with multiple iPads and Android Tablets!

Smoothboard for Mac
Using a Mac? Now you can annotate on PowerPoint or Keynote slideshows!

BoonJin[/url
Karma: +0/-0
: 3
Offline
 « #2 : April 14, 2010, 08:38:43 PM »

Thanks for answering so quickly. I haven't had a chance to fully look through the documents you suggested, but if I'm understanding them correctly I'm going to kick myself. Is the answer simply [ I ]-1 * [ S ] = [ H ] where [ I ] is the image coordinates, [ S ] is the screen coordinates, and [ H ] is the homography matrix?
 « : April 17, 2010, 07:57:28 PM Etherian »
Karma: +0/-0
: 3
Offline
 « #3 : April 19, 2010, 03:33:51 PM »

I just tested it and apparently not. Since I do not know exactly what I want to change as of yet, I'll just go ahead and use the already written code. Thanks for the help though. I'll continue to look through those documents.
 « : April 20, 2010, 09:10:20 PM Etherian »
Karma: +0/-0
: 4
Offline
 « #4 : September 20, 2011, 08:43:17 AM »

Sorry to bump up such an old topic, but I also need to write some calibration code.

I want to have a user-defined active area of the Wiimote's IR sensor. This active area will then be mapped onto screen coordinates.

As the active area is user-defined, it could potentially be one screwed up trapezoid, hence I need to write calibration code from scratch.

I have the Warper class code in front of me, and have poured over several 2D Homography documents, but still do not fully understand how to create a Homography matrix from the 4 pairs of corresponding points.

If I had to, I could probably *hack* some suitably working code together just from the Warper class, but it'd be a lot of hassle if I don't know what's going on. Can someone explain the process of creating the H matrix in lamen's terms? Psuedocode would also be appreciated

Thanks in advance, Simon.
Guru
Karma: +28/-0
: 929
Offline
Smoothboard Developer
 « #5 : September 20, 2011, 02:16:05 PM »

The warper class from the Wiimote Whiteboard software should work with any trapezoid without any modifications

Regards,
Boon Jin

Smoothboard
Wii Whiteboard/Wiimote Whiteboard with annotation features and collaborate with multiple iPads and Android Tablets!

Smoothboard for Mac
Using a Mac? Now you can annotate on PowerPoint or Keynote slideshows!

BoonJin[/url
Karma: +0/-0
: 4
Offline
 « #6 : September 21, 2011, 11:20:11 AM »

The only reason I said i'd have to hack something toether was because my application is in C++, hence having to modify the Warper class

I got it working, it's just an arse because my app runs on OpenGL, flipping the Y screen coordinates. I've tried mapping wiimote x,y to screen x,-y with the warper class, but always get unusable results :/
: [1]
: