Ask Your Question

itay's profile - activity

2018-08-05 11:07:16 -0600 received badge  Famous Question (source)
2016-02-12 12:12:20 -0600 received badge  Notable Question (source)
2015-07-03 10:36:38 -0600 received badge  Famous Question (source)
2015-04-05 06:53:49 -0600 received badge  Popular Question (source)
2015-01-13 01:15:12 -0600 received badge  Enthusiast
2014-12-09 13:57:42 -0600 marked best answer How can i change FPS of javacamera on android


I want to know if there is a chance to change the FPS of the camera, so i get into "onCameraFrame" function less often?

If there is no way to do it, what can i do if i want to perform image processing in a real time and do not let the value of the inputframe to change in the middle of the calculation.


2014-12-01 06:11:37 -0600 commented question c++: ...............

You should change CV_32FC1 to CV_32FC3 that means you want to read all 3 channels

2014-11-13 03:11:14 -0600 commented question Implementing edge-detection on android platform.

Do you mean with java without openCV at all?

2014-11-10 00:38:36 -0600 commented question OpenCV Image Recognition For Android

You can integrate C++ inside your android project, that if you want to work on real time. Follow this link - , work slow and make sure that youv'e done each steps.

2014-11-09 01:13:41 -0600 commented question Installation NDK JNI C/C++ problem

Did you configure NDKROOT to the right place? in the Environment variable?

2014-11-06 04:56:40 -0600 commented question copyTo error

I think that both matrix have to be in the same size, So what I suggest you to do, is to create another temp matrix with the same dimension like the crop matrix, than re-size this matrix and copy.

2014-11-06 02:07:26 -0600 commented question copyTo error

Where did you initiate crop_image Matrix? Try to make this: Mat crop_image= new Mat(new Size(width, height), Your type(Example CvType.CV_8U));

2014-11-04 08:40:59 -0600 commented question ─░mage Processing with Android

@thdrksdfthmn Is right, But i beleive that it's depend what you want to get. OpenCV support also Java code that it's easier to work with when you work on android application. The problem is when you need to do a pixels manipulation that OpenCV doesn't support, Than it's better to use C++(It is harder to debug and understand, also you have to setting your project to do so and it's not so obvious.) Bottom line, OpenCV is a really good tool for image processing , First try to code in Java, If the process time is not good, Move to c++ ;

2014-10-28 01:38:15 -0600 commented question How to find angle of corners detected?

I think this answer could help you to find the other points how to find the coordinate of top/bottom/left and right points

2014-10-27 09:08:45 -0600 commented question How to find angle of corners detected?

Please, Edit your code in your answer to make it readable.

2014-10-27 08:38:02 -0600 answered a question How to find angle of corners detected?

First, you have to find 3 points.

So for this I'll suggest first to select first the angle you want to check and than take the position of the near vertex(This will be your first point). You can give this point the value of(0,0) Origin of the coordinate.

Now you know that there is 2 lines go out from this point. find the coordinate of the most far pixel from this point By X and Y.

For example if I look for the top left corner (My origin) I search the most right pixel coordinate(Second point) and the most bottom pixel coordinate(Third point).

Now you have 3 point, So you can find the angle using this topic Hope it solved your problem.

2014-10-27 06:56:32 -0600 commented question I cleaning I does that mean China get here quick

Posted twice

2014-10-27 06:46:24 -0600 commented question How to find angle of corners detected?

Can you please add screen shots of what exactly you get in the input and output ?

2014-10-27 06:25:13 -0600 commented question rgb to grayscale in android

Please add the LogCat?

2014-10-27 02:57:28 -0600 commented question rgb to grayscale in android

Where exactly the code crash? In what line? Can you add a log plot please?

2014-10-19 00:32:53 -0600 commented question Masking ROI at video frame

Did you take in purpose "CV_CAP_PROP_FRAME_WIDTH" twice for both width and height? The common image height that fit to width - 1920 is 1280. Please try to change"CV_CAP_PROP_FRAME_WIDTH" to "CV_CAP_PROP_FRAME_HEIGHT" when the value is 1280 and let me see the error please.

2014-10-14 02:09:37 -0600 commented question About umat

Those matrices are getting created on the GPU side.

2014-10-14 01:09:25 -0600 commented question Masking ROI at video frame

I want you to debug each step and write me the size of every matrix that you used : frame, draw and mask.

2014-10-06 06:23:10 -0600 received badge  Nice Answer (source)
2014-10-06 03:23:37 -0600 commented answer How to do numerica calculation in android

The second answer is this:

Scalar res1 = Core.sumElems(your matrix); int sumDiff = res1.val[0];

2014-10-06 03:21:35 -0600 commented answer How to do numerica calculation in android

If you want yo multiply/divide by 255 than do this : Core.multiply(MatSrc1, Scalar.all( 255), MatDestination); I don't understant what do you want to count?

2014-10-05 02:54:07 -0600 answered a question How to do numerica calculation in android


Here you can find all the functions that you want: Operations on Arrays

In order to use it with your android application, just import the core library:

import org.opencv.core.Core;

Than you can use it like this (Some examples):

Core.subtract(MatSrc1,MatSrc2, MatDestination);

Core.multiply(MatSrc1, MatSrc2, MatDestination);

You can also multiply with Scalar:

 Core.multiply(MatSrc1,  Scalar.all( YourScalarValue), MatDestination);

Hope this is what you mean.

2014-10-02 09:24:44 -0600 commented question Resize the camera stream

First you have to check if the minimum size that you mention is supported : You can do that :

 camera =;
 parameters = camera.getParameters();
 List<Size>SupporetdSizes = parameters.getSupportedPreviewSizes();
2014-09-29 06:21:16 -0600 received badge  Necromancer (source)
2014-09-28 04:44:27 -0600 commented answer How to get camera preview sizes natively for Android & desktop

You right I mean parameters.getSupportedPreviewSizes()

2014-09-28 04:05:43 -0600 answered a question How to iterate through pixels in Android

You can do like this for example:

Mat yourMatrix =  new Mat(new Size(screenWidth,screenHeight),CvType.CV_8U);

for(int i = 0 ; i < screenHeight ; i++)
   for(int j = 0 ; j < W; j++)
      yourMatrix.row(i).col(j).setTo(new Scalar(i + j));


If your matrix big, iterate through all the pixels, take you a long long time.

My advice, if your matrix is big (my matrix size was 1920x1080) work with native c++ with android.

2014-09-28 03:51:30 -0600 answered a question Reading an image from drawable folder- android

You have to initial the image Matrix like this:

Mat image =  new Mat(new Size(Width,Height ),CvType.CV_8U);// Change CvType as you need.

and then :

image = Highgui.imread(file.getAbsolutePath());

Hope it solve your problem.

2014-09-28 03:44:41 -0600 answered a question How to get camera preview sizes natively for Android & desktop

You can try using android.hardware.Camera parameters like this:

camera =;
parameters = camera.getParameters();
List<Size> SupporetdSizes =  parameters.getSupportedPreviewSizes()
2014-09-28 01:10:03 -0600 commented answer Problem in creating hello project with OpenCV for Android

This is really wired, If you want, this is my mail : talk with me there,I believe we can solve your problem with teamviewer.

2014-09-28 01:05:44 -0600 commented answer Q: Live Camera feed without preview?
2014-09-28 01:05:44 -0600 received badge  Commentator
2014-09-22 05:17:19 -0600 commented answer Problem in creating hello project with OpenCV for Android

It's look that you used the tegra version, I don't know if the problem is there. but try to download it also from the link I sent you.