Mahotas (Python computer vision, image processing library) installation

Source: Internet
Author: User
Tags image processing library

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.