Ask Your Question

hudac's profile - activity

2014-06-27 06:05:34 -0600 commented question Constantly cv::Exception from cvtcolor() when running code with GDB

Thanks @berak, the problem was that the first read was empty(). so mat.empty() solved it!

2014-06-25 16:19:21 -0600 commented question Constantly cv::Exception from cvtcolor() when running code with GDB

Well, it's actually a robot, so there is one thread for the vision (opencv), one thread for the motion etc... That's why I need all those threads..

2014-06-25 14:47:43 -0600 commented question Constantly cv::Exception from cvtcolor() when running code with GDB

I don't use capture.isOpened(), but I use: if (!capture.open(-1)) //Use -1 in order to get the default camera { throw new string("Couldn't open camera"); }

2014-06-25 14:45:30 -0600 commented question Constantly cv::Exception from cvtcolor() when running code with GDB

I will check it. But why doesn't the exception being thrown when I don't run it with gdb?

2014-06-25 14:39:51 -0600 received badge  Editor (source)
2014-06-25 14:36:51 -0600 commented question Constantly cv::Exception from cvtcolor() when running code with GDB

What do you mean? I do: capture.read(cameraFeed); while cameraFeed is Mat. Then I call cvtColor(cameraFeed, HSV, COLOR_BGR2HSV); (Mat HSV)

2014-06-25 14:26:41 -0600 asked a question Constantly cv::Exception from cvtcolor() when running code with GDB

Hey,

I'm running opencv 2.4.9 on ubuntu 13.10.
The code (c++) which calls the opencv functions is in a different thread.
After compiling the code, if I start it from console it works and everything is fine.
If I try to start the code with GDB I always get the following exception:

gdb

alt text

I tried to compile opencv with DEBUG flag and it didn't help.

edit 1: piece of code:

Mat cameraFeed;
Mat HSV;

capture.read(cameraFeed);
cvtColor(cameraFeed, HSV, COLOR_BGR2HSV);

Does anyone know anything about it?
Please tell if you need further information.