My test Android app has a single activity, LoadImage, with two methods: an onCreate method that processes images with OpenCV, and a Display method which displays the image on the screen for 5 seconds. Here is what I have so far for the Display method:
[convert OpenCV matrix to a bitmap using an OpenCV method]
Canvas canvas = new Canvas(bitmap);
canvas.drawBitmap(bitmap, 0, 0, null);
try {
synchronized (this) {
wait(5000);
}
} catch (InterruptedException e) {
}
and here is the XML file for the single activity (it's a blank screen):
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent" >
</RelativeLayout>
If I run the code as-is, I get... a blank screen. How do I get the bitmaps to show up?
Thanks so much.