Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it a bug? #6

Open
binzhang opened this issue Apr 21, 2013 · 3 comments
Open

Is it a bug? #6

binzhang opened this issue Apr 21, 2013 · 3 comments

Comments

@binzhang
Copy link

I replaced the teapot with a square which covered exactly the marker in the video. If the transformation is correct, the square should always covers the marker no matter how I rotated the iPhone.
I have tested it with the 640x480 video preview, it passed the test.
But with the 1280x720 video preview, if I rotated iPhone int the x or y direction with big angles, there will be blank space of the square in y direction and the square exceeds in the x direction, as the picture shows.

the marker in the video:
http://www.imageurlhost.com/images/oz264enc4lgtdlk27c1s.jpg

the square cover the marker in the 640x480 video:
http://www.imageurlhost.com/images/o4a6hie7kpmw0furc6oj.jpg

the square cover the marker the 1280x720 video:
http://www.imageurlhost.com/images/l9ex352qnkqtmfwtsbrq.jpg

Do I need to change opengl projection matrix while changing the video preset?

Thank you.

@sonsongithub
Copy link
Owner

I'm not sure my implementation of rendering and overlaying using OpenGL.
The aspect ratio of 1280x720 is different from 640x480.
I estimate that aspect ratio can cause such kind of problems.
And, I can't support very aspect ratio's problem.

@binzhang
Copy link
Author

Thank you very much for your reply.
But It seemed that coding the matrix of the transformation has already
normalized with the width and height of the image.
And in the opengl rendering set up, the framesize is changed with the video
preview setup.
So I guessed it may not be the aspect ratio problems.
Also , would you please tell me the how did you get the XFocalLength or
YFocalLength value?
Maybe changing the video preview setup also changed the camera's intrinsic
parameter of the projection.

Cheers,
Bin Zhang

On Mon, Apr 22, 2013 at 7:30 AM, sonson [email protected] wrote:

I'm not sure my implementation of rendering and overlaying using OpenGL.
The aspect ratio of 1280x720 is different from 640x480.
I estimate that aspect ratio can cause such kind of problems.
And, I can't support very aspect ratio's problem.


Reply to this email directly or view it on GitHubhttps://github.com//issues/6#issuecomment-16748708
.

@sonsongithub
Copy link
Owner

I got focal length by using Camera Calibration Toolbox for Matlab.
http://www.vision.caltech.edu/bouguetj/calib_doc/htmls/parameters.html
Recently, I heard that OpenCV provides such as functions, too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants