Simply not displaying what the camera sees - Android Face Detection [closed]

asked 2013-12-06 12:01:42 -0600

birdmw gravatar image

updated 2013-12-06 12:02:35 -0600

Hi there,

I added a TL;DR (too long didn't read) at the bottom for the lazy:

I want to do some OpenGL on top of OpenCV.

I am using from openCV - andoid - sample applications, the face detection sample code. \adt-bundle-windows-x86_64-20131030\OpenCV-2.4.7-android-sdk\samples\face-detection This code comes bundled with OpenCV-andoid and I have it working on my mobile device (exciting!)

I would like this application to run as normal, except with no visualization. In this way I hope to "hide" the OpenCV portion and only display what I am doing with OpenGL

My first (failed) approach was to make a new layout NewView.xml file, and then simply setContentView(NewView.xml) . Then in theory, the OpenCV would continue running, and I could display text on the displayed NewView.xml the position of the face it is detecting.

Now lets back up for a second. With the untouched original sample code, there is a method called "public Mat onCameraFrame(CvCameraViewFrame inputFrame)" that gets executed on every loop. I was able to play with the OpenCV visualizations by injecting my own code inside this method.

So it seemed logical for me to update my text on NewView.xml in this area: ... TextView t = (TextView)findViewById(R.id.textView1); t.setText("Something Else"); ... Unfortunately "Something Else" never gets displayed.

TL;DR: I would like to decouple the layout xml file from the OpenCV java so that the camera image does not get displayed. It's being a little challenging. Using from openCV - andoid - sample applications, the face detection sample code.

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by sturkmen
close date 2020-12-03 03:14:37.976865