#include #include #include #include #define APPNAME "opencvtest jni" #define LOGD(TAG) __android_log_print(ANDROID_LOG_DEBUG , APPNAME,TAG); extern "C" { int convGray(int height, int width, unsigned char* buffer) { cv::Mat frameMat(height, width, CV_8UC4, (unsigned char*)buffer); cv::cvtColor(frameMat, frameMat, CV_RGBA2GRAY); cv::cvtColor(frameMat, frameMat, CV_GRAY2RGBA); return(1); } }