2016-01-21 04:58:02 -0600 | commented question | Unpredictable behaviour from cv::HOGDescriptor::detectMultiScale, depending on input. Hi thanks for your reply. I will check the window sizes again to make sure I'm using the same window size to both train and detect. SVMlight outputs a "model" with the various support vectors, a bunch of different kernel parameters and a "threshold" value. I always assumed this is what was expected in the "hit_threshold" parameter of HOGDescriptor::detectMultiScale. If you don't mind me asking, how should one look to finding the correct threshold value? Should this be optimised through trial and error, or using a cost function? |
2016-01-18 11:21:34 -0600 | asked a question | Unpredictable behaviour from cv::HOGDescriptor::detectMultiScale, depending on input. Hi, I am trying to implement a HOG SVM detector using my own training data and have had trouble getting it to work reliably. I am using OpenCV 2.4 in visual studio. I am using the SVMlight library which generates a descriptor vector and a hit threshold for the HOGDescriptor object. I set the HOG object using this descriptor vector and run detectMultiscale using the hit threshold generated by SVMlight. What will happen is my program will stall on this function indefinitely. However if I change the descriptor vector to the default people detector provided by OpenCV then I begin to get detections again. The default people descriptor vector is 1981 values in length with hit threshold 0. My SVMlight trained descriptor vector is 3781 values in length with hit threshold -0.6566. If I change the hit threshold to from -0.6566 to zero, I also start to get detections, although they are often false positives since this is the incorrect threshold. Another issue I have is if I try to set a custom window size (48x48) for example, I get an assertion error: checkDetectorSize() with no more feedback to help me understand the problem. My question is, does anyone know what I could do to work around these problems? Could it be SVMlight? Is there another SVM library I can use to train the detector? Are these bugs inherent to the HOG class in OpenCV 2.4? Thanks for the help, I can provide more detailed information if required. |
2015-12-16 05:54:33 -0600 | commented question | Lightweight GUI integration with keyboard callback and buttons The GUI would be used more for debugging than for running the programs in release mode. I want to use a GUI for things like moving backwards and forwards in a video, pausing, toggling various features and views, recording, taking a screenshot etc. which is definitely realistic on these devices. My main gripe with the HighGui module is the lack of buttons and the fact that cv::waitKey() is not a true callback function. |
2015-12-16 05:37:26 -0600 | asked a question | Lightweight GUI integration with keyboard callback and buttons Hi, The GUI elements built into OpenCV are fairly limited, and don't have features like true keyboard callbacks (waitKey stalls the program) or buttons. I realise Qt is supported but that is a huge library and I don't need to make full use of all of its features. I also need something which will not slow down my programs as I will be running them on NVidia Tegras and Raspberry Pis. So my question: has anyone found any lightweight C++ GUI libraries which they have managed to integrate into their OpenCV programs (notably reading in a cv::Mat and displaying it in the GUI)? I have looked at FLTK but the license is GPL and I am looking for something with a BSD license or similar where I do not have to open source my code. Thanks |
2015-10-28 05:07:29 -0600 | received badge | ● Enthusiast |
2015-10-27 19:23:23 -0600 | asked a question | Is it possible to run a GPU HOG with a custom window size? I have been trying to train and run a GPU accelerated HOG detector using SVMlight and a winow size of 48x48 pixels. I have gotten the HOG to work with the standard 49x96 window size for people, but when I try to train with my own data with a size of 48x48, the program stalls for a very long time in detectMultiScale() and fails to run properly. This bug seems to be related: http://code.opencv.org/issues/2874 I have tried in OpenCV 2.4 with no success, and now I am trying with the CUDA library in OpenCV 3.0 but still getting the same stall issue. My question is, has anyone managed to get this working with a custom window size? |
2015-10-20 09:50:03 -0600 | asked a question | Different output from GPU implementation of HOG Hi, I have built two HOG SVM detectors for detecting people, which I have trained myself. One of them is GPU accelerated (using the OpenCV 2.4 gpu module), but other than that, the rest of the code is exactly the same. However, when running them side by side, on the same video, I am getting different outputs. They are both detecting people and behaving as intended however the GPU version will detect some of the people that were not detected in the CPU version and vice versa. I just wanted to know if anyone who is well versed in GPU programming could explain why this might be the case? Is there a slight difference in the algorithm which is programmed for GPU which causes the numbers to shift around a bit? Thanks |
2015-09-29 09:48:52 -0600 | asked a question | Cannot build OpenCV 2.4 in Visual Studio 2013 Hi, I have tried the relevant tutorials online to do this, but when I try and build the solution (Debug and Release) they each give me: I made sure CMake had no errors before generating the build files, and all of the drivers (CUDA, python, etc.) have been installed properly. I am making sure I run everything as administrator and I have added the following to my path: Could the libraries not be linking properly in Visual Studio? Am I forgetting something obvious? I have made sure I followed all of the steps in this tutorial, although I noticed this was written at the time of VS 2012. Here is the output of the build console in case it helps: (more) |
2015-09-21 10:12:00 -0600 | commented question | No compute method for cv::gpu::HOGDescriptor That was the answer, thanks! |
2015-09-21 10:05:44 -0600 | asked a question | GPU error in cv::gpu::HOGDescriptor::computeConfidenceMultiScale When using this function I get the following error: I have checked the inputs to the method, and the descriptors for the HOG seem OK (although it is just a bunch of numbers). It seems to be a CUDA/GPU issue yet the gpu library has run fine for me up until this point. I don't really know what to do here, as the message is so cryptic, and I have no access to resize_for_hog. Has anyone come across this before or happen to know what could cause this error? Happy to provide more details which could help. |
2015-09-16 09:38:46 -0600 | asked a question | No compute method for cv::gpu::HOGDescriptor Hi, I am trying to build a GPU accelerated SVM detector using HOG in OpenCV 2.4 (cannot upgrade to 3 right now unfortunately). I have noticed that this function below does not exist in the cv::gpu implementation: As I understand it, it is the method for computing the hog features for the image. I was wondering if it did exist in the gpu library under a different name? I have looked through the source code here: https://github.com/Itseez/opencv/blob... but couldn't find something that looked like an equivalent, however I may have just missed it (I am quite new to HOG). In short, does anyone know if this method exists in cv::gpu::HOGDescriptor under a different name? |