Primitive text direction feature detector

v.1.1 of text direction feature detector :)
What about this interpretation of the method:

        copy = image.rotate(angle, Image.BILINEAR, True)

        img = np.fromstring(copy.tostring(), dtype=np.uint8).reshape(
                copy.size[0], copy.size[1], 2)

        alpha_mask = ((img[:,:,1] == 255) * 255).astype(np.uint8)
        black_px_mask = ((img[:,:,0] < 10) * 255).astype(np.uint8)

        res = 255-img[:,:,0]
        res = cv2.bitwise_and(res, black_px_mask)
        res = cv2.bitwise_and(res, alpha_mask)

        # Python cv2.reduce doesn't work correctly with int matrices.
        data_for_reduce = res.astype(np.float)

        return cv2.reduce(data_for_reduce, 1, cv2.cv.CV_REDUCE_SUM)

It works about 10x faster and I believe yields the same result.