hello there again.
http://answers.opencv.org/question/19283/java-android-trying-to-detect-buttons-in-a-car/
what i did so far:
in the link above you can see that i am trying to write an android app to detect and recognize buttons in a car. so far i have successfully trained two CascadeClassifiers and they work smooth on the desktop-programm i wrote to try them. i am using videocapture in the desktop-program to grab frames from my webcam and then detect the objects on these frames. i am getting a smooth and fast videostream, so everything is fine.
the problem:
now i've been trying to write that android app, and therefore i have looked at the source of the facedetection-example that comes with opencv for android. i basically copied most of the stuff from the FdActivity class to my own project, made it load my cascade files and let it run. everything works, and it detects my buttons somewhat good, but the problem is, that i only get around 3 frames per second. im using the CameraBridgeViewBase just like in the example, and im doing all of the detection-realted code in the onCameraFrame()-method. if i comment that code within that method out, im getting between 20 and 30 frames per second. i did not copy any code from the DetectionBasedTracker class, since that is native code and i would prefer not to use any of that. also i did not copy any code from the FdActivity class that is related to the DetectionBasedTracker class.
facts:
- the frames recieved have a size of 800x480 pixels.
- i tried to downsize them, but the lowest my camera supports is 640x382 pixels, so i can't go any lower without the app saying "it seems that your device does not support camera or it is locked" on startup.
- i set the minimumSize within the detection method to 60*60 pixels to prevent it from detecting too many small objects.
so my question:
how is it possible, that the facedetection-app runs that smooth on my device, while my own app only gets around 3 frames per second? @StevenPuttemans since you helped me so great with my last question, maybe you have any idea?