Webcam callibration issues
Hello,
we´re building a system using a webcam, at the position of (let´s say the right eye, one is sufficient for us) capturing an image and showing it at the rift. This should be as realistic as possible, meaning the person who´s wearing the system should be able to grab for example a mug or shake another persons hand.
To do so we carefully chose the webcam and the lens and adjusted the angle of the captured imaged to be the same as the actual fov of the rift.(by the way we´re using dk1 with sdk 0.2).
To match the rifts fov we had to apply a wide angle camera lens on instead of the actual lens of the original webcam lense.
Unfortunately this gives us some distortion we´d like to correct.
We got our distortion coefficients using opencv but we´re not sure what´s the best method implementing the lens correction. Using opencv would mean to perform the lens correction on every frame, which might introduce a lot of latency into our system and make it really difficult for the user to grab objects. On the other hand, this method ist quite straight forward.
Wouldn´t it be more efficient to create another shader and put it on a texture, similar to the shader-lookup-distortdone in "oculus rift in action", and then perform the rift´s lens correction afterwards?
What would be the best attempt to implement such an OpenGL shader on base of the distortion coefficients we already got?
We belief that in this way the calculations would only have to be done once instead of correcting every frame. Is this true?
As I mentioned we´re currently using dk1 in combination with sdk 0.2, but because of the limited resolution we definitely have to go for dk2. Do we have to switch to sdk 0.3 though or will this also work with sdk0.2?
thanks for your help.
I
we´re building a system using a webcam, at the position of (let´s say the right eye, one is sufficient for us) capturing an image and showing it at the rift. This should be as realistic as possible, meaning the person who´s wearing the system should be able to grab for example a mug or shake another persons hand.
To do so we carefully chose the webcam and the lens and adjusted the angle of the captured imaged to be the same as the actual fov of the rift.(by the way we´re using dk1 with sdk 0.2).
To match the rifts fov we had to apply a wide angle camera lens on instead of the actual lens of the original webcam lense.
Unfortunately this gives us some distortion we´d like to correct.
We got our distortion coefficients using opencv but we´re not sure what´s the best method implementing the lens correction. Using opencv would mean to perform the lens correction on every frame, which might introduce a lot of latency into our system and make it really difficult for the user to grab objects. On the other hand, this method ist quite straight forward.
Wouldn´t it be more efficient to create another shader and put it on a texture, similar to the shader-lookup-distortdone in "oculus rift in action", and then perform the rift´s lens correction afterwards?
What would be the best attempt to implement such an OpenGL shader on base of the distortion coefficients we already got?
We belief that in this way the calculations would only have to be done once instead of correcting every frame. Is this true?
As I mentioned we´re currently using dk1 in combination with sdk 0.2, but because of the limited resolution we definitely have to go for dk2. Do we have to switch to sdk 0.3 though or will this also work with sdk0.2?
thanks for your help.
I
