Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Image Processing, In Python? [closed]

I've recently come across a problem which requires at least a basic degree of image processing, can I do this in Python, and if so, with what?

like image 982
akdom Avatar asked Sep 18 '08 17:09

akdom


People also ask

What is closing operations in image processing?

Morphological closing is a dilation followed by an erosion (i.e. the reverse of the operations for an opening). As you might be able to guess, the net effect of the closing operation is to remove background pixels that fit the structuring element. In other words, closing tends to close gaps in the image.

Can we do image processing in Python?

Above example is from the PIL library of python. We can use other library like open-cv, matplotlib & numpy for image processing. Below are some of the example program to demonstrate the use of much powerful library for image processing.

What is opening and closing in image processing?

Opening removes small objects from the foreground (usually taken as the bright pixels) of an image, placing them in the background, while closing removes small holes in the foreground, changing small islands of background into foreground. These techniques can also be used to find specific shapes in an image.


2 Answers

The best-known library is PIL. However if you are simply doing basic manipulation, you are probably better off with the Python bindings for ImageMagick, which will be a good deal more efficient than writing the transforms in Python.

like image 161
Jim Avatar answered Sep 19 '22 06:09

Jim


Depending on what you mean by "image processing", a better choice might be in the numpy based libraries: mahotas, scikits.image, or scipy.ndimage. All of these work based on numpy arrays, so you can mix and match functions from one library and another.

I started the website http://pythonvision.org which has more information on these.

like image 38
luispedro Avatar answered Sep 19 '22 06:09

luispedro