Ask Your Question

k_sze's profile - activity

2015-01-22 14:53:12 -0600 received badge  Student (source)
2014-12-09 00:54:08 -0600 commented question Unable to detect any person using the CUDA HOG example app.

Thanks for the clarification. Assuming I don't train my own model just yet, how do I know if OpenCV finds the internal/built-in model correctly?

2014-12-04 04:52:16 -0600 asked a question cuda::BackgroundSubtractorFGD very slow

When running the gpu background subtraction example from the official OpenCV repository, I notice that the FGD algorithm is particularly slow, even with an NVIDIA Quadro K4000.

It clocks in at about 10 fps on full HD (1920x1080) videos, whereas MOG and MOG2 can do 150+ fps, and even GMG does about 60 fps.

Is that normal?

2014-12-02 01:54:16 -0600 commented question Unable to detect any person using the CUDA HOG example app.

What model? There is no mention of any model in the source code or in the command line help message of the gpu-example-hog executable.

EDIT I did a little bit more digging. Do you mean I need to first train a model file using samples/cpp/train_HOG.cpp (which compiles to cpp-example-train_HOG), or at least find an existing, usable model file?

2014-12-01 01:17:39 -0600 asked a question Unable to detect any person using the CUDA HOG example app.

I have compiled OpenCV 3.0.0 master (commit 50c9367d7ae8824654776ffd1fd6707448ccb384) with the examples. Among the examples is opencv_source_code/samples/gpu/hog.cpp, which compiles to a gpu-example-hog binary.

It runs and I see the video window with the fps. However, I am unable to get it to detect any person in the video file input (I don't see any rectangle being drawn). The original video file is 1920x1080p. I have also tried resizing it to 960x540, 640x360, 480x270, 384x216 and 320x180. None of these resolutions yielded any detection result.

Could somebody help me with tweaking the command-line arguments? I can post the original video somewhere if that helps.

2014-11-27 18:44:07 -0600 asked a question Unable to make OpenCV 3.0.0 beta with opencv_contrib

I'm trying to build OpenCV 3.0.0 beta with opencv_contrib and CUDA, but I run into the following errors during make

/home/kal/opencv-3.0.0-beta/samples/gpu/performance/tests.cpp: In member function ‘virtual void SURF_test::run()’: /home/kal/opencv-3.0.0-beta/samples/gpu/performance/tests.cpp:287:23: error: cannot declare variable ‘surf’ to be of abstract type ‘cv::xfeatures2d::SURF’ In file included from /home/kal/opencv-3.0.0-beta/samples/gpu/performance/tests.cpp:21:0: /home/kal/opencv_contrib/modules/xfeatures2d/include/opencv2/xfeatures2d/nonfree.hpp:74:20: note: because the following virtual functions are pure within ‘cv::xfeatures2d::SURF’: /home/kal/opencv_contrib/modules/xfeatures2d/include/opencv2/xfeatures2d/nonfree.hpp:81:26: note: virtual void cv::xfeatures2d::SURF::setHessianThreshold(double) /home/kal/opencv_contrib/modules/xfeatures2d/include/opencv2/xfeatures2d/nonfree.hpp:82:28: note: virtual double cv::xfeatures2d::SURF::getHessianThreshold() const /home/kal/opencv_contrib/modules/xfeatures2d/include/opencv2/xfeatures2d/nonfree.hpp:84:26: note: virtual void cv::xfeatures2d::SURF::setNOctaves(int) /home/kal/opencv_contrib/modules/xfeatures2d/include/opencv2/xfeatures2d/nonfree.hpp:85:25: note: virtual int cv::xfeatures2d::SURF::getNOctaves() const /home/kal/opencv_contrib/modules/xfeatures2d/include/opencv2/xfeatures2d/nonfree.hpp:87:26: note: virtual void cv::xfeatures2d::SURF::setNOctaveLayers(int) /home/kal/opencv_contrib/modules/xfeatures2d/include/opencv2/xfeatures2d/nonfree.hpp:88:25: note: virtual int cv::xfeatures2d::SURF::getNOctaveLayers() const /home/kal/opencv_contrib/modules/xfeatures2d/include/opencv2/xfeatures2d/nonfree.hpp:90:26: note: virtual void cv::xfeatures2d::SURF::setExtended(bool) /home/kal/opencv_contrib/modules/xfeatures2d/include/opencv2/xfeatures2d/nonfree.hpp:91:26: note: virtual bool cv::xfeatures2d::SURF::getExtended() const /home/kal/opencv_contrib/modules/xfeatures2d/include/opencv2/xfeatures2d/nonfree.hpp:93:26: note: virtual void cv::xfeatures2d::SURF::setUpright(bool) /home/kal/opencv_contrib/modules/xfeatures2d/include/opencv2/xfeatures2d/nonfree.hpp:94:26: note: virtual bool cv::xfeatures2d::SURF::getUpright() const /home/kal/opencv-3.0.0-beta/samples/gpu/performance/tests.cpp:291:44: error: no match for call to ‘(cv::xfeatures2d::SURF) (cv::Mat&, cv::Mat, std::vector<cv::KeyPoint>&, cv::Mat&)’ /home/kal/opencv-3.0.0-beta/samples/gpu/performance/tests.cpp:294:44: error: no match for call to ‘(cv::xfeatures2d::SURF) (cv::Mat&, cv::Mat, std::vector<cv::KeyPoint>&, cv::Mat&)’ /home/kal/opencv-3.0.0-beta/samples/gpu/performance/tests.cpp: In member function ‘virtual void ORB_test::run()’: /home/kal/opencv-3.0.0-beta/samples/gpu/performance/tests.cpp:342:17: error: no matching function for call to ‘cv::ORB::ORB(int)’ /home/kal/opencv-3.0.0-beta/samples/gpu/performance/tests.cpp:342:17: note: candidates are: In file included from /home/kal/opencv-3.0.0-beta/modules/calib3d/include/opencv2/calib3d.hpp:48:0, from /home/kal/opencv-3.0.0-beta/samples/gpu/performance/tests.cpp:4: /home/kal/opencv-3.0.0-beta/modules/features2d/include/opencv2/features2d.hpp:163:20: note: cv::ORB::ORB() /home/kal/opencv-3.0.0-beta/modules/features2d/include/opencv2/features2d.hpp:163:20: note: candidate expects 0 arguments, 1 provided /home/kal/opencv-3.0.0-beta/modules/features2d/include/opencv2/features2d.hpp:163 ... (more)

2014-11-10 05:45:27 -0600 asked a question Suitable algorithm for *non-adaptive* background removal

I'm using OpenCV 2.4.10.

If I understand correctly, BackgroundSubtractorMOG and BackgroundSubtractorMOG2 are specifically designed for background removal in real-time, in an adaptive way (the internal background model of the subtractor adapts to the last N frames that are fed in).

What if I can capture a sequence where I know the whole scene is the background, and I don't need the background subtraction to work in real-time.

I have hundreds of sequences of pre-recorded jpeg files of an indoor room, with some people walking around. And I also have a pre-recorded control sequence where the whole room is the background, with no person in it. Is there a better algorithm that I can use to perform background removal?