I already have a cv::Mat in Android NDK
cv::Mat grayMat;
grayMat.create(480, 720, CV_8UC1);
and a TextureView in JAVA.
public class MainActivity extends Activity implements TextureView.SurfaceTextureListener{
private TextureView mTextureView;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mTextureView = new TextureView(this);
mTextureView.setSurfaceTextureListener(this);
}
....
}
Why: I'm doing some image processing using OpenCV in NDK. Now, I'm using the method that save the result to .jpg and show on ImageView. But next step I'll use camera preview to do some processing. I don't want to save each frames to see the results.
Goal: Show the cv::Mat on Android
Question: How to show the cv::Mat using OpenGL ES 2.0 in NDK??