         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
             }

        result = self.tesseract.recognizedText
        //tesseract = nil
        G8Tesseract.clearCache()
        print("Scanresult : \(result)")
        return result ?? ""
    }



    :param: mrz The MRZ result
    */
    open func successfulScan(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 abortScan() {
        assertionFailure("You should overwrite this function to handle an abort")
    }
}


// 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? {
