I have had to work a lot on Python lately, and I have to deal with a lot of difficulties when switching between formats. When I read the image using Mahotas, I cannot get it before cv2, although both of them use numpy.ndarray. SimpleCV can easily receive OpenCV images, but acquiring SimpleCV images for legacy cv or mahotas seems to be quite a challenge.
Some format conversion syntaxes will be really appreciated. For example, if I open a grayscale image with mahotas, by default I get it in a floating-point color space. Even when I assign type to numpy.uint8, cv2 does not seem to recognize it as an array. I do not know how to solve this problem. I also donβt really like color images. I am using Python 2.7 32bit on Ubuntu Oneiric Ocelot.
Thanks in advance!
source share