Login | Register 
FEATURES
APPLICATIONS
DOWNLOADS
EDUCATION
BLOG
WIKI
FORUM
STORE

Kinect2 - Projector Calibration

Share your components here. First one to 100 wins!

Re: Kinect2 - Projector Calibration

Postby bLackburst » Tue Oct 09, 2018 7:46 pm

Awesome!
bLackburst
 
Posts: 334
Joined: Thu Sep 01, 2011 3:56 am
Location: Melbourne, Australia

Re: Kinect2 - Projector Calibration

Postby choikhss » Thu Nov 01, 2018 4:56 am

I found a problem using the checkerboard.
Green dots appear only on the left side of the screen.

Is there a way to fix it?

Thank you.
Attachments
question.png
question.png (1.06 MiB) Viewed 3170 times
choikhss
 
Posts: 13
Joined: Fri Aug 31, 2018 12:21 am

Re: Kinect2 - Projector Calibration

Postby snaut » Fri Nov 02, 2018 12:28 am

Hey,

Just wondering if this is in Non-Commercial?
If so, can you try reducing your projector resolution to 1280x720.
Can’t test it right now so mainly guessing...

Cheers
Markus
User avatar
snaut
Staff
 
Posts: 901
Joined: Mon Nov 12, 2007 6:21 pm
Location: Toronto

Re: Kinect2 - Projector Calibration

Postby choikhss » Sun Nov 04, 2018 8:48 pm

Yes I am using non-commercial tools.
Even though resolution is reduced, it does not match exactly.
choikhss
 
Posts: 13
Joined: Fri Aug 31, 2018 12:21 am

Re: Kinect2 - Projector Calibration

Postby wolfbaru » Mon Nov 05, 2018 1:25 pm

Thank you so much for releasing this. I have been trying to figure out a better way then importing the calibration from RoomAlive for a while now. This is a much cleaner solution.
wolfbaru
 
Posts: 4
Joined: Thu Sep 03, 2015 7:36 pm

Re: Kinect2 - Projector Calibration

Postby snaut » Thu Nov 08, 2018 7:20 pm

Hey,

I posted an updated version (viewtopic.php?f=22&t=12895#p49372) that fixes the issue with offset grid points when running the kinect at a lower resolution (mainly when trying this with the Non-Commercial version.)

The issue was that I had a fixed offset and orthographic camera width that assumed a camera resolution of 1920x1080.

Cheers
Markus
User avatar
snaut
Staff
 
Posts: 901
Joined: Mon Nov 12, 2007 6:21 pm
Location: Toronto

Re: Kinect2 - Projector Calibration

Postby Lichtverwerter » Fri Nov 09, 2018 5:22 am

PERFECT! THERE IT IS! I WILL TRY IT LATER!


THX
by. Lichtverwerter
User avatar
Lichtverwerter
 
Posts: 15
Joined: Wed Feb 01, 2017 10:34 am
Location: Madrid. Spain

Re: Kinect2 - Projector Calibration

Postby knut » Thu Nov 15, 2018 6:27 am

Hi Markus
during the last week I did a lot of calibrations on differernt locations using your .tox.
Everything worked fine: It is stable, the results are reproducible, the UI is good.
Thnx a lot, great job!
I use this camera for the kinect directly but also for the vive tracker as an alternative to
camschnappr, if I dont have a 3D model of the object.

I will now invest some time to understand what needs to be done in order to get the best results possible by using this checkerboard approach with the kinect.
The quality of the results is today not easy judge, because this can only be done by projecting
the skeleton on a person and then visually inspecting the image (as far as I know).
I would expect that there is somewhere inside opencv some kind of value, that describes the quality or preciseness of the parameter estimation.
Is this true ? Do you plan to make this value availabale through the UI?
Could you give a starting point if I would like to do that on my own ?
thnx for your help
knut
knut
 
Posts: 24
Joined: Sun Apr 19, 2015 9:12 am

Re: Kinect2 - Projector Calibration

Postby snaut » Tue Nov 20, 2018 6:56 pm

Hi Knut,

the calibrateCamera returns a value that should indicate how precise it is.
If you go to the DAT called Calibrate, find the function of the same name:

Code: Select all
   
def Calibrate(self):
   fov = 180
   pWidth = int(op('monitors1')[parent.Kinect.par.Monitor+1,'width'])
   pHeight = int(op('monitors1')[parent.Kinect.par.Monitor+1,'height'])
   size = (pWidth,pHeight)
   ret, mtx, dist, rvecs, tvecs = self.calibrateCamera(self.objPoints, self.imgPoints)
   rot, jacob = cv2.Rodrigues(rvecs[0],None)

   extrinsic = self.returnExt(rot, tvecs[0])
   intrinsic = self.returnIntrinsics(mtx, size)


the "ret" should be this value, so if you add:
Code: Select all
parent.Kinect.par.Message = 'Calibration Error: {0}'.format(ret)

it should output it to the little Message field on the parameters.

Code: Select all
   
def Calibrate(self):
   fov = 180
   pWidth = int(op('monitors1')[parent.Kinect.par.Monitor+1,'width'])
   pHeight = int(op('monitors1')[parent.Kinect.par.Monitor+1,'height'])
   size = (pWidth,pHeight)
   ret, mtx, dist, rvecs, tvecs = self.calibrateCamera(self.objPoints, self.imgPoints)
   rot, jacob = cv2.Rodrigues(rvecs[0],None)

   extrinsic = self.returnExt(rot, tvecs[0])
   intrinsic = self.returnIntrinsics(mtx, size)

   parent.Kinect.par.Message = 'Calibration Error: {0}'.format(ret)


Will add this in to a later release!
User avatar
snaut
Staff
 
Posts: 901
Joined: Mon Nov 12, 2007 6:21 pm
Location: Toronto

Re: Kinect2 - Projector Calibration

Postby knut » Wed Nov 28, 2018 8:16 am

HI Markus
thnx. That just works. I will now play around for while to find out what this error means in
my environment and if this number allows me to find precise results faster...something
like a criterion to stop calibration, a little more accurate then your advice to collect something like 10-12 point pairs.
Greetings knut
knut
 
Posts: 24
Joined: Sun Apr 19, 2015 9:12 am

PreviousNext

Return to Shared .tox Components

Who is online

Users browsing this forum: No registered users and 6 guests