• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Android + OpenCV + Face detection + Custom Layout

brgsousa

Lurker
Hi everyone!

I am using:

  • Android 4.0.3
  • OpenCV 2.4.2
  • Samsung Galaxy S2

The face-detection example (from the opencv 2.4.2) is working perfectly. But now, I would like to create a custom layout and actually work with just the data extracted from face detection and build a game on it. Not necessarily having the FdView surface taking the entire screen.

I have done these modifications below, but just a black screen is displayed. Nothing appears on the screen.

Changed the BaseLoaderCallback in FdActivity.java (I know it looks weird, but that is the thing, I don't know how to do it):

Code:
//EXPERIMENT
setContentView(R.layout.fd);
FdView surface = (FdView) (findViewById(R.id.FdView));

// Create and set View
mView = new FdView(mAppContext);
mView.setDetectorType(mDetectorType);
mView.setMinFaceSize(0.2f);
// setContentView(mView);

surface = mView;
 
Back
Top Bottom