简体   繁体   中英

Multiple Views in Android from OpenCV images

I have just written a complete application using OpenCV. Till now its fine when I want to view images from OpenCV. Basically I do some processing in JNI/C++ via opencv and throw back the image to Java. The image is then shown in a org.opencv.android.JavaCameraView

I want to see multiple views of the steps that I perform on an image. Eg Smooth, sharpen, flip and then finally rotate. I want these steps being show to the user simultaneously.

Is there a well known way of show multiple JavaCameraViews? More like a grid view with each entry showing a particular step? My main issue is that how I can send the images from each step back to Java. I cant keep going smoothen the image go back to java, show the image and then come back to jni do the sharpen step. This is where I am stuck.

Any guidance is much appreciated.

maybe, something like a picture whithin a picture ?

eg, if im is a 90x90 grayscale image, and mRgba is what you blit into the JavaCameraView:

Imgproc.cvtColor(im, im, Imgproc.COLOR_GRAY2RGBA); // it needs the same format for composition
im.copyTo(mRgba.submat(0,90,0,90));                // y,y+h, x,x+w

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM