Ask Your Question

AgentCain's profile - activity

2018-06-01 05:55:40 -0600 received badge  Notable Question (source)
2016-01-30 16:03:34 -0600 received badge  Famous Question (source)
2015-10-13 09:25:42 -0600 received badge  Good Question (source)
2015-04-16 17:37:14 -0600 received badge  Notable Question (source)
2015-03-13 22:50:19 -0600 received badge  Popular Question (source)
2014-06-25 14:49:55 -0600 received badge  Popular Question (source)
2014-02-25 15:40:09 -0600 received badge  Taxonomist
2013-06-22 11:13:13 -0600 answered a question opencv_traincascade old format problem

Actually here's the solution http://code.opencv.org/issues/2387

2013-06-22 09:32:24 -0600 asked a question opencv_traincascade old format problem

Im trying to train a HAAR cascade using the new opencv_traincascade executable. Its also important that the file is compatible with the old cvhaardetectobjects, since I dont have the time to change the code. Using the old executable opencv_haartraining is not an option, since its buggy and slow (doesnt use parallel threads) There's a flag in opencv_traincascade which supposedly tells the training to use the old file format (-baseFormatSave) but using it doesn't produce exactly the same output .xml. It seems that the produced trees have more levels while the old format seems to have more trees.

Whats the problem?

2013-05-16 01:23:55 -0600 received badge  Nice Question (source)
2013-03-28 09:28:29 -0600 commented question Best calibration pattern for accuracy

I've tried both methods and I believe that the circle pattern is more accurate than the square one, judging the rms error after calibration. Should I need to explain it, I would bet on the pattern morphology itself. A square is more likely to be distorted while moving around than a circle due to camera focus. A circle tends to stay pretty much the same, regardless of camera focus, whereas a square will loose its corner sharpness. I prefer using the circles pattern, which yields better results on stereo correspondance.

2013-03-25 07:11:50 -0600 asked a question Executable never terminates when using OpenCL functions

When im running a program using OpenCL functions, like HOG Descriptor etc, it seems that it never reaches a state of termination. Gui closes, instances of classes get destructed but the executable stays on, doing nothing. I have to force close it using task manager (on Windows platform), the same code closes successfully when not initiating an OpenCL device.

Should I call some kind of termination function for the OpenCL device? Ive also tried exit(1) with no luck whatsoever.

2013-03-25 02:26:04 -0600 received badge  Good Question (source)
2013-03-24 06:47:03 -0600 received badge  Nice Question (source)
2012-11-22 04:00:07 -0600 commented answer From 3d point cloud to disparity map

This really helps, thank you very much! Do you also know where is the center of the coordinate system?I think its the dead center of the reprojectImageTo3D() output

2012-11-21 11:16:17 -0600 commented answer From 3d point cloud to disparity map

the thing is, I know that the output of the reprojectImageTo3D() function is of the same size as the disparity image. So every pixel of the output has the x,y,z values of the corresponding pixel in the disparity image. But how should I calculate the distance of that pixel relatively to the camera so I'll have the disparity. I dont know how the x,y,z axes are placed or where is the center of my xyz system relatively to the camera

2012-11-20 12:14:13 -0600 asked a question From 3d point cloud to disparity map

Using a stereo calibrated rig of cameras, Ive obtained a disparity map. Using the reprojectImageTo3D() function, I have the 3d point cloud. I want to do some filtering and segmentation on the point cloud and after that re-render it to a disparity image.

Is there an elegant way to do this? I know about projectPoints() and I found this rendering example http://opencv.jp/opencv2-x-samples/point-cloud-rendering but it offers a free way of viewing the point cloud. I would like to simulate it so the output I get is actually the same as the disparity map.

2012-09-17 10:47:42 -0600 received badge  Nice Answer (source)
2012-09-15 14:31:03 -0600 received badge  Nice Answer (source)
2012-09-14 00:03:14 -0600 received badge  Teacher (source)
2012-09-13 16:52:40 -0600 answered a question calibrate a camera and calculate the homography: assertion failed

Somewhere in your code (well, somewhere you're using a convertion since convert.cpp fails) you're using a function in which the source matrix isn't the same as the destination matrix in terms of mat.size or/and mat.channels (maybe one of them has different dimensions, maybe its uninitiallized, maybe one is RGB when the other one is grayscale etc). Thats why it says ASSERTION FAILED (src.size==dst.size && src.channels==dst.channels)

2012-09-13 16:51:17 -0600 answered a question calibrate a camera and calculate the homography: assertion failed

Somewhere in your code (well, somewhere you're using a convertion since convert.cpp fails) you're using a function in which the source matrix isn't the same as the destination matrix in terms of mat.size or/and mat.channels (maybe one of them has different dimensions, maybe its uninitiallized, maybe one is RGB when the other one is grayscale etc). Thats why it says ASSERTION FAILED (src.size==dst.size && src.channels==dst.channels)

2012-09-13 16:41:15 -0600 received badge  Editor (source)
2012-09-13 15:16:07 -0600 answered a question Why is my call to putText creating a wavy image of lines?

I would guess that these lines are just "memory garbage" since you dont load any kind of image on Mat letter. Also if im not mistaken, Point(0,0) is the upper left corner of the image (1st cell of a 2D matrix so its the upper-left-most cell) and it points to the lower left corner of your string "A" (so actually your letter "A" resides somewhere off the borders of the Mat)

Try Point (40,30) and then position it accordingly (since its more or less dead center)

2012-09-13 14:27:10 -0600 asked a question CL_INVALID_WORK_ITEM_SIZE error on OpenCL

I have a piece of code which uses HOGdescriptor to track people in a video file. The code passes compilation and runs without any problem on a PC equiped with 4 real cores and an Ati HD5750 gpu.

The same code, using the same opencv build crashes when Im trying to call the detectMultiScale() function on the HOGdescriptor, with an error output of "OpenCV Error: Gpu API call (CL_INVALID_WORK_ITEM_SIZE) in openCLExecuteKernel_, file C:\Users\XXX\git_opencv\modules\ocl\src\initialization.cpp, line 685". This particular PC is equiped with 2 real cores (hyperthreaded, so its 4 virtual) and an Ati HD5450 gpu.

The source line that seems problematic is: openCLSafeCall(clEnqueueNDRangeKernel(clCxt->impl->clCmdQueue, kernel, 3, NULL, globalThreads,localThreads, 0, NULL, NULL));

Now, I think that is some way TBB is involved, but Im not running anything in parallel. The code itself is written for serial execution. Is the detectMultiScale() function faulty (because for example I can upload a Mat to the gpu without any problems) or there's something else going on?

2012-08-23 02:40:59 -0600 commented answer Problems with StereoCalibrate

You're welcome. I guess calibrating each camera helps because you can cover the whole FOV of the camera. Calibrating it through a stereo rig decreases this area to just the common FOV of the stereo rig.

2012-08-22 10:46:07 -0600 commented answer Problems with StereoCalibrate

First step is to use the function calibrateCamera() for each of your cameras. So youll end up with intrinsic and extrinsic parameters for each camera seperately. Second step is to use the function stereoCalibrate() with the flag CV_CALIB_FIX_INTRINSIC enabled. This way it will only calculate the R,T,E and F parameters.

Inside the opencv documentation it clearly says that:

"due to the high dimensionality of the parameter space and noise in the input data, the function can diverge from the correct solution. If the intrinsic parameters can be estimated with high accuracy for each of the cameras individually (for example, using calibrateCamera() ), you are recommended to do so and then pass CV_CALIB_FIX_INTRINSIC flag to the function along with the computed intrinsic parameters. "

2012-08-22 05:18:43 -0600 commented answer Problems with StereoCalibrate

That is not the case. Im also on the "stereo business" :P and opencv clearly states that the default stereo calibration calibrates each camera and the stereo rig using the same images You have to make your own code in order to firstly calibrate each camera seperately (that means different images for each camera) and then calibrate the stereo rig. Also use the dotted pattern instead of the squares one, it produces better results. I managed to have an error of 0.3 pixels for each camera and a total of 0.4 pixels this way

2012-08-20 13:58:24 -0600 commented answer Opencl support (bm,sgbm etc)

I run them myself, no problem there. Many of them passed, some of them failed (I dont know why but anyway) but it run. Im able to compile opencv using VS10 but since it produces .lib files, the build is only compatible with VS10. And my code refuses to compile using VS10 (its like, only the basics, 1+1=2, run on VS10). Plus I HATE VS10. And the only reason that Im compiling in windows is the camera im using (it has a better API in windows than in linux, go figure). I prefer eclipse IDE and mingw

And the only reason Id like to use OpenCL is the blockmatching stereo algorithm and a few image filters in a near realtime manner.

2012-08-18 14:32:35 -0600 received badge  Supporter (source)
2012-08-18 14:29:41 -0600 commented answer Opencl support (bm,sgbm etc)

Interesting Thanks mate! And yes, Im using 64bit OS too :(

2012-08-18 04:36:29 -0600 commented answer Opencl support (bm,sgbm etc)

Its version 2.7 As Im using CMake in win7 to get the makefiles, CMake reports linking with C:/Program Files (x86)/AMD APP/lib/x86/libOpenCL.a as default.

2012-08-18 03:37:34 -0600 commented answer Opencl support (bm,sgbm etc)

Im familiar with cuda coding and I guess that the basics are the same (create a device, transfer data back and forth etc). I managed to build a version with openCL using a repository version. But the execution of my program ends with a crash from amdocl.dll. Does this mean that the build is not done properly or it has something to do with my openCL support?

I can reach as far as step 1, calling getDevice() I guess it initializes properly as the function returns 1

Before that i use .create(height,width,CV_8UC1) to allocate momory for some oclMat, just as I would do for a regular opencv Mat

It always crashes when trying to upload a Mat to an oclMat. Initialization and allocation is complete, then it crashes, reporting a fault in module amdocl.dll

2012-08-10 01:43:16 -0600 received badge  Student (source)
2012-08-07 09:10:03 -0600 asked a question Opencl support (bm,sgbm etc)

I recently found out that opencv can support opencl function for parallel GPU computing. Thats a huge PLUS for me, as Im using stereo vision algorithms for my project and I dont own a CUDA enabled GPU. I tried to build opencv with opencl support using the latest version from the repository, with little success. The built is completed successfully, libraries, include files, everything's there. But it doesnt work. Tried in both mingw and vs2010.

When will opencv will be available with opencl support as a prebuilt package for windows? Is there a guide available?