#include #include #include #include #include using namespace std; using namespace cv; extern "C" { JNIEXPORT void JNICALL Java_org_opencv_samples_s4_Sample4View_FindFeatures(JNIEnv* env, jobject thiz, jlong addrGray, jlong addrRgba) { Mat* pMatGr=(Mat*)addrGray; Mat* pMatRgb=(Mat*)addrRgba; vector v; FastFeatureDetector detector(50); detector.detect(*pMatGr, v); for( size_t i = 0; i < v.size(); i++ ) circle(*pMatRgb, Point(v[i].pt.x, v[i].pt.y), 10, Scalar(255,0,0,255)); } }