Questions tagged [mahotas]

Mahotas is a set of functions for image processing and computer vision in Python.

Mahotas is a set of functions for image processing and computer vision in Python.

It is completely based on numpy arrays as its datatype. It has its heavy routines implemented in clean C++ in a way that is both very clean, type independent (using templates), and fast.

Full documentation is at https://mahotas.readthedocs.io/

Code repository is at https://github.com/luispedro/mahotas

54 questions
0
votes
0 answers

Why python raise a runtime error only with certain images?

It is the third question i do in stackoverflow about that because every time i got some changes in the way python raise runtime erro. Previous questions were: here and here. In the first question i think was a matter of memory because i anylized…
postgres
  • 2,242
  • 5
  • 34
  • 50
0
votes
1 answer

mahotas can not save the actual converted image

import os import mahotas from PIL import Image from pylab import * path='all_images' for file in os.listdir(path): current = os.path.join(path, file) extension = os.path.splitext(current)[-1] fileType = extension.upper() if…
Russel
  • 73
  • 2
  • 7
0
votes
1 answer

Why do I not get a good binary image with a grey background using the mahotas python module?

I got some problems with image with grey background with mahotas library: Example: This is the code: import mahotas as mh path ="./imagepath/a.jpg" fork = mh.imread(path) bin = fork[:,:,0] bfork = bin <230 After that i got that: What have i do…
postgres
  • 2,242
  • 5
  • 34
  • 50
0
votes
2 answers

How to rearrange print output in Python from column to a row?

I wrote a method computing Robert Haralick image features (using Mahotas package) on .tif medical images in the working directory. I receive the print output in a column like: 567657657 788979877 787879787 I need to convert it to the horizontal…
KvasDub
  • 281
  • 7
  • 16
0
votes
1 answer

How to compute colored pixel area on images using Python?

import numpy as np from matplotlib import cm from matplotlib import pyplot as plt import Image from scipy import ndimage import Image, ImageDraw import PIL import cv import cv2 from scipy.ndimage import measurements, morphology from PIL…
KvasDub
  • 281
  • 7
  • 16
0
votes
1 answer

How to select brown pixels on .tiff image and compute the area or a number of them in Python?

import numpy as np import scipy import pylab import pymorph import mahotas from scipy import ndimage image = mahotas.imread('img.tiff') pylab.imshow(image) pylab.show() I want to select (threshold) brown pixels (vessels) on medical image and…
KvasDub
  • 281
  • 7
  • 16
-1
votes
1 answer

Pip issue installing mahotas

I am new to python. I am trying to install Mahotas package in my CentOS machine. Command: sudo pip3 install mahotas Python version: 3.6.8 Os: CentOS 8 Error: Command "/usr/bin/python3.6 -u -c "import setuptools,…
thegautamnayak
  • 287
  • 4
  • 15
-1
votes
1 answer

Need to count objects on a white background in Python, shadows cause trouble

This question is kind of a follow-up to my 2 previous auestions: Python Image tutorial works, other images behaves differently (showing images with Pylab) and Detect objects on a white background in Python . What I am trying to achieve is being able…
E. V. d. B.
  • 815
  • 2
  • 13
  • 30
-1
votes
2 answers

How can i subtract the background from an image in mahotas and opencv in python?

I have many image like this or like this and i use this code: fork = mh.imread(path) bin = fork[:,:,0] bin = mh.erode(bin) bin = (bin < 80) for the 2nd image, but i have to use this: bin = (bin < 127) for the first. There is a way for…
postgres
  • 2,242
  • 5
  • 34
  • 50
1 2 3
4