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

Chapter2_iPhoneAR #75

Open
AvinashAmanJha opened this issue Jul 28, 2016 · 1 comment
Open

Chapter2_iPhoneAR #75

AvinashAmanJha opened this issue Jul 28, 2016 · 1 comment

Comments

@AvinashAmanJha
Copy link

Problem in chapter 2 . No detection is performed by camera

@coryl
Copy link

coryl commented Aug 20, 2016

I debugged the issue.

  1. Not sure this is a problem, but in SimpleVisualizationController.mm, I was getting cautions so renamed this method:
    - (void)buildProjectionMatrix:(Matrix33)cameraMatrix screenWidth:(int)screen_width screenHeight:(int)screen_height projectionMatrix:(Matrix44&) projectionMatrix

  2. In ViewController.mm, frameSize is not correctly being evaluated and returns (0,0):

self.visualizationController = [[SimpleVisualizationController alloc] initWithGLView:self.glview
                                                                             calibration:camCalib
                                                                               frameSize:frameSize];

To fix this fast: Just change frameSize parameter to CGSizeMake(640,480) (which is the correct video dimensions as the entire project revolves around that resolution preset in VideoSource).

To fix this correctly: Implement a notification to get the correct frameSize when the camera is ready. The problem is in VideoSource.mm getFrameSize returning 0,0 because its not ready. Here is a link to implementing that notification: http://stackoverflow.com/questions/26175409/cmformatdescriptionref-and-cmvideoformatdescriptiongetdimensions

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