Ask Your Question

rics's profile - activity

2019-09-17 01:37:01 -0600 received badge  Good Answer (source)
2017-10-17 13:47:51 -0600 received badge  Nice Answer (source)
2017-09-02 21:03:44 -0600 received badge  Nice Answer (source)
2017-05-19 02:58:40 -0600 received badge  Taxonomist
2017-04-05 13:36:34 -0600 received badge  Notable Question (source)
2017-02-07 05:09:03 -0600 received badge  Enthusiast
2016-08-13 13:17:25 -0600 received badge  Popular Question (source)
2016-06-28 01:34:03 -0600 received badge  Nice Answer (source)
2016-01-20 05:36:46 -0600 received badge  Famous Question (source)
2015-01-07 12:14:44 -0600 received badge  Good Question (source)
2014-12-09 13:48:26 -0600 marked best answer OpenCV for Android: development on Android device

I know from previous experience that starting Android OpenCV development is relatively complex including the installation and configuration of several tools.

I was wondering if it is possible to develop OpenCV Android applications on an Android device itself (with a sufficient screen size and possibly a keyboard). There are development environments for Android like AIDE, there is OpenCV Manager so at first sight it does not seem impossible.

If it is possible please tell me how. If not then is it a planned future direction?

2014-11-19 18:38:11 -0600 received badge  Notable Question (source)
2014-11-13 21:24:22 -0600 received badge  Nice Answer (source)
2014-03-04 05:09:27 -0600 marked best answer Nvidia Geforce 520M vs 540M for OpenCV

I am planning to buy a new laptop and I am hesitating about the video card of the system. I know that Geforce 540M has a bigger computational power than 520M but is it important from the point of view of OpenCV? First I would like to use it for simpler tasks (color detection, line following) but later I plan to take some tries with CUDA, stereo imaging, Kalman filter, ...

Any ideas? Thanks

2014-02-21 03:07:13 -0600 received badge  Popular Question (source)
2013-10-05 01:16:44 -0600 received badge  Nice Answer (source)
2013-06-05 07:02:43 -0600 received badge  Good Answer (source)
2013-05-31 04:03:06 -0600 commented question OpenCV 2.4.5 can't find OpenNI and PrimeSensor Module

Your install seems to be correct. You can check this comment : https://groups.google.com/d/msg/openni-dev/vnrOw1CEzvY/lyFtfKXT_ukJ and the config page: http://docs.opencv.org/doc/user_guide/ug_highgui.html to get further ideas.

2013-05-28 01:30:04 -0600 received badge  Nice Answer (source)
2013-05-27 14:17:16 -0600 answered a question Resize an image but fill the space with black ?

You can use the copyMakeBorder function. Border size can be set independently in each direction. Border type can be BORDER_CONSTANT with a black border value scalar.

2013-05-27 13:19:54 -0600 answered a question How to perform changes in both sub-image and original image ?

Although your example is not complete I think the problem is that you use m1 instead of m2 in the line

Mat image_roi = m1(roi);

OpenCv does not reallocate matrices for efficiency reasons, only when it has to. As m1 is not initialized in your code snippet it needs to be allocated independently of m2. If you use the following code

Mat image_roi = m2(roi);

then image_roi would use the same memory area as m2 but with a different matrix header so modifications of the roi would alter the original image.

See the Mat tutorial for details.

2013-05-26 06:52:10 -0600 answered a question Replace a range of colors with a specific color

You can use inRange to determine if a certain pixel is in the range R. Then you can set the pixels of Mat M to C where the output of inRange is non-zero using setTo.

It is like (not tested/compiled):

inRange(M,RangeLow,RangeHigh,Mask);
M.setTo(C,Mask);

Another solution could the usage of LUT function. You need to define a lookup table (hence the name) which is a simple array on conversion values where you set all the pixels in the range R to C. Then you can call:

LUT(M,lookuptable,M);
2013-05-24 09:27:27 -0600 answered a question About opencv in AIDE

Yes. Here I have described my solution. Since that time it still works correctly.

2013-05-03 02:30:47 -0600 answered a question onCameraFrame Mat to Jpeg

You can simply call Highgui.imwrite on the Mat as Alexander has already answered here. Quoting from the docs of function:

The image format is chosen based on the filename extension.

2013-04-29 13:54:15 -0600 received badge  Nice Answer (source)
2013-04-29 12:21:16 -0600 answered a question Detect non-humans (birds)

I think you should start with background subtraction using image averaging or BackgroundSubtractorMOG2. There is also a good chapter about the topic in Learning OpenCV book.

Then you need to classify the foreground and find your birds from example with a cascade classifier. Training the classifier is not an easy task. You may start with HOG descriptors to subtract pedestrians.

I would simply use background subtraction only to make things simpler at first. It will not harm if the system detects persons because if your are in the garden then herons are not and you will not care about the alarm inside. :)

2013-04-17 01:10:44 -0600 answered a question Portrait orientation on Android

This question shows how to change the screen orientation to portrait with screenOrientation="portrait" in the manifest. As the drawn image stays landscape you need a workaround to rotate the image canvas as I described in the answer referencing Lu Yu's work.

2013-04-12 03:39:10 -0600 commented answer video opening problem

off: StevenPuttemans' day ;) All actual answers are from you on my screen. 100 answers altogether. Keep on!

2013-04-03 15:25:53 -0600 received badge  Nice Question (source)
2013-04-03 15:25:38 -0600 marked best answer Why OpenCV building is so slow with CUDA?

When I completely rebuild OpenCV it takes hours if I use the with CUDA option? Such a block takes long minutes to compile:

My configuration:

  • Core i7 laptop
  • Nvidia Geforce 630M
  • Windows 7 32 bit
  • OpenCV 2.4.3
  • CUDA 5.0
  • MS Visual C++ 2010 Express

I had assumed that it was much faster given my fast CPU. During compilation only 1 out of 8 CPU cores is working, others are almost idle.

What is going on inside the CUDA compilation?

When I tried to stop building it was waiting for some minutes before it really stopped. Compiling a helloword test.cu was normal using nvcc. Similarly compiling Nvidia GPU Computing Toolkit's activity trace example with mingw took some seconds only.

So is it normal that GPU compilation of OpenCV takes so long?

2013-03-27 08:59:51 -0600 commented answer Async Initialization of OpenCV on Android using OpenCVManager

Have a look at image-manipulations example. You could place OpenCv function calls in onCameraViewStarted as well.

2013-03-27 03:52:04 -0600 answered a question Async Initialization of OpenCV on Android using OpenCVManager

Here is a sample program from the OpenCv code.

initAsync is called from onResume which uses BaseLoaderCallback. Then you could use your compare from CvCameraViewListener2 interface methods like onCameraFrame.

You can find similar examples in the android samples directory.

2013-03-20 12:59:20 -0600 commented answer Build application to detect and recognize faces in Java Desktop with openCV 2.4.4

Yes, although it is still useful to start to learn face detection and recognition and to use it in C++. Hopefully the complete Java version will come soon.

2013-03-20 12:50:31 -0600 answered a question How to search an element of one cvsequence into another cvsequence?

The documentation of SeqSort contains a usage example. SeqSearch can be used in a similar manner. The key is that you have to define a comparison function to compare sequence elements with your data in question.

2013-03-20 12:40:15 -0600 answered a question Build application to detect and recognize faces in Java Desktop with openCV 2.4.4

If you look around you will find several similar questions like this and this and this. You can start your learning from this tutorial. For Java there is a face detection sample in Android version.

2013-03-18 07:11:30 -0600 commented answer Round object detection

Here is a paper on how to detect ellipses with Randomized Hough Transform: http://www.saminverso.com/res/vision/EllipseDetection.pdf