Skip to content

Instantly share code, notes, and snippets.

@jason9075
Created June 12, 2022 05: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 jason9075/76ff75c53ca0b57f7fda58ab0f99c407 to your computer and use it in GitHub Desktop.
Save jason9075/76ff75c53ca0b57f7fda58ab0f99c407 to your computer and use it in GitHub Desktop.
extern "C" JNIEXPORT void JNICALL
Java_com_jason9075_myopencv_NativeLib_toGrey(
JNIEnv *env,
jobject,
jobject bitmapIn,
jobject bitmapOut) {
Mat src, greyOut;
bitmapToMat(env, bitmapIn, src, false);
cvtColor(src, greyOut, CV_BGR2GRAY);
matToBitmap(env, greyOut, bitmapOut, false);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment