Ask Your Question

antonio's profile - activity

2013-10-28 03:56:10 -0600 commented answer Advice to create GUI for OpenCV app

I know you can, but to make it work with OpenCV you must build it using the Visual Studio command prompt. Otherwise it won't work. This is also recommended in OpenCV documentation

2013-10-26 10:41:53 -0600 answered a question Advice to create GUI for OpenCV app

Look at the answer posted here: "http://answers.opencv.org/question/22564/how-to-do-opencv-in-windows-application/#22579" it gives an example for combining winforms and OpenCV.

Another option is to use Qt. However, you first need to build OpenCV with Qt support. This requires 3 steps: 1. build Qt from source. 2. configure OpenCV with QT support (see the answer given here for these 2 steps: http://answers.opencv.org/question/22816/how-to-set-the-path-to-qt5-in-cmake/#22817), and 3. build OpenCV (this is pretty standard, just build the solution generated with Cmake (see step 2)).

A nice step-by-step tutorial for creating a GUI application using OpenCV with Qt support is given here: http://www.youtube.com/watch?v=0ONxIy8itRA

2013-10-24 07:21:47 -0600 commented answer How to set the path to QT5 in cmake?

glad to hear that!

2013-10-23 08:43:41 -0600 commented answer camera to detect small objects

I'm afraid you cannot attach lenses to a standard webcam as the later comes with its onw lenses (which are usually wide angle lenses). What you can do though is to follow the instructions given in the first link I gave, and estimate what's the right focal length for your application. Then go and find a webcam with lenses of similar focal length. The tricky think is that very few webacams provide specifications for their lenses. You might have to ask the manufacturer then.

2013-10-22 13:09:03 -0600 received badge  Supporter (source)
2013-10-21 15:46:22 -0600 received badge  Editor (source)
2013-10-21 15:44:50 -0600 answered a question camera pose estimation

Note sure if I got it correctly but If you have a stereo camera pair, then why don't you just apply solvePnP for the image captured by the 'second' (say the Right) camera. This way you'll get the R+T for this camera. Note that the 'distCoeffs' may well be different to that of the 1st camera, and obviously it has to be known to use the solvePnP function.

In case you want the R+T of the 2nd camera with respect to the 1st camera, then I think you have to multiply the R+T matrix of the 1st camera with the inverse R+T matrix found for the second camera, where R+T matrix is the transformation matrix in homogeneous coordinates (for example, see here, or here). OpenCV has function for affine transformations (look here)

2013-10-21 13:10:57 -0600 answered a question How to set the path to QT5 in cmake?

Here are the steps that worked for me in configuring OpenCV with Qt and Visual Studio:

  1. Make sure you download the Qt source from here (make sure you download the zip file, in the Qt download page look for: "The source code is available as a zip..."
  2. Extract the zip file (say in: C:\Qt\QtSource485)
  3. Then you need to build it. Start up a Visual Studio Command Prompt (2010).
  4. Now navigate to the extracted folder and enter inside it by using the console window.
  5. Enter the following command (it worked for me fine):

    configure.exe -release -no-webkit -no-phonon -no-phonon-backend -no-script -no-scripttools -no-qt3support -no-multimedia -no-ltcg

  6. Then enter

    nmake

  7. Then add the built binary files path to the system path...If you have Matlab installed, make sure the C:\Qt\QtSource485\bin path is set BEFORE the Matlab path (this is crucial it took me hours to find why it does not worked otherwise!)

  8. Now start the CMake (cmake-gui). Check the 'Advanced' tick box before pressing Configure.
  9. After configuration tick 'WITH_QT'.
  10. Untick the 'Advanced' tick box.
  11. Press again Configure.
  12. Look for the 'QT_QMAKE_EXECUTABLE' option and browse: 'C:/Qt/QtSource485/bin/qmake.exe'
  13. Press generate and you're done. Then you are ready to build OpenCV with Qt! Good luck!
2013-10-21 10:09:25 -0600 commented question undefined reference to `cvLoadImage'

cvLoadImage should be fine as soon as you include library references in the .pro file, for example:

INCLUDEPATH += "C:/OpenCV245/mybuild2/install/include" LIBS += -L"C:/OpenCV245/mybuild2/install/lib" \ -lopencv_core245d \ -lopencv_imgproc245d \ -lopencv_highgui245d

DONT forget the 'l' letter just in front of each lib name.

2013-10-21 09:52:38 -0600 commented answer can svm classifier in opencv use for digital signal processing?

Well this has to do with the speed of your computer. Why don't you try a simulation experiment? That is, create a bunch of Mat structures with the number and size that you want, and measure how long it takes to create/process them with openCV. In this link (http://docs.opencv.org/doc/tutorials/ml/introduction_to_svm/introduction_to_svm.html) you can find a nice tutorial on how to feed the Mat structure with training data, etc.

2013-10-21 08:58:55 -0600 received badge  Nice Answer (source)
2013-10-21 03:37:10 -0600 answered a question HELP!!!! having issues tracking 2 colors
  1. "whenever i add another line to put in a new hue,sat,value it overrides the other color so i only detect the one that is the last to be read by the compiler": In the following line you are using the same image as in the previous line (I mean the "thresholded).

    //inRange(hsvImage_2, Scalar(14, 0, 0), Scalar(16, 255, 255), thresholded);// Orange Color

Try to create a second thresholded image (say "thresholded2"), and use:

inRange(hsvImage_2, Scalar(14, 0, 0), Scalar(16, 255, 255), thresholded2);// Orange Color

2.In this link you can find a basic tutorial for color object tracking where a circle is drawn around a color object tracked using OpenCV (it also explains how to set the center coordinates of the circle).

2013-10-21 03:25:18 -0600 answered a question Using camera calibration parameters in a real-time video capture application

Here are the three main steps you should follow after you've saved the intr./extr. params in xml files (I'm using C routines):

  1. Parameters should be loaded back in a matrix.

    CvMat intrinsic = (CvMat)cvLoad(“Intrinsics.xml”);

    CvMat distortion = (CvMat)cvLoad(“Distortion.xml”);

  2. Build the undistort map that will be used for all subsequent frames.

    IplImage* mapx = cvCreateImage( cvGetSize(image), IPL_DEPTH_32F, 1 );

    IplImage* mapy = cvCreateImage( cvGetSize(image), IPL_DEPTH_32F, 1 );

    cvInitUndistortMap(intrinsic, distortion, mapx, mapy);

  3. Undistort the initial image (say imin).

    cvRemap( imin, imundist mapx, mapy );

2013-10-21 00:41:46 -0600 received badge  Teacher (source)
2013-10-20 16:36:17 -0600 answered a question can svm classifier in opencv use for digital signal processing?

Well, SVM is a machine learning technique that is not specific to vision applications. Having said that, SVM may well be used for DSP applications (and plenty of others). The implementation in OpenCV is not specific to images, but requires the data being formatted as Mat structures, which makes possible the use of the algorithm for other applications too. In other words, your data (are they features extracted from signals? what's their numerical type? what's their dimensionality?) must follow the Mat format for using the OpenCV implementation of SVM. This is the only requirement.

2013-10-20 15:58:07 -0600 answered a question camera to detect small objects

I think your question has more to do with selecting the right lenses for your camera. In the following link you can find a nice white paper that explains what lenses a camera should have, and what the right resolution of the camera should be, for a given application. It contains some examples too. It's all about working distance and maximum size (width/height) of the objects that you'd like to image: Choosing the right lenses

For a basic (and easy to follow) optics tutorial you can have a look here

2013-10-20 15:22:27 -0600 commented answer How to do OpenCV in Windows Application?

Ok, I correct my remark too: "In the following link the user can find a nice step-by-step tutorial for creating a windows application using OpenCV with Qt: http://www.youtube.com/watch?v=0ONxIy8itRA . I hope this helps the user"

2013-10-18 17:05:36 -0600 received badge  Critic (source)
2013-10-18 17:05:14 -0600 commented answer How to do OpenCV in Windows Application?

Are you a lawyer of the 'user'???...with Qt you can make WINDOWS APPLICATIONS and NOT winforms that you describe!!!!...read more carefully next time, post your answer and dont criticize with arrogance!!!!!!

2013-10-16 14:02:19 -0600 answered a question OpenCV and usb capture device

i think opencv grabs video from most usb cameras: link text

2013-10-16 13:58:55 -0600 answered a question How to do OpenCV in Windows Application?

goggle 'opencv with Qt'...there are some nice youtube videos out there...

2013-10-11 16:40:41 -0600 asked a question Control Panel is disabled in Qt backened cvNamedWindow toolbar

Hi All,

I’ve configured OpenCV with Qt support and everything works fine apart from the ‘Properties Window’ icon which is disabled. Another option is to display it by Right clicking on the image window, but the icon is disabled there too:

image description

In my understanding, this icon activates a 'Control Panel' where buttons, etc, can be attached. As a result, If I try to create a button my program crashes displaying:

ASSERT failure in QVector<T>::operator[]: “index out of range”, file c:\qt\qtsource485\include\qtcore\../../src/corelib/tools/qvector.h, line 359

Is this a known bug? Or it has to do with the way I installed Qt/OpenCV?

I’ve configured OpenCV 2.4.5 with Qt 4.8.5.