Ask Your Question
0

Android face-detection sample: where's the native code?

asked 2013-07-15 13:07:12 -0600

Luis gravatar image

Hi.

I have been looking at this face-detection sample, but I cannot seem do get access to the C++ native source code. I'm new to JNI, I must confess...

As far I understand, this native part of the project is only available as a shared library in libs/<arch>/libdetection_based_tracker.so

Since I want to do some changes to that code, I would need to access and change the source. Is it available somewhere? Am I missing something?

Bye and thanks, Luís

edit retag flag offensive close merge delete

Comments

1

are you saying, you can#t find the source code ?

it's in OpenCV/samples/face-detection/jni/DetectionBasedTracker_jni.cpp

berak gravatar imageberak ( 2013-07-15 13:28:02 -0600 )edit

Hello berak.

If I understand things right, in the file you mention you cannot find the actual c++ source code, that's just the code to bridge from java to c++: it simply calls the actual c++ code and deals with exceptions and other bits and pieces.

If, eg, you look at Java_org_opencv_samples_facedetect_DetectionBasedTracker_nativeDetect, you'll see that some methods are being called, like process and getObjects. What I'm looking is for the definition of these methods.

Thanks anyway.

Luis gravatar imageLuis ( 2013-07-15 16:04:24 -0600 )edit

1 answer

Sort by » oldest newest most voted
0

answered 2013-07-15 17:32:50 -0600

berak gravatar image

updated 2013-07-15 17:49:32 -0600

ah, sorry took the jni code for another haarcascade wrapper, but instead it wraps a completely different class.

the DetectionBasedTracker is in the contrib module, header , src

but to modify it, you'll probably need the opencv src code

edit flag offensive delete link more

Comments

Yeah, you're right, I just had found those files myself! There should be some link to these files in the sample, or else this problem might arise again...

Thanks, Luís

Luis gravatar imageLuis ( 2013-07-16 05:57:05 -0600 )edit

Question Tools

Stats

Asked: 2013-07-15 13:07:12 -0600

Seen: 869 times

Last updated: Jul 15 '13