I had the same issue. I found that I changed the data length. A product of reshape
arguments should be equal to a length of an array which you are changing. In your case:
des = np.array(des,np.float32).reshape(1, len(des))
Related Posts:
- How to resize an image with OpenCV2.0 and Python2.6
- inverting image in Python with OpenCV
- Cannot find module cv2 when using OpenCV
- Cannot find module cv2 when using OpenCV
- ImportError: numpy.core.multiarray failed to import
- import opencv vs import cv2
- Cannot find module cv2 when using OpenCV
- ImportError: DLL load failed: %1 is not a valid Win32 application. But the DLL’s are there
- ImportError: numpy.core.multiarray failed to import
- ImportError: DLL load failed: %1 is not a valid Win32 application. But the DLL’s are there
- Permission denied error by installing matplotlib
- How do I install Python OpenCV through Conda?
- How can I upgrade NumPy?
- Difference in output with waitKey(0) and waitKey(1)
- numpy with python: convert 3d array to 2d
- ImportError: libSM.so.6: cannot open shared object file: No such file or directory
- explain arguments meaning in res = cv2.bitwise_and(img,img,mask = mask)
- OpenCV NoneType object has no attribute shape
- What does bitwise_and operator exactly do in openCV?
- SystemError: new style getargs format but argument is not a tuple?
- ImportError: No module named ‘cv2’ Python3
- Cannot import cv2 in python in OSX
- ImportError: No module named cv2
- RuntimeWarning: overflow encountered in ubyte_scalars
- OpenCV NoneType object has no attribute shape
- Installing opencv on Windows 10 with python 3.6 and anaconda 3.6
- How to crop an image in OpenCV using Python
- SystemError: new style getargs format but argument is not a tuple?
- TypeError: Image data can not convert to float
- TypeError: Image data can not convert to float
- cmake error ‘the source does not appear to contain CMakeLists.txt’
- How does cv2.boundingRect() function of OpenCV work?
- OpenCV houghLinesP parameters
- Python OpenCV2 (cv2) wrapper to get image size?
- How can I reverse a list in Python?
- Searching the student-t distribution table for values using python
- How to declare an array in Python?
- Praw & Discord.py: The bot keep sending the same meme. I want the bot to send different meme whenever it is asked
- What does ** (double star/asterisk) and * (star/asterisk) do for parameters?
- How to reset index in a pandas dataframe? [duplicate]
- Python: Find in list
- TypeError: cannot perform reduce with flexible type
- syntaxerror: “unexpected character after line continuation character in python” math
- ValueError : I/O operation on closed file
- How to set environment variables in Python?
- I keep getting this error for my simple python program: “TypeError: ‘float’ object cannot be interpreted as an integer”
- Numpy std calculation: TypeError: cannot perform reduce with flexible type
- Regex: AttributeError: ‘NoneType’ object has no attribute ‘groups’
- Internal Redirect in Flask
- Matplotlib automatic legend outside plot
- Syntax behind sorted(key=lambda: …)
- convert nan value to zero
- How to install pip3 on Windows?
- Is there a NumPy function to return the first index of something in an array?
- Tkinter scrollbar for frame
- Create own colormap using matplotlib and plot color scale
- The difference between ‘+=’ and ‘=+’?
- How to fix “Attempted relative import in non-package” even with __init__.py
- Sorting a set of values
- Git Bash won’t run my python files?
- Can only use .dt accessor with datetimelike values
- Convert XML to CSV file
- Checking whether pip is installed?
- How to downgrade python from 3.7 to 3.6
- How to turn on line numbers in IDLE?
- How to use an image for the background in tkinter?
- Python locale error: unsupported locale setting
- sklearn Logistic Regression “ValueError: Found array with dim 3. Estimator expected <= 2."
- Sqlite3, OperationalError: unable to open database file
- What does ‘index 0 is out of bounds for axis 0 with size 0’ mean?
- How to return dictionary keys as a list in Python?
- ImportError: libGL.so.1: cannot open shared object file: No such file or directory
- Python List object attribute ‘append’ is read-only
- Infinite for loops possible in Python?
- RuntimeError: module compiled against API version a but this version of numpy is 9
- Python3 Error: TypeError: Can’t convert ‘bytes’ object to str implicitly
- Coalesce values from 2 columns into a single column in a pandas dataframe
- Unknown format code ‘f’ for object of type ‘str’- Folium
- Pyinstaller setting icons don’t change
- No module named ‘tqdm’
- Compute a confidence interval from sample data
- Can’t get Python to import from a different folder
- convert csv file to list of dictionaries
- What’s the difference between “virtualenv” and “-m venv” in creating Virtual environments(Python)
- OperationalError: database is locked
- Must have equal len keys and value when setting with an iterable
- print(__doc__) in Python 3 script
- Convert a 1D array to a 2D array in numpy
- How to print a linebreak in a python function?
- Pandas dataframe groupby plot
- Download Returned Zip file from URL
- Python 3 TypeError: must be str, not bytes with sys.stdout.write()
- tkinter gui layout using frames and grid
- How do I represent and work with n-bit vectors in Python?
- How to repeat individual characters in strings in Python
- ValueError: Cannot set a frame with no defined index and a value that cannot be converted to a Series
- SMTP AUTH extension not supported by server
- How to install PyQt4 on Windows using pip?
- How to install PyQt4 on Windows using pip?
- python dictionary error AttributeError: ‘list’ object has no attribute ‘keys’