Ask Your Question

dondan1976's profile - activity

2017-07-11 23:17:49 -0600 received badge  Famous Question (source)
2016-08-03 03:42:13 -0600 received badge  Notable Question (source)
2016-01-22 12:55:59 -0600 received badge  Popular Question (source)
2015-07-01 10:08:29 -0600 received badge  Famous Question (source)
2015-03-18 18:51:30 -0600 received badge  Student (source)
2015-01-06 06:04:35 -0600 received badge  Notable Question (source)
2014-11-13 14:50:11 -0600 received badge  Popular Question (source)
2014-05-28 19:51:12 -0600 asked a question Android NDK C++

Hello all,

I want to use OpenCV to build a C++ native application in Android that will capture frames from the camera. So far all my attempts have failed miserably. I been constantly getting below errors.

OpenCV::camera: ERROR reading YUV buffer: width=-1, height=-1, size=1, receivedSize=38016

OpenCV::camera: CvCapture_Android::grabFrame: NO new frame

All i want is a native app written in C++ to get Android camera frames.

It will greatly help if someone can point me to any sample code out there.

I appreciate your help!

Thanks in advance!

2014-05-14 11:48:34 -0600 asked a question OpenCV in Android C++

Hello all,

I am planning to use OpenCV in Android NDK layer to get frames from the phone camera. The reason i want it to be in the NDK is because of security concerns using the Java API's.

I have seen some samples here on using OpenCV in NDK with JNI layer. When i run those applications in my phone it's asking to install "OpenCV Manager" and also "OpenCV libraries".

Is it possible that i can eliminate the dependency of OpenCV Manager?

i.e., do some sort of static linking to the OpenCV libraries so that when i run the application it will not ask to install the OpenCV Manager and other specific libraries?

Please advise.

Thanks in advance!

2014-03-13 12:08:02 -0600 asked a question Keyboard input detection

Hello there,

I am new to OpenCV and would like to know whether it can be used to detect keyboard inputs entered by the user.

I am planning to write a software that will be platform independent and this software should be able to get all User inputs on the hardware/software keyboard.

Is this possible using OpenCV?

Thanks!

2014-02-27 12:11:44 -0600 asked a question Getting JPG Image Data

Hello there, Is it possible that i can get the JPG data for a image? I know it's possible to get the Image Data, but what i want is the complete data with the header and everything as per JPG format.

So am expecting something like,

unsigned char* pJpgData = cvGetJpgData(img); // where "img" is a Iplimage* or CMat

Thanks

2014-02-26 12:12:25 -0600 asked a question Image Crop

Hello there,

I have an image that's 320 x 240 in size. I draw a rectangle area over the image that needs to be cropped. I get 4 values from the rectangle and they are,

  1. X = X-axis value from top left of rectangle.
  2. Y = Y-axis value from top left of rectangle.
  3. Width = Width of rectangle.
  4. Height = Height of rectangle.

Now what am doing is,

Rect r(X, Y, Width, Height); Mat orig_Image; Mat cropped_Image = orig_Image(r).clone();

I tried some other approaches also. But what i see is that the cropping is not 100% accurate.

It looks like the Y axis seems to be off by few pixels.

Is there a different approach to cropping?

I am working on a C++ project.

Thanks in advance.

2014-02-20 18:33:06 -0600 asked a question Cropping Image

Hey there,

I am trying to crop an image using X, Y, Width & Height of a new image area.

So basically if the original image is 200 X 200, then i draw a rectangle over the area that i needs to be cropped.

From the top left position i calculate the X & Y, then the width & height of rectangle are taken.

Now i pass it to the cvRect function, and what i see is that the X position & Width & Height are correct, but the Y position is wrong.

i.e., when the image is cropped it for some reason goes for a wrong Y, even though i pass the correct Y.

Am just wondering whether OpenCV uses a different way to calculate the new Rect.

Any guess?

Thanks

2014-02-07 16:29:28 -0600 commented answer CascadeClassifier::Load from Memory

My app is crashing at this line,

cc.read(fs.getFirstTopLevelNode());

I got the new xml's and added. Everything before that line works fine. And i also have a proper xml data at that point.

2014-02-07 16:17:52 -0600 commented answer CascadeClassifier::Load from Memory

so how to do the old to new conversion?

is there any websites from where i can get the new xml's?

2014-02-07 14:59:39 -0600 received badge  Scholar (source)
2014-02-07 14:57:35 -0600 commented answer CascadeClassifier::Load from Memory

nothing like convert in opencv libraries

2014-02-07 14:23:55 -0600 received badge  Critic (source)
2014-02-07 12:07:32 -0600 commented answer CascadeClassifier::Load from Memory

I don't see a Convert function in CascadeClassifier class.

How can i convert from old to new?

I am using OpenCV 2.4.8

2014-02-07 11:37:28 -0600 asked a question CascadeClassifier::Load from Memory

Hey there,

I have the XML file compiled into the project and during run time i get the contents of the XML in a std::string.

Now i want to pass this into the CascadeClassifier::Load function. I am doing this so that there are no XML running around in the installation folder of my app.

Is it possible to do? Can i pass the string contents to Load function?

Or is there any other function i can use? Any other work around?

I am doing this to have the face detection feature.

Thanks

2014-02-06 17:39:47 -0600 asked a question Adding XML to Visual Studio for Face Detection

Hello there,

I have statically linked OpenCV libs to a Win32 console application in Visual Studio 2012. I got the webcam and face detection working awesome.

I am using the "haarcascade_frontalface_alt.xml" for face detection purpose and this is currently placed in the folder where the exe is present.

I want to link in this xml to project i.e., compile into the project and then use it at run time.

i.e., extract xml data from the compiled in xml file and load it to the corresponding OpenCV function.

Does anyone has suggestions on how to do this?

Any sample code will be helpful.

Thanks in advance.

2014-02-05 10:18:51 -0600 commented answer OpenCV : Build with lesser features

I did a new build of OpenCV and just built seleted lib's and added them to the project. But still the size is the same. The lib's i added to project are:

libjasper.lib libjpeg.lib libpng.lib libtiff.lib zlib.lib opencv_core248.lib opencv_highgui248.lib opencv_imgproc248.lib opencv_objdetect248.lib opencv_photo248.lib opencv_video248.lib vfw32.lib

I am using Visual Studio 2012. Is there any project settings that needs to be changed?

For some reason, it still seems to link all the lib's. Even though the "staticlib" directory only contains the above mentioned lib's.

The reason why i want to keep the size small is because that way whenever i come up with an update for the customer, they don't have to download much from the server. This is a limitation.

2014-02-04 18:53:12 -0600 asked a question OpenCV : Build with lesser features

Hello all,

I have a C++ app that uses OpenCV. Currently i am statically linking the OpenCV libs into my app. This is adding an extra overhead of 6+ MB.

Ideally i would like to remove some of the features that i am not using in OpenCV. The features am using are,

  1. Capture frames from Webcam.
  2. Face detection.
  3. Image formats (JPEG, PNG).
  4. Image rotation & resizing.

Is it possible to remove other features and trim down the libs?

My C++ app is developed in Visual Studio 2012.

Thanks in advance.

2014-02-03 11:15:08 -0600 asked a question Scaling down features in OpenCV 2.4.8

Hello there,

I am planning to use OpenCV in one of my projects to capture frames from the webcam. I know that OpenCV is feature rich. But all i would be using is to capture frames and then image formats like JPG, PNG and then probably face detection in future.

Due to installation restrictions, am planning to statically link the OpenCV libs.

If i use all the lib's as am doing now, it's gonna increase my app size considerably. So i would like to avoid as many features/libs as possible.

Can anyone suggest how to do this? Or is it even possible?

Thanks in advance.