Ask Your Question

Eyal's profile - activity

2017-02-15 10:21:01 -0600 received badge  Notable Question (source)
2015-09-11 09:40:51 -0600 received badge  Popular Question (source)
2014-05-19 14:49:47 -0600 asked a question OpenCL issue on ARM

I'm trying to run OpenCV 2.4.8 OpenCL module on an arm based GPU. I'm getting an error "(localThreads[0] * localThreads[1] * localThreads[2] <= kernelWorkGroupSize)". I'm aware this may not be supported, but is there a way to go around this issue? by forcing OpenCV to use a 1x1x1 workgroup configuration?

thanks Eyal

2013-12-16 15:22:02 -0600 commented answer OpenCL and GPU with Android OpenCV SDK

Hi Andrey - is that still the case? Can't run OpenCV's OpenCL modules on Android devices?

thanks

2013-12-16 15:09:28 -0600 received badge  Editor (source)
2013-12-16 15:08:06 -0600 asked a question Bilateral filter performance

Hi, Hi, I'm running OpenCV's bilateralFilter on an ARM quad core mobile device. I have the following questions:

  1. I pass 5 as the d parameter. The filter on H and W is actuall from -2 to 2, right?
  2. As far as I can see the code ends up in the BilateralFilter_8u_Invoker (this is a CV_8UC3 input matrix). How many CPU threads/cores are used in that case?
  3. It seems that on intel arch the code uses SSE. Does ARM implementation have neon support? where can I see that in the opencv code?

thanks.

2013-05-03 03:50:36 -0600 commented answer onCameraFrame Mat to Jpeg

Hi, I'm not sure how this helps me. I have a Mat object acquired by the camera. First, I'm not sure what is its format? RGBA, RGB, YUV? How do I determine this based on the camera or the Mat object? Second, I need to convert the Mat, whatever format it is in, to a YuvImage object so I can later on stream it out of the android device. How do I convert the Mat object to the buffer data that the YuvImage object expects?

Thanks Eyal

2013-05-02 14:20:15 -0600 asked a question onCameraFrame Mat to Jpeg

Hi, So I'm a bit new to OpenCV and android :) I'm using the camera and want to capture the the frame data and stream it out of the device. I get the frame data in the onCameraFrame method and have the following questions:

  • In what type does the data in Mat is? I saw somewhere that it might be YUV but from the samples as well as some tests I've done its more likely to be RGBA?
  • I need to convert the data to Jpeg but when I use the following code I get a corrupted JPEG image. Any ideas what's wrong?

        Mat matRGB = new Mat();
        Mat matYUV = new Mat();
        Imgproc.cvtColor(frame.mat_, matRGB, Imgproc.COLOR_RGBA2RGB, 3);
        Imgproc.cvtColor(matRGB, matYUV, Imgproc.COLOR_RGB2YUV, 3);
        int iImageWidth = matYUV.cols(); //frame.sFrameResolution_.width;
        int iImageHeight = matYUV.rows(); //frame.sFrameResolution_.height;
    
    
    int iRawFrameDataSize = (int)matYUV.total() * matYUV.channels();
    byte buffer[] = new byte[iRawFrameDataSize];
    matYUV.get(0, 0, buffer);
    android.graphics.Rect previewRect = new android.graphics.Rect(0, 0, iImageWidth, iImageHeight);
    
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    final YuvImage image = new YuvImage(buffer, android.graphics.ImageFormat.YUY2, iImageWidth, iImageHeight, null);
    image.compressToJpeg(previewRect, 100, baos);
    
    byte[] jdata = baos.toByteArray();