Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Optimising OPenCV4Android image processing

Hi, I am working on a background subtraction project with a moving camera, on Android. Currently, I have the algorithm working on a static camera - but it is very slow, depending on resolution, e.g. I get about 1 FPS on 250x300 (I resize the 800x480 CvCameraViewFrame), using gray scale frames. I have my own background subtraction algorithm , so am using onCameraFrame() callback to grab each frame and do pixel-level processing (with several calculations for each pixel) before returning the frame with foreground pixels set to black. All processing is currently done using the Java API.

My question is how can I improve performance? Considering I will have to add code for feature detection, extraction, matching, homography, etc. to make the background subtraction work on a moving camera - the performance will only get slower. My development device is a Nexus 4 - which has a Qualcomm quad core processor with ARM Neon support. I have researched and I think OpenCV4Android has support for Neon optimizations? I'm not sure how to enable this?

I appreciate any help on enabling support for Arm Neon and any other tips! Thanks.