How to fill gaps between each segment of the 7-segment character
<p>I want to recognize digits from odometer by mobile using tesseract library.
Source image:</p>

<p><a href="https://i.stack.imgur.com/XmyTE.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XmyTE.png" alt="enter image description here"></a></p>

<p>Next step:</p>

<p><a href="https://i.stack.imgur.com/e4wnN.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/e4wnN.png" alt="enter image description here"></a></p>

<p>Now i need to fill gaps between each segment. 
Can you help me, how i do it?
(english training data work better for me than <a href="https://github.com/arturaugusto/display_ocr" rel="nofollow noreferrer">https://github.com/arturaugusto/display_ocr</a>)</p>

<pre><code>image processing: 

func prepareImage(sourceImage: UIImage) -&gt; UIImage {
    let avgLuminanceThresholdFilter = GPUImageAverageLuminanceThresholdFilter()
    avgLuminanceThresholdFilter.thresholdMultiplier = 0.67

    let adaptiveThresholdFilter = GPUImageAdaptiveThresholdFilter()
    adaptiveThresholdFilter.blurRadiusInPixels = 0.67

    let unsharpMaskFilter = GPUImageUnsharpMaskFilter()
    unsharpMaskFilter.blurRadiusInPixels = 4.0

    let stillImageFilter = GPUImageAdaptiveThresholdFilter()
    stillImageFilter.blurRadiusInPixels = 1.0

    let contrastFilter = GPUImageContrastFilter()
    contrastFilter.contrast = 0.75

    let brightnessFilter = GPUImageBrightnessFilter()
    brightnessFilter.brightness = -0.25

    //unsharpen
    var processingImage = unsharpMaskFilter.imageByFilteringImage(sourceImage)

    processingImage = contrastFilter.imageByFilteringImage(processingImage)
    processingImage = brightnessFilter.imageByFilteringImage(processingImage)

    //convert to binary black/white pixels
    processingImage = avgLuminanceThresholdFilter.imageByFilteringImage(processingImage)

    return processingImage

  }
</code></pre>

<p>OCR:</p>

<pre><code>let tesseract_eng = G8Tesseract()
    tesseract_eng.language = "eng"
    tesseract_eng.engineMode = .TesseractOnly
    tesseract_eng.pageSegmentationMode = .Auto
    tesseract_eng.maximumRecognitionTime = 60.0
    tesseract_eng.setVariableValue("0123456789", forKey: "tessedit_char_whitelist")
    tesseract_eng.image = prepareImage(image)
    tesseract_eng.recognize()
</code></pre>