Ask Your Question

FreeVMS's profile - activity

2016-10-19 22:18:56 -0600 received badge  Taxonomist
2013-09-09 11:26:19 -0600 asked a question CameraBridgeViewBase from service

How use Java Camera in Background(into Service)?

in service at the moment I can only native camera connect.

Java Camera(CameraBridgeViewBase) need initialization with VIEW, like this:

 mOpenCvCameraView = (CameraBridgeViewBase) findViewById(R.id.tutorial1_activity_java_surface_view);
2013-05-15 01:59:51 -0600 asked a question Problem with load OpenCV in Android Service

Problem with load OpenCV in Android Service. OpenCV load successfull, but have one question - when OpenCV Manager don't install, Alert dialog "Package not found" don't show.

private void mOpenCVLoader() {
        Log.i(TAG, "Trying to load OpenCV library");
        if (!OpenCVLoader.initAsync(OpenCVLoader.OPENCV_VERSION_2_4_4, this,
                mOpenCVCallBack)) {
            Log.e(TAG, "Cannot connect to OpenCV Manager");
        }
    }

Log:

05-15 09:53:25.898: E/AndroidRuntime(12558): FATAL EXCEPTION: main
05-15 09:53:25.898: E/AndroidRuntime(12558): java.lang.RuntimeException: Unable to create service sample.stand.keyboard.Keyboard_Service: android.view.WindowManager$BadTokenException: Unable to add window -- token null is not for an application
2013-03-05 01:36:14 -0600 received badge  Student (source)
2012-11-25 22:54:36 -0600 commented answer Work with function calcOpticalFlowPyrLK

Its work. Thank you very much!

2012-11-25 22:54:17 -0600 answered a question Work with function calcOpticalFlowPyrLK

Its work. Thank you very much!

2012-11-23 00:09:50 -0600 asked a question Work with function calcOpticalFlowPyrLK

Can we use «MatOfPoint2f prevPts» an array of all the points MatOfPoint2f[] in method Video.calcOpticalFlowPyrLK as an input parameter, like in OpenCV for Windows?

For Android I only can do the following:

Video.calcOpticalFlowPyrLK(Cadr_Prev,Cadr_Current,
 Point_PrevPts[iindex],
 Point_CurrentPts[iindex],
 _bstatus[iindex], 
 _trackError[iindex]);

P.S. I run in cycle the function calcOpticalFlowPyrLK for each point and it affects on productivity.

2012-11-07 07:18:35 -0600 received badge  Editor (source)
2012-11-07 07:18:03 -0600 asked a question OpenCV 2.4.3 on Android. Work with CameraBridgeViewBase

Hello! Can you tell me please how can I make the camera turning in portrait orientation running example face detection. In the 2.4.3 RC appeared the following: New Java samples framework. Samples are significantly refactored, we recommend you to look into the new architecture, because it resolves some issues of the old framework. New framework provides unified base for CV application including any of Java or Native cameras, custom view layout, easy Manager-based OpenCV initialization, proper application event handling: pause, resume, rotation, etc.

There is no description how to make camera turning in the specification of the CameraBridgeViewBase on the web site. I tried this:

public Mat onCameraFrame(Mat inputFrame) {

inputFrame.copyTo(mRgba);
Imgproc.cvtColor(mRgba, mGray, Imgproc.COLOR_RGBA2GRAY);
if ((getResources().getConfiguration().orientation == Configuration.ORIENTATION_PORTRAIT)
&& (mGray != null) && (mRgba != null)) {

Core.transpose(mGray, tmp_grey);
Core.flip(tmp_grey, mGray, 0);

}

The results are – mgray turns (I can see it in the rendering). The same operation using mRgba gives black screen and there is no error. I used Asus Nexus 7

I tried VideoCapture in OpenCV 2.4.2, no results.

2012-10-16 07:04:39 -0600 received badge  Supporter (source)
2012-10-16 06:55:43 -0600 asked a question How to rotate the camera when using class VideoCapture

How to rotate the camera when using class VideoCapture? (Sample Face Detection). When rotate android device, VideoCapture turns, but Image from Camera do not rotate

When work with class Camera we can use void setDisplayOrientation .

If im declare a class Camera and VideoCapture, application does not start. Write this error: In applications Face Detection error occurred

public Camera         mCamera;
public VideoCapture   mCapture;

and in method 
   public void surfaceChanged(SurfaceHolder _holder, int format, int width, int height) {
        Log.i(TAG, "surfaceChanged");
    setDisplayOrientation(Activity,cameraId,camera);
    }
2012-10-16 06:07:25 -0600 asked a question Rotate VideoCapture on Android

How can rotate VideoCapture when rotate Android Device

When work with class Camera we can use void setDisplayOrientation .