@classmethod
def recognizeCaptcha(cls, image_path, extension, pixel_min=0, captcha_name=
    'chaptcha'):
    """ 识别验证码， 返回二值化验证码和字符分割横坐标，以及图片扩展名 """
    from PIL import Image
    image_object = Image.open(image_path)
    image_object = image_object.convert('P')
    d_histogram = image_object.histogram()
    values = dict(enumerate(d_histogram, 0))
    temp = sorted(values.items(), key=lambda x: x[1], reverse=True)[:10]
    temp = sorted(temp, key=lambda x: x[0], reverse=True)[3:]
    pixel_max = temp[0][0]
    binary_object = cls.captchaImageBinary(pixel_min, pixel_max,
        image_object=image_object, image_path=image_path)
    letters = cls.longitudinalSplit(binary_object)
    return binary_object, letters, extension
