Sponsors of Wiimoteproject.com
IRGreat.com
Wiimote Project » Forum » General Wiimote and Technology » Programmers Den » FourPointCalibration library
Pages: [1]
  Print  
Author Topic: FourPointCalibration library  (Read 1938 times)
0 Members and 1 Guest are viewing this topic.
*
Karma: +3/-0
Posts: 28
Offline Offline
View Profile Email
« on: January 14, 2009, 08:17:08 PM »

Hi
There are a lot of question about four point calibration so I created dll to make it as simple as possible.

Usage:
Code:
VB .Net

 Dim calibration As New four_point_callibration.four_point_calibration

 'we must fill in two matrices:
 'One of the coordinates of points on the screen. In this case, they are the corners of the screen (1024x768).

Dim corners(,) As Double = {{1, 1}, _
                                        {1024, 1}, _
                                        {1024, 768}, _
                                        {1, 768}}

'Second  matrix contains points read from the wiimote. Important! points have to be in the same order as in the first matrix

 Dim wii_points(,) As Double = {{x1, y1}, _
                                                            {x2, y2}, _
                                                            {x3, y3}, _
                                                            {x4, y4}}



'Calibration
calibration.do_calibration(wii_points, corners)

'end of calibration
'-------------------------------------------------------------------


'now  we can  get the  coordinates indicated point

  Dim x As Double = calibration.get_x(WiimoteState.IRState.IRSensors(0).RawPosition.X, WiimoteState.IRState.IRSensors(0).RawPosition.Y)
  Dim y As Double = calibration.get_y(WiimoteState.IRState.IRSensors(0).RawPosition.X, WiimoteState.IRState.IRSensors(0).RawPosition.Y)

'-------------------------------------------------------------------

'to display any matrix in text format you can use:
dim a as string = calibration.MakeDisplayable(corners)

Let me know if it works

« Last Edit: March 05, 2009, 12:47:34 AM by eziosoft » Logged

*
Karma: +0/-0
Posts: 5
Offline Offline
View Profile
« Reply #1 on: February 18, 2009, 06:09:36 PM »

Thanks Eziosoft,

It seems to work perfectly in the test I did.

I have a few small comments:

- You have spelled "calibration" differently in the namespace (with two ls) to in the name of the object (one l).

- Most class and namespace names are "camel-case" these days, like "FourPointCalibration" rather than "four_point_calibration" - though this doesn't really matter, of course.

- Are you going to post the source code? Or can you give me a link to some code, or a description of how the transformation between the two sets of points is done?

Thanks again!

Richard
Logged
*
Karma: +3/-0
Posts: 28
Offline Offline
View Profile Email
« Reply #2 on: February 19, 2009, 04:21:33 PM »

all my source is based on this http://www.zaunert.de/jochenz/wii/
but I use different method to solve the equations.
Logged

*
Karma: +3/-0
Posts: 28
Offline Offline
View Profile Email
« Reply #3 on: March 04, 2009, 11:57:06 PM »

Hi again.
new version is available
only cosmetic changes

it is also available on my web www.ssaa.ocom.pl

Thanks
« Last Edit: March 05, 2009, 12:14:20 AM by eziosoft » Logged

Pages: [1]
  Print  
 
Jump to:  

TinyPortal v.1.0.6 beta 2 © Bloc
Clicky Web Analytics