Results of performance benchmark (average execution times of 15 frames). From results bellow it is obvious that the Feature tracking phase on N9 is performing much worse than in case of N900. The Feature Tracking code is representing only one function call :
NOTE: flags=CV_LKFLOW_PYR_A_READY // checked the API and did not find this flag as an option in openCV 2.3 cvCalcOpticalFlowPyrLK function call. Nonetheless, If I use flags=0 on N9 and N900 the performance difference does not get affected.
Code:
cvCalcOpticalFlowPyrLK(
prev_grey, /* Previous Image */
grey, /* Current Image or candidate image */
prev_pyramid[0], /* Image pyramid for previous image */
pyramid[0], /* Image pyramid for current image */
points[0], /* Points to be tracked */
points[1], /* Their new position */
featuresIn1, /* Number of features */
cvSize(SEARCH_WINDOW_SIZE, SEARCH_WINDOW_SIZE), /* Window size */
2,
status, /* Array of positive feature matches */
errors, /* Difference measure between observed and initial */
cvTermCriteria(CV_TERMCRIT_ITER | CV_TERMCRIT_EPS , 5, 0.03),/* Iteration criteria for each pyramid level */
flags);
Legend:
Feature C - Number of features tracked
Feature T - Feature tracking using Luca- Kanade Optical Flow (OpenCV stuff)
Pose E - Camera pose estimation : Homography decomposition (OpenCV stuff)
Rendering - Rendering of the openGL scene with the texture of a video stream.
Pool F - Pooling a frame from the camera.
N9
Feature C.: 20 | Feature T.: 54 | Pose E.: 27 | Homography E.: 20 | Pose R.: 5 | Init ST.: 221 |Init Map.: 222 | Sub. A.: 0 Un-P: 0| | Pool F.: 8.31 | Rendering: 5.31
Feature C.: 20 | Feature T.: 57 | Pose E.: 28 | Homography E.: 18 | Pose R.: 9 | Init ST.: 221 |Init Map.: 222 | Sub. A.: 0 Un-P: 0| | Pool F.: 7.75 | Rendering: 5.50
Feature C.: 20 | Feature T.: 58 | Pose E.: 28 | Homography E.: 22 | Pose R.: 5 | Init ST.: 221 |Init Map.: 222 | Sub. A.: 0 Un-P: 0| | Pool F.: 7.75 | Rendering: 5.56
Feature C.: 20 | Feature T.: 54 | Pose E.: 31 | Homography E.: 25 | Pose R.: 5 | Init ST.: 221 |Init Map.: 222 | Sub. A.: 0 Un-P: 0| | Pool F.: 9.31 | Rendering: 5.25
N900 600 MhZ
Feature C.: 20 | Feature T.: 18 | Pose E.: 17 | Homography E.: 12 | Pose R.: 4 | Init ST.: 221 |Init Map.: 222 | Sub. A.: 0 Un-P: 0| | Pool F.: 16.56| Rendering: 10.12
Feature C.: 20 | Feature T.: 12 | Pose E.: 25 | Homography E.: 20 | Pose R.: 2 | Init ST.: 221 |Init Map.: 222 | Sub. A.: 0 Un-P: 0| | Pool F.: 5.31| Rendering: 10.94
Feature C.: 20 | Feature T.: 19 | Pose E.: 17 | Homography E.: 13 | Pose R.: 3 | Init ST.: 221 |Init Map.: 222 | Sub. A.: 0 Un-P: 0| | Pool F.: 5.69| Rendering: 10.12
Feature C.: 20 | Feature T.: 18 | Pose E.: 18 | Homography E.: 15 | Pose R.: 2 | Init ST.: 221 |Init Map.: 222 | Sub. A.: 0 Un-P: 0| | Pool F.: 5.31| Rendering: 11.81
Feature C.: 20 | Feature T.: 19 | Pose E.: 26 | Homography E.: 18 | Pose R.: 8 | Init ST.: 221 |Init Map.: 222 | Sub. A.: 0 Un-P: 0| | Pool F.: 5.50| Rendering: 11.31
N900 clocked to 1000 MhZ
Feature C.: 20 | Feature T.: 8 | Pose E.: 14 | Homography E.: 9 | Pose R.: 4 | Init ST.: 149 |Init Map.: 150 | Sub. A.: 0 Un-P: 0| | Pool F.: 4.31| Rendering: 10.62
Feature C.: 20 | Feature T.: 8 | Pose E.: 16 | Homography E.: 9 | Pose R.: 5 | Init ST.: 149 |Init Map.: 150 | Sub. A.: 0 Un-P: 0| | Pool F.: 4.38| Rendering: 10.88
Feature C.: 20 | Feature T.: 9 | Pose E.: 19 | Homography E.: 17 | Pose R.: 1 | Init ST.: 149 |Init Map.: 150 | Sub. A.: 0 Un-P: 0| | Pool F.: 3.81| Rendering: 10.75
Feature C.: 19 | Feature T.: 14 | Pose E.: 17 | Homography E.: 13 | Pose R.: 3 | Init ST.: 149
Thanks for your help.
Klen