-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problems finding cv::gpu::SURF_GPU #12
Comments
Have you installed/built OpenCV with the GPU module? There are some missing windows API, try to add
It also seems you are missing an include from the SSBA library, did you download and build it? |
Initially I've used the prebuilt library downloaded from opencv.org. It has the opencv_gpu lib and dll files but I don't know what build settings were used. I've just finished compiling from and made sure the I'll try |
Quick update, I'm one step closer: I've found SURF_GPU in opencv2/nonfree/gpu.hpp so used that header instead of opencv2/gpu/gpu.hpp. Now I'm getting this:
I'm guessing it's SSBA library, which I haven't managed to compile yet.
I'm stuck at
from here(http://stackoverflow.com/questions/7859105/infinity-and-nan-values) |
try to solve first the problem of missing WIN32 includes, try to add to common.cpp
isinf can be defined as well, have a look at stackoverflow |
Thanks for this!
Now it looks like it's down to SSBA. On that side I'm compiling SuiteSparse, but need to compile it's dependencies first. |
Just a comment about this:
Actually this is an easy source of confusion with the recent OpenCV. The prebuilt versions of OpenCV don't come with GPU support anymore (since it would make the library around 1GB download!), but they still come with opencv_gpu lib & DLL files that are just empty wrappers. So if you need GPU support for current versions of OpenCV, you now need to install the CUDA Toolkit then build OpenCV from scratch (rather than just download prebuilt version). Also, it is possible you might need to add the opencv_nonfree lib to your project, but if you only care about the GPU version of SURF then it probably doesn't need opencv_nonfree module. |
Thank you for explaining this. I've downloaded the CUDA Toolkit but haven't installed it yet. I got a warning saying that my graphics card isn't supported (I'm using a laptop with an Intel HD Graphics 4000 chip). I'll install anyway now and recompile OpenCV |
You will need an NVIDIA GPU to run the GPU module, but if you just want to build the code with GPU support on your laptop then you could install the CUDA Toolkit and build OpenCV with GPU support and run it on something that does have an NVIDIA GPU (either a desktop, or a laptop with an NVIDIA Optimus dual-GPU). If you need to run it on your laptop without a GPU, then you would have to modify the code to use the regular CPU version of SURF, and make sure you link to the opencv_nonfree module that contains SURF. |
Ok, Think I will have to do that.
I'll be happy once I manage to compile this, then I'll make a copy and change the GPU parts to CPU parts. |
Hello. I can compile your code but I don't know how to run it. For example I store my image in the folder C:/ img / pic. What is the correct command in dos? |
The README file in the folder of that code shows the command-line for running it. |
Hi, I'm revisiting this SfM chapter and the sample code, on OSX 10.10.5 this time. Now I'm stuck towards the end of the compilation process:
I'm not exprienced with PCL and ROS so could really use any hints/tips here. I did have a peak at the PCL docs and found this section:
I've tried blindly swapping toROSMsg with fromPCLPointCloud2, but no joy:
For now I've tried commenting out this section of the
I thought I compiled opencv with CUDA correctly, but I can't see libopencv_dep_cudart.dylib anywhere. In short:
Update I've found CMakeFiles/ExploringSfMExec.dir/link.txt where =========================== Load Images ===========================
...........................................................................................
-------------------- extract feature points for all images -------------------
------------------------------------- done -----------------------------------
------------ Match frame_0000.png,frame_0001.png ------------
imgpts1 has 22 points (descriptors 22)
imgpts2 has 20 points (descriptors 20)
F keeping 18 / 18
18 matches before, 18 new matches after Fundamental Matrix
------------ Match frame_0000.png,frame_0002.png ------------
imgpts1 has 22 points (descriptors 22)
imgpts2 has 19 points (descriptors 19)
F keeping 16 / 16
16 matches before, 16 new matches after Fundamental Matrix
------------ Match frame_0000.png,frame_0003.png ------------
imgpts1 has 22 points (descriptors 22)
imgpts2 has 20 points (descriptors 20)
F keeping 10 / 13
13 matches before, 10 new matches after Fundamental Matrix
------------ Match frame_0000.png,frame_0004.png ------------
imgpts1 has 22 points (descriptors 22)
imgpts2 has 22 points (descriptors 22)
F keeping 16 / 16
16 matches before, 16 new matches after Fundamental Matrix
------------ Match frame_0000.png,frame_0005.png ------------
imgpts1 has 22 points (descriptors 22)
imgpts2 has 21 points (descriptors 21)
F keeping 14 / 15
15 matches before, 14 new matches after Fundamental Matrix
------------ Match frame_0000.png,frame_0006.png ------------
imgpts1 has 22 points (descriptors 22)
imgpts2 has 22 points (descriptors 22)
F keeping 8 / 14
14 matches before, 8 new matches after Fundamental Matrix
------------ Match frame_0000.png,frame_0007.png ------------
imgpts1 has 22 points (descriptors 22)
imgpts2 has 21 points (descriptors 21)
F keeping 7 / 12
12 matches before, 7 new matches after Fundamental Matrix
------------ Match frame_0000.png,frame_0008.png ------------
imgpts1 has 22 points (descriptors 22)
imgpts2 has 23 points (descriptors 23)
F keeping 7 / 13
13 matches before, 7 new matches after Fundamental Matrix
------------ Match frame_0000.png,frame_0009.png ------------
imgpts1 has 22 points (descriptors 22)
imgpts2 has 21 points (descriptors 21)
F keeping 7 / 11
11 matches before, 7 new matches after Fundamental Matrix
------------ Match frame_0000.png,frame_0010.png ------------
imgpts1 has 22 points (descriptors 22)
imgpts2 has 21 points (descriptors 21)
F keeping 7 / 9
9 matches before, 7 new matches after Fundamental Matrix
------------ Match frame_0000.png,frame_0011.png ------------
imgpts1 has 22 points (descriptors 22)
imgpts2 has 24 points (descriptors 24)
F keeping 7 / 12
12 matches before, 7 new matches after Fundamental Matrix
------------ Match frame_0000.png,frame_0012.png ------------
imgpts1 has 22 points (descriptors 22)
imgpts2 has 24 points (descriptors 24)
F keeping 7 / 11
11 matches before, 7 new matches after Fundamental Matrix
------------ Match frame_0000.png,frame_0013.png ------------
imgpts1 has 22 points (descriptors 22)
imgpts2 has 20 points (descriptors 20)
F keeping 7 / 8
8 matches before, 7 new matches after Fundamental Matrix
------------ Match frame_0000.png,frame_0014.png ------------
imgpts1 has 22 points (descriptors 22)
imgpts2 has 19 points (descriptors 19)
F keeping 7 / 9
9 matches before, 7 new matches after Fundamental Matrix
------------ Match frame_0000.png,frame_0015.png ------------
imgpts1 has 22 points (descriptors 22)
imgpts2 has 16 points (descriptors 16)
F keeping 7 / 9
9 matches before, 7 new matches after Fundamental Matrix
------------ Match frame_0000.png,frame_0016.png ------------
imgpts1 has 22 points (descriptors 22)
imgpts2 has 18 points (descriptors 18)
F keeping 7 / 10
10 matches before, 7 new matches after Fundamental Matrix
------------ Match frame_0000.png,frame_0017.png ------------
imgpts1 has 22 points (descriptors 22)
imgpts2 has 18 points (descriptors 18)
F keeping 7 / 9
9 matches before, 7 new matches after Fundamental Matrix
------------ Match frame_0000.png,frame_0018.png ------------
imgpts1 has 22 points (descriptors 22)
imgpts2 has 18 points (descriptors 18)
F keeping 7 / 8
8 matches before, 7 new matches after Fundamental Matrix
------------ Match frame_0000.png,frame_0019.png ------------
imgpts1 has 22 points (descriptors 22)
imgpts2 has 20 points (descriptors 20)
F keeping 7 / 10
10 matches before, 7 new matches after Fundamental Matrix
------------ Match frame_0000.png,frame_0020.png ------------
imgpts1 has 22 points (descriptors 22)
imgpts2 has 21 points (descriptors 21)
F keeping 7 / 12
12 matches before, 7 new matches after Fundamental Matrix
------------ Match frame_0000.png,frame_0021.png ------------
imgpts1 has 22 points (descriptors 22)
imgpts2 has 21 points (descriptors 21)
F keeping 7 / 10
10 matches before, 7 new matches after Fundamental Matrix
------------ Match frame_0000.png,frame_0022.png ------------
imgpts1 has 22 points (descriptors 22)
imgpts2 has 20 points (descriptors 20)
F keeping 7 / 12
12 matches before, 7 new matches after Fundamental Matrix
------------ Match frame_0000.png,frame_0023.png ------------
imgpts1 has 22 points (descriptors 22)
imgpts2 has 20 points (descriptors 20)
F keeping 10 / 12
12 matches before, 10 new matches after Fundamental Matrix
------------ Match frame_0000.png,frame_0024.png ------------
imgpts1 has 22 points (descriptors 22)
imgpts2 has 20 points (descriptors 20)
F keeping 8 / 14
14 matches before, 8 new matches after Fundamental Matrix
------------ Match frame_0000.png,frame_0025.png ------------
imgpts1 has 22 points (descriptors 22)
imgpts2 has 21 points (descriptors 21)
F keeping 9 / 14
14 matches before, 9 new matches after Fundamental Matrix
------------ Match frame_0000.png,frame_0026.png ------------
imgpts1 has 22 points (descriptors 22)
imgpts2 has 22 points (descriptors 22)
F keeping 7 / 13
13 matches before, 7 new matches after Fundamental Matrix
------------ Match frame_0000.png,frame_0027.png ------------
imgpts1 has 22 points (descriptors 22)
imgpts2 has 22 points (descriptors 22)
F keeping 7 / 12
12 matches before, 7 new matches after Fundamental Matrix
------------ Match frame_0000.png,frame_0028.png ------------
imgpts1 has 22 points (descriptors 22)
imgpts2 has 22 points (descriptors 22)
F keeping 7 / 11
11 matches before, 7 new matches after Fundamental Matrix
------------ Match frame_0000.png,frame_0029.png ------------
imgpts1 has 22 points (descriptors 22)
imgpts2 has 25 points (descriptors 25)
F keeping 7 / 11
11 matches before, 7 new matches after Fundamental Matrix
------------ Match frame_0000.png,frame_0030.png ------------
imgpts1 has 22 points (descriptors 22)
imgpts2 has 24 points (descriptors 24)
F keeping 7 / 12
12 matches before, 7 new matches after Fundamental Matrix
------------ Match frame_0000.png,frame_0031.png ------------
imgpts1 has 22 points (descriptors 22)
imgpts2 has 20 points (descriptors 20)
F keeping 7 / 9
9 matches before, 7 new matches after Fundamental Matrix
------------ Match frame_0000.png,frame_0032.png ------------
imgpts1 has 22 points (descriptors 22)
imgpts2 has 21 points (descriptors 21)
F keeping 7 / 9
9 matches before, 7 new matches after Fundamental Matrix
------------ Match frame_0000.png,frame_0033.png ------------
imgpts1 has 22 points (descriptors 22)
imgpts2 has 18 points (descriptors 18)
F keeping 7 / 9
9 matches before, 7 new matches after Fundamental Matrix
------------ Match frame_0000.png,frame_0034.png ------------
imgpts1 has 22 points (descriptors 22)
imgpts2 has 17 points (descriptors 17)
F keeping 7 / 8
8 matches before, 7 new matches after Fundamental Matrix
------------ Match frame_0000.png,frame_0035.png ------------
imgpts1 has 22 points (descriptors 22)
imgpts2 has 17 points (descriptors 17)
F keeping 7 / 8
8 matches before, 7 new matches after Fundamental Matrix
------------ Match frame_0000.png,frame_0036.png ------------
imgpts1 has 22 points (descriptors 22)
imgpts2 has 18 points (descriptors 18)
F keeping 7 / 7
7 matches before, 7 new matches after Fundamental Matrix
------------ Match frame_0000.png,frame_0037.png ------------
imgpts1 has 22 points (descriptors 22)
imgpts2 has 19 points (descriptors 19)
F keeping 7 / 10
10 matches before, 7 new matches after Fundamental Matrix
------------ Match frame_0000.png,frame_0038.png ------------
imgpts1 has 22 points (descriptors 22)
imgpts2 has 16 points (descriptors 16)
F keeping 7 / 9
9 matches before, 7 new matches after Fundamental Matrix
------------ Match frame_0000.png,frame_0039.png ------------
imgpts1 has 22 points (descriptors 22)
imgpts2 has 24 points (descriptors 24)
F keeping 7 / 11
11 matches before, 7 new matches after Fundamental Matrix
------------ Match frame_0000.png,frame_0040.png ------------
imgpts1 has 22 points (descriptors 22)
imgpts2 has 22 points (descriptors 22)
F keeping 7 / 12
12 matches before, 7 new matches after Fundamental Matrix
------------ Match frame_0000.png,frame_0041.png ------------
imgpts1 has 22 points (descriptors 22)
imgpts2 has 23 points (descriptors 23)
2015-12-15 01:09:31.489 ExploringSfMExec[43867:3462323] *** Assertion failure in +[NSUndoManager _endTopLevelGroupings], /SourceCache/Foundation/Foundation-1154/Misc.subproj/NSUndoManager.m:340
2015-12-15 01:09:31.490 ExploringSfMExec[43867:3462323] +[NSUndoManager(NSInternal) _endTopLevelGroupings] is only safe to invoke on the main thread.
F keeping 7 / 12
12 matches before, 7 new matches after Fundamental Matrix
------------ Match frame_0000.png,frame_0042.png ------------
imgpts1 has 22 points (descriptors 22)
imgpts2 has 21 points (descriptors 21)
F keeping 7 / 8
8 matches before, 7 new matches after Fundamental Matrix
------------ Match frame_0000.png,frame_0043.png ------------
imgpts1 has 22 points (descriptors 22)
imgpts2 has 22 points (descriptors 22)
2015-12-15 01:09:31.500 ExploringSfMExec[43867:3462323] (
0 CoreFoundation 0x00007fff88bb503c __exceptionPreprocess + 172
1 libobjc.A.dylib 0x00007fff9091976e objc_exception_throw + 43
2 CoreFoundation 0x00007fff88bb4e1a +[NSException raise:format:arguments:] + 106
3 Foundation 0x00007fff8974199b -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 195
4 Foundation 0x00007fff896c364f +[NSUndoManager(NSPrivate) _endTopLevelGroupings] + 156
5 AppKit 0x00007fff8fc78b95 -[NSApplication run] + 756
6 libpcl_visualization.1.8.dylib 0x000000010f5d0705 _ZN3pcl13visualization13PCLVisualizer8spinOnceEib + 565
7 ExploringSfMExec 0x0000000107613bce _Z20RunVisualizationOnlyv + 4974
8 ExploringSfMExec 0x0000000107630e16 _ZN5boost6detail11thread_dataIPFvvEE3runEv + 22
9 libboost_thread-mt.dylib 0x0000000107ab4ae4 _ZN5boost12_GLOBAL__N_112thread_proxyEPv + 52
10 libsystem_pthread.dylib 0x00007fff8cf6b05a _pthread_body + 131
11 libsystem_pthread.dylib 0x00007fff8cf6afd7 _pthread_body + 0
12 libsystem_pthread.dylib 0x00007fff8cf683ed thread_start + 13
)
2015-12-15 01:09:31.502 ExploringSfMExec[43867:3462323] *** Assertion failure in +[NSUndoManager _endTopLevelGroupings], /SourceCache/Foundation/Foundation-1154/Misc.subproj/NSUndoManager.m:340
2015-12-15 01:09:31.503 ExploringSfMExec[43867:3462323] An uncaught exception was raised
2015-12-15 01:09:31.504 ExploringSfMExec[43867:3462323] +[NSUndoManager(NSInternal) _endTopLevelGroupings] is only safe to invoke on the main thread.
2015-12-15 01:09:31.504 ExploringSfMExec[43867:3462323] (
0 CoreFoundation 0x00007fff88bb503c __exceptionPreprocess + 172
1 libobjc.A.dylib 0x00007fff9091976e objc_exception_throw + 43
2 CoreFoundation 0x00007fff88bb4e1a +[NSException raise:format:arguments:] + 106
3 Foundation 0x00007fff8974199b -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 195
4 Foundation 0x00007fff896c364f +[NSUndoManager(NSPrivate) _endTopLevelGroupings] + 156
5 AppKit 0x00007fff8fc78c41 -[NSApplication run] + 928
6 libpcl_visualization.1.8.dylib 0x000000010f5d0705 _ZN3pcl13visualization13PCLVisualizer8spinOnceEib + 565
7 ExploringSfMExec 0x0000000107613bce _Z20RunVisualizationOnlyv + 4974
8 ExploringSfMExec 0x0000000107630e16 _ZN5boost6detail11thread_dataIPFvvEE3runEv + 22
9 libboost_thread-mt.dylib 0x0000000107ab4ae4 _ZN5boost12_GLOBAL__N_112thread_proxyEPv + 52
10 libsystem_pthread.dylib 0x00007fff8cf6b05a _pthread_body + 131
11 libsystem_pthread.dylib 0x00007fff8cf6afd7 _pthread_body + 0
12 libsystem_pthread.dylib 0x00007fff8cf683ed thread_start + 13
)
F keeping 7 / 11
11 matches before, 7 new matches after Fundamental Matrix
------------ Match frame_0000.png,frame_0044.png ------------
imgpts1 has 22 points (descriptors 22)
imgpts2 has 20 points (descriptors 20)
2015-12-15 01:09:31.505 ExploringSfMExec[43867:3462323] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '+[NSUndoManager(NSInternal) _endTopLevelGroupings] is only safe to invoke on the main thread.'
*** First throw call stack:
(
0 CoreFoundation 0x00007fff88bb503c __exceptionPreprocess + 172
1 libobjc.A.dylib 0x00007fff9091976e objc_exception_throw + 43
2 CoreFoundation 0x00007fff88bb4e1a +[NSException raise:format:arguments:] + 106
3 Foundation 0x00007fff8974199b -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 195
4 Foundation 0x00007fff896c364f +[NSUndoManager(NSPrivate) _endTopLevelGroupings] + 156
5 AppKit 0x00007fff8fc78c41 -[NSApplication run] + 928
6 libpcl_visualization.1.8.dylib 0x000000010f5d0705 _ZN3pcl13visualization13PCLVisualizer8spinOnceEib + 565
7 ExploringSfMExec 0x0000000107613bce _Z20RunVisualizationOnlyv + 4974
8 ExploringSfMExec 0x0000000107630e16 _ZN5boost6detail11thread_dataIPFvvEE3runEv + 22
9 libboost_thread-mt.dylib 0x0000000107ab4ae4 _ZN5boost12_GLOBAL__N_112thread_proxyEPv + 52
10 libsystem_pthread.dylib 0x00007fff8cf6b05a _pthread_body + 131
11 libsystem_pthread.dylib 0x00007fff8cf6afd7 _pthread_body + 0
12 libsystem_pthread.dylib 0x00007fff8cf683ed thread_start + 13
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Abort trap: 6 I have no idea what these Obj-C errors are about. Maybe there's something in the UI code that causes it, but I wouldn't even know where to begin. I ran into some CUDA related errors when using the =========================== Load Images ===========================
...........................................................................................
-------------------- extract feature points for all images (GPU) -------------------
OpenCV Error: Gpu API call (CUDA driver version is insufficient for CUDA runtime version) in mallocPitch, file /Users/georgeprofenza/Downloads/Grouped/cv/OpenCV-2.4.12/modules/dynamicuda/include/opencv2/dynamicuda/dynamicuda.hpp, line 1134
libc++abi.dylib: terminating with uncaught exception of type cv::Exception: /Users/georgeprofenza/Downloads/Grouped/cv/OpenCV-2.4.12/modules/dynamicuda/include/opencv2/dynamicuda/dynamicuda.hpp:1134: error: (-217) CUDA driver version is insufficient for CUDA runtime version in function mallocPitch
Abort trap: 6 I did install CUDA Toolkit 7.5.20 for OSX 10.10 (and made sure all it's components (including the driver) is installed). The graphics card on this computer is NVIDIA GeForce GT 330M 512 MB which might not be a card supporting CUDA well. Running the application with the CPU and the OF or RICH options produces the uncaught What is the correct/recommended way of running this code for Chapter 4 ? Thank you for your time, |
I'm still relatively new to c++ so I've managed to run in trouble when trying to compile the code from Chapter4. I'm using MSVS 2010 Pro and I've got opencv 2.4.6 and PCL 1.6.0.
Here is the output I'm getting:
Any hints on how I could continue compiling the project ?
The text was updated successfully, but these errors were encountered: