PostPic is an extension for the PostgreSQL DBMS that enables image processing inside the database, like PostGIS does for spatial data. It adds a new ‘image’ type to the SQL and several functions for processing images and extracting their attributes.
Mahotas is an image processing library for Python. It includes a couple of algorithms implemented in C++ for speed while operating in numpy arrays. The main algorithms are watershed and Otsu thresholding.