drawKeypoints bug?
Hi! I'm trying to learn some Opencv with Python, and I'm following illustrations/examples from a book, and I'm stuck because of what seems to be a bug. It says " AttributeError: module 'cv2.cv2' has no attribute 'drawKeypoints' "
I'm using native Python 3.6.6 on windows 7, 64bit. I installed Opencv3 with pip. The OpenCv version I'm using is 4.0.0. The book I'm trying to learn from is called OpenCV 3x with Python By Example Second Edition. And it's written by Gabriel Garrido.
I've reinstalled OpenCv, without success...I also tried some suggestion about installing Opencv-contrib module (or something like that), and it didn't do any differences or whatsoever.
I've also attached a link with a picture of the code that gives me the error, so I hope the picture is available by the time this post is accepted by a mod! ^^
So is this a bug or something like that in OpenCv, or is cv2.drawKeypoints(input_image, keypoints, input_image, color=(0,255,0))
this just an incorrect use of the drawKeypoints function?
[Edit]
So here's the result of print(cv2.getBuildInformation())
:
General configuration for OpenCV 4.0.0 =====================================
Version control: 4.0.0
Platform:
Timestamp: 2019-01-09T18:51:15Z
Host: Windows 6.3.9600 AMD64
CMake: 3.12.2
CMake generator: Visual Studio 14 2015 Win64
CMake build tool: C:/Program Files (x86)/MSBuild/14.0/bin/MSBuild.exe
MSVC: 1900
CPU/HW features:
Baseline: SSE SSE2 SSE3
requested: SSE3
Dispatched code generation: SSE4_1 SSE4_2 FP16 AVX AVX2
requested: SSE4_1 SSE4_2 AVX FP16 AVX2 AVX512_SKX
SSE4_1 (5 files): + SSSE3 SSE4_1
SSE4_2 (1 files): + SSSE3 SSE4_1 POPCNT SSE4_2
FP16 (0 files): + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 AVX
AVX (4 files): + SSSE3 SSE4_1 POPCNT SSE4_2 AVX
AVX2 (11 files): + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 FMA3 AVX AVX2
C/C++:
Built as dynamic libs?: NO
C++ Compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe (ver 19.0.
24241.7)
C++ flags (Release): /DWIN32 /D_WINDOWS /W4 /GR /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D
_SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi /EHa /wd4127 /wd4251 /wd4324 /wd4275 /wd4512 /wd4589 /MP2 /MT /O2 /Ob2 /
DNDEBUG
C++ flags (Debug): /DWIN32 /D_WINDOWS /W4 /GR /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D
_SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi /EHa /wd4127 /wd4251 /wd4324 /wd4275 /wd4512 /wd4589 /MP2 /MTd /Zi /Ob0
/Od /RTC1
C Compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe
C flags (Release): /DWIN32 /D_WINDOWS /W3 /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SC
L_SECURE_NO_WARNINGS /Gy /bigobj /Oi /MP2 /MT /O2 /Ob2 /DNDEBUG
C flags (Debug): /DWIN32 /D_WINDOWS /W3 /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SC
L_SECURE_NO_WARNINGS /Gy /bigobj /Oi /MP2 /MTd /Zi /Ob0 /Od /RTC1
Linker flags (Release): /machine:x64 /NODEFAULTLIB:atlthunk.lib /INCREMENTAL:NO /NODEFAULTLIB:libcmtd.lib /NO
DEFAULTLIB:libcpmtd.lib /NODEFAULTLIB:msvcrtd.lib
Linker flags (Debug): /machine:x64 /NODEFAULTLIB:atlthunk.lib /debug /INCREMENTAL /NODEFAULTLIB:libcmt.lib
/NODEFAULTLIB:libcpmt.lib /NODEFAULTLIB:msvcrt.lib
ccache: NO
Precompiled headers: YES
Extra dependencies: ade ...
can you show us your code ? Have you got same problem with this code if you use
First of all, thanks for trying to help me!
And I tried your suggestion LBerger, but I still get the very same error.
With my code I cannot reproduce your bug (python 3.6 opencv4..0.1). Now can you insert in your question print(cv2.getBuildInformation())
When I put it in my code, I still got the very same error, so I simply ran it in a terminal, and it showed lots of things. Anything specific I should look for?
insert all in your post as here
Sadly can't post the code right now, the website says:
edit your question : don't need to post an answer