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
2
votes
1 answer

Cannot determine type of file

Hi i have just started learning image processing using python. When i tried to open an image that i downloaded from the net, I keep getting this error and I have no idea about how to resolve it. Can anyone please help me with this? >>>…
user142303
  • 21
  • 2
2
votes
2 answers

How can i count number of black spaces in scikit image or mahotas?

i have an image like this: after I skeletonize it by scikit image's skeletonize function from skimage import morphology out = morphology.skeletonize(gray>0) There is a way for counting the number of black spaces? (in this picture six) except the…
postgres
  • 2,242
  • 5
  • 34
  • 50
2
votes
1 answer

How can i know if there are white pixels in a binary image in some coordinates (stored in a list) in python?

I have a numpy array binary (black and white) image and coordinates in a list of tuples like: coordlist =[(110, 110), (110, 111), (110, 112), (110, 113), (110, 114), (110, 115), (110, 116), (110, 117), (110, 118), (110, 119), (110, 120), (100, 110),…
postgres
  • 2,242
  • 5
  • 34
  • 50
2
votes
2 answers

enthought mahotas.imread cannot find freeimage

I'm new to python and it was recommended that I use Canopy. I'm trying to follow along with this tutorial, but I get stuck at the mahotas.imread line. I get an error saying that ends with this: Full error was: mahotas.freeimage: could not find…
ramesesjd
  • 181
  • 1
  • 11
2
votes
1 answer

Image manipulation in Python (compute graph edge distance between nodes (region centroids)

I need to binarize image and compute selected microvessels (black-brown ), then to split image array into 100 equal parts and set centroids in these image regions (with max and min numbers of black pixels) and compute graph edge distance between…
KvasDub
  • 281
  • 7
  • 16
2
votes
2 answers

python mahotas.imread reads a 2d image as 3d

I have an image saved by another code of mine. The image is a normal JPG file. I saved it with imsave. now when I'm reading it in another code, it seems to be 3d :S the image is here. and a simple code to read it is this : import mahotas img =…
Kiarash
  • 7,378
  • 10
  • 44
  • 69
1
vote
3 answers

Reducing / Enhancing known features in an image

I am microbiology student new to computer vision, so any help will be extremely appreciated. This question involves microscope images that I am trying to analyze. The goal I am trying to accomplish is to count bacteria in an image but I need to…
1
vote
1 answer

Computer-vision: How to remove debris when counting cells?

I am attempting to use python to count some cells in an image. I am more or less following the tutorial here. After a thresholding step, I find the regional maximas and count them. This works very well for counting nuclei, however there are some…
von Mises
  • 266
  • 1
  • 6
  • 17
1
vote
1 answer

Cell segmentation

I'm newbie in computer vision. My goal is to distinguish individual cells on a set of pictures like this: Example Basically, I blur whole image, find region maximum on it and use it like seed in watershed algorithm on distance tranfsform of…
Qumeric
  • 518
  • 5
  • 16
1
vote
2 answers

3D image segmentation and tracking algorithm for neural data

I am trying to implement a 3D segmentation and tracking algorithm of neuron/axon data from fluorescence imaging. I looked into Watershed algorithm, active contours, OTSU thresholding but am unable to make a decision on which algorithm to go for.…
Chits
  • 23
  • 1
  • 4
1
vote
0 answers

How to write a big amount of multipage TIFF files?

Hi everybody from a beginner in Python. I try to convert a huge file of raw video data into multiple multipage TIFF files by using the "freeimage.write_multipage()" function of the freeimage package from the Mahotas library (Python 2.7).…
Al_92130
  • 11
  • 1
1
vote
1 answer

python mahotas: Applying threshold filter and saving image as pgn

I'm having a problem with a code that extracts characters from an image: Example: Original image Processed image I am applying a bunch of filters to try and extract specific characters from these signs and send them to my OCR software (gaussian…
Jean-Luc Nacif Coelho
  • 1,006
  • 3
  • 14
  • 30
1
vote
0 answers

Mahotas imread Cannot Determine Type of File

Hi I'm trying to use Mahotas to read an image. I'm getting an error saying "ValueError: mahotas.freeimage: cannot determine type of file picture.jpeg". I've tried several images and filetypes including bmp and png. import mahotas picture =…
Corey Cole
  • 2,262
  • 1
  • 26
  • 43
1
vote
1 answer

How can I apply a function to an image proportionally to his size in python?

I have an image and I would like to apply dilation, erosion, closing, opening operations proportionally to the image size. In my code I divided the images in three sets but I think it's better to use other better ways. How can I change gradually the…
postgres
  • 2,242
  • 5
  • 34
  • 50
1
vote
2 answers

Why after histogram equalization (scikit image) and Otsu mahotas method in some images get out big white squares?

I used histogram equalization and adaptation for erase illumination from the grayscale images: import scipy import numpy as np import pymorph as pm import mahotas as mh from skimage import morphology from skimage import io from matplotlib import…
postgres
  • 2,242
  • 5
  • 34
  • 50