Open AvinashAmanJha opened 7 years ago
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
Problem in chapter 2 . No detection is performed by camera