'**SUMMARY**
Predict the class of the image using trained face recognizer.
**PARAMETERS**
* *image*    -  Image.The images must be of the same size as provided
in training.
**RETURNS**
* *label* - Class of the image which it belongs to.
**EXAMPLES**
>>> f = FaceRecognizer()
>>> imgs1 = ImageSet(path/to/images_of_type1)
>>> labels1 = ["type1"]*len(imgs1)
>>> imgs2 = ImageSet(path/to/images_of_type2)
>>> labels2 = ["type2"]*len(imgs2)
>>> imgs3 = ImageSet(path/to/images_of_type3)
>>> labels3 = ["type3"]*len(imgs3)
>>> imgs = imgs1 + imgs2 + imgs3
>>> labels = labels1 + labels2 + labels3
>>> f.train(imgs, labels)
>>> img = Image("some_image_of_any_of_the_above_type")
>>> print f.predict(img)
Save Fisher Training Data
>>> f.save("trainingdata.xml")
Load Fisher Training Data and directly use without trainging
>>> f1 = FaceRecognizer()
>>> f1.load("trainingdata.xml")
>>> img = Image("some_image_of_any_of_the_above_type")
>>> print f1.predict(img)
Use CSV files for training
>>> f = FaceRecognizer()
>>> f.train(csvfile="CSV_file_name", delimiter=";")
>>> img = Image("some_image_of_any_of_the_type_in_csv_file")
>>> print f.predict(img)'

def predict(self, image):

    if (not self.supported):
        warnings.warn('Fisher    Recognizer    is    supported    by    OpenCV    >=    2.4.4')
        return None
    if (image.size() != self.imageSize):
        (w, h) = self.imageSize
        image = image.resize(w, h)
    cv2img = image.getGrayNumpyCv2()
    (label, confidence) = self.model.predict(cv2img)
    retLabel = self.labels_dict_rev.get(label)
    if (not retLabel):
        retLabel = label
    return (retLabel, confidence)
