MasteringOpenCV / code

Code for the book "Mastering OpenCV with Practical Computer Vision Projects" by Packt Publishing 2012.
Other
2.73k stars 1.65k forks source link

Chapter 3: Performance issues, do you get realtime tracking? #42

Open zozefski opened 10 years ago

zozefski commented 10 years ago

Hello everybody,

I'm running Chapter 3: Marker-less Augmented Reality from this great book on a laptop with an Intel i7, 6GB RAM, nVidia 540 Graphics and I get like 1FPS, which is totally unacceptable for any realtime application... I tried capturing @ 640x480, tried several cams and even tried a captured video as input to eliminate any lag introduced by webcam capture. Running the release build instead of debug speeds it up a little but still is amazingly slow.

When I run other markerless implementations like BazAR ( http://cvlab.epfl.ch/cms/site/cvlab2/lang/en/software/bazar ), they run perfect and at full speed. Even my Galaxy Note 2 does AR realtime, for example the Augment app ( https://play.google.com/store/apps/details?id=com.ar.augment&hl=en ) does perfect tracking in realtime when using "Create Tracker" and taking a picture of magazine cover lying around.

Is this code not suited for realtime applications or am I doing something wrong?

Thx, ucf

pcouture commented 10 years ago

It's been a while since I've looked at that example but isn''t it an Xcode project?

If you've modified the project to run on a different platform then it's something within your own code that's preventing it from running. You probably need to put a running process into it's own thread.

On Jul 6, 2014, at 3:41 AM, zozefski notifications@github.com wrote:

Hello everybody,

I'm running Chapter 3: Marker-less Augmented Reality from this great book on a laptop with an Intel i7, 6GB RAM, nVidia 540 Graphics and I get like 1FPS, which is totally unacceptable for any realtime application... I tried capturing @ 640x480, tried several cams and even tried a captured video as input to eliminate any lag introduced by webcam capture. Running the release build instead of debug speeds it up a little but still is amazingly slow.

When I run other markerless implementations like BazAR ( http://cvlab.epfl.ch/cms/site/cvlab2/lang/en/software/bazar ), they run perfect and at full speed. Even my Galaxy Note 2 does AR realtime, for example the Augment app ( https://play.google.com/store/apps/details?id=com.ar.augment&hl=en ) does perfect tracking in realtime when using "Create Tracker" and taking a picture of magazine cover lying around.

Is this code not suited for realtime applications or am I doing something wrong?

Thx, ucf

— Reply to this email directly or view it on GitHub.