Mahotas is a Python library for computer vision and image processing. It contains a large number of image processing algorithms, C + + implementation form, improve performance. A completely numpy-based array, as its data type, has a very clean Python algorithm interface.
Include algorithm
- Watershed.
- Convex point calculation.
- Hit/hit, thinning algorithm.
- Zenit &haralick, Lycium barbarum polysaccharide, and the function of TAS.
- Freeimage-based NumPy image loading (requires installation of the Freeimage Library).
- Acceleration of robust features (SURF) and so on.
- The threshold value.
- Convolution.
- Sobel edge detection.
- Polygon Drawing
- Distance transform
- Feature calculation
- Spline interpolation
Installation issues
An error was encountered during the use pip install mahotas
of the installation process:
‘mahotas._histogram‘ extensionerror10.0isto find vcvarsall.bat).
Follow the prompts that are missing, Visual C + + 10.0
And on my computer, only VS2012 is installed.
After finding the information, I got an explanation.
Because it is a C + + implementation, all of the pip
C + + compilers are required to use the installation in Windows.
According to the official website explanation, the supported compiler versions are:
- Microsoft Visual C + + (x64, x86, and SP1 for CPython 2.6 and 2.7)
- Visual C + + (x64, x86, for CPython 3.3 and 3.4)
- Visual C + + (x64 and x86 for CPython 3.5) redistributable packages.
Solution Solutions
Binary version packages of Mahotas can be found in binary versions
After downloading the corresponding version of the binary file mahotas-1.4.0.cp*******.whl
Execute the following command at the command line
pip install mathotas-1.4.0.cp*******.whl
Run Tests
Open Python and enter the following command
importas pimportas npimportas mhf = np.ones((256,256), bool)f[200:,240Falsef[128:144,32:48False# f is basically True with the exception of two islands: one in the lower-right# corner, another, middle-leftdmap = mh.distance(f)p.imshow(dmap)p.show()
The terminal output is as follows, the installation is successful
Reference links
Mahotas official website
How to install Mahotas
Installing from Wheels
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Mahotas (Python computer vision, image processing library) installation