Reads Scene Text in Tilted orientation.
- Visual Studio 2013
- Visual Studio 2015
You can acquire the following using NuGet Package Manager
- EMGU.CV.3.3
- Tesseract.3.0.2.0
This is done by the following steps
- Initialize necessary parameters.
- Start the image acquisition from the camera.
- Apply Canny Algorithm and Thresholding.
Fig. 1 - Canny Algorithm + Thresholding
- Apply Closed Morphology and Erosion
Fig. 2 - Closed Morphology + Erosion
- Apply Dilation
Fig. 3 - Dilation
-
Find the Contours of the Dilated image. Then acquire each Region of Interests (ROI) in terms of Rotated Rectangle.
-
Determine the Tilt Orientation and Angles of each acquired Contour Rotated Rectangles.
Fig. 4 - Tilt Orientation and Angle (in Degrees)
-
For each Contour Rotated Rectangles -- crop it from the Grayscaled original input image and apply image rotation based on its Tilt Orientation and its Tilt Angle.
-
Apply Tesseract APIs OCR, and this will be the actual result.
- This example is tilted and oriented upside down.
Fig. 5 - Tilted and oriented upside down
- This example is tilted to the left.
Fig. 6 - Tilted to the left
- This example is tilted to the right.
Fig. 7 - Tilted to the right
- Make sure that Tesseract's tessdata folder exists inside the directory of the executable.