Image Conversion between cv2, cv, mahotas, and SimpleCV
I have never used mahotas. But I'm currently working on SimpleCV. I have just sent a pull request for making SimpleCV numpy array compatible with cv2.
So, basically,

Image.getNumpy() -> numpy.ndarray for cv2
Image.getBitmap() ->  cv2.cv.iplimage
Image.getMatrix() -> cv2.cv.cvmat

To convert cv2 numpy array to SimpleCV Image object,

Image(cv2_image) -> SimpleCV.ImageClass.Image
I am having to do a lot of vision related work in Python lately, and I am facing a lot of difficulties switching between formats. When I read an image using Mahotas, I cannot seem to get it to cv2, though they are both using numpy.ndarray. SimpleCV can take OpenCV images easily, but getting SimpleCV image out for legacy cv or mahotas seems to be quite a task.
Some format conversion syntaxes would be really appreciated. For example, if I open a greyscale image using mahotas, it is treated to be in floating point colour space by default, as I gather. Even when I assign the type as numpy.uint8, cv2 cannot seem to recognise it as an array. I do not know how to solve this problem. I am not having much luck with colour images either. I am using Python 2.7 32bit on Ubuntu Oneiric Ocelot.
Thanks in advance!