         averageColor.extractedColorCallback = { color in
             let lighting = color.blueComponent + color.greenComponent + color.redComponent
             let currentExposure = self.exposure.exposure
-            // The stablil color is between 2.75 and 2.85. Otherwise change the exposure
+            // The stable color is between 2.75 and 2.85. Otherwise change the exposure
             if lighting < 2.75 {
                 self.exposure.exposure = currentExposure + (2.80 - lighting) * 2
             }


    :param: mrz The MRZ result
    */
    open func succesfullScan(mrz: MRZ) {
        assertionFailure("You should overwrite this function to handle the scan results")
    }

    /**
    Override this function in your own class for processing a cancel
    */
    open func abbortScan() {
        assertionFailure("You should overwrite this function to handle an aabbort")
    }

}


// Wanted to use this rotation function. Tesseract does not like the result image. Went back to GpuImage for the rotation. Will try again later so that we can remove the old GpuImage dependency
@available(iOS 10.0, *)
extension UIImage {
    func rotate(by degrees: Double) -> UIImage? {

            }
        }

        // download trained data to tessdata folder for language from:
        // https://code.google.com/p/tesseract-ocr/downloads/list
        // ocr trained data is available in:    ;)
        // http://getandroidapp.org/applications/business/79952-nfc-passport-reader-2-0-8.html
        // optimisations created based on https://github.com/gali8/Tesseract-OCR-iOS/wiki/Tips-for-Improving-OCR-Results
        
