Skip to content

Instantly share code, notes, and snippets.

@wanewang
Created August 24, 2011 08:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wanewang/1167546 to your computer and use it in GitHub Desktop.
Save wanewang/1167546 to your computer and use it in GitHub Desktop.
opencv with jni
package com.test.opencv;
import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;
public class Opencvtest extends Activity {
/** Called when the activity is first created. */
public native void setimage();
static{
System.loadLibrary("imagefea");
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
TextView tv = new TextView(this);
long StartTime = System.currentTimeMillis();
setimage();
long ProcessTime = System.currentTimeMillis() - StartTime;
tv.setText(String.valueOf(ProcessTime));
setContentView(tv);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment