Skip to content

Chapter2_iPhoneAR #75

Open
Open

Description

@AvinashAmanJha

Problem in chapter 2 . No detection is performed by camera

Activity

  1. coryl commented on Aug 20, 2016

    @coryl

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions