1 | initial version |
2 | No.2 Revision |
3.1. Get 4 corner points and warpPerspective your ticket to a predefined size
3.2. If you scan you can simply counter rotate your ticket by your RotatedRect.angle RotatedRect.angle, however if you put your ticket carefully, it should be straight enough, so you can skip the entire point no 3.
4. Having a straight ticked of known size, set ROIs to afore measured regions of interest and pass them to tesseract.
3 | No.3 Revision |
3.1. Get 4 corner points and warpPerspective your ticket to a predefined size
size.
3.2. If you scan you can simply counter rotate your ticket by your RotatedRect.angle, however if you put your ticket carefully, it should be straight enough, so you can skip the entire point no 3.
4. 3.
4 | No.4 Revision |
3.1. Get 4 corner points and warpPerspective your ticket to a predefined size.
3.2. If you scan you can simply counter rotate your ticket by your RotatedRect.angle, however if you put your ticket carefully, it should be straight enough, so you can skip the entire point no 3.
5 | No.5 Revision |
1.1. If you cannot scan, make sure the ticket is flat and take a picture. You can flatten the ticket by putting it under a flat glass, but then you need to make sure there are no reflections (shoot at an angle and see 3.1) 3.1)
2. Threshold your image to get the region of your ticket. ticket.
3. Use findContours, then find minAreaRectangle and straighten your ticket by:
3.1. Get 4 corner points and warpPerspective your ticket to a predefined size.
3.2. If you scan you can simply counter rotate your ticket by your RotatedRect.angle, however if you put your ticket carefully, it should be straight enough, so you can skip the entire point no 3.
6 | No.6 Revision |
1
Scan your ticket with a flatbed scanner and use black background.1.1. 1.1 If you cannot scan, make sure the ticket is flat and take a picture. You can flatten the ticket by putting it under a flat glass, but then you need to make sure there are no reflections (shoot at an angle and see 3.1)
2. 3.1)
2 Threshold your image to get the region of your ticket.
3. ticket.
3 Use findContours, then find minAreaRectangle and straighten your ticket by:
3.1. Get 4 corner points and warpPerspective your ticket to a predefined size.
3.2. If you scan you can simply counter rotate your ticket by your RotatedRect.angle, however if you put your ticket carefully, it should be straight enough, so you can skip the entire point no 3.
4
Having a straight7 | No.7 Revision |
1 Scan your ticket with a flatbed scanner and use black background.
1.1 If you cannot scan, make sure the ticket is flat and take a picture. You can flatten the ticket by putting it under a flat glass, but then you need to make sure there are no reflections (shoot at an angle and see 3.1)
2 Threshold your image to get the region of your ticket.
3 Use findContours, then find minAreaRectangle of the largest contour and straighten your ticket by:
3.1. Get 4 corner points and warpPerspective your ticket to a predefined size.
3.2. If you scan you can simply counter rotate your ticket by your RotatedRect.angle, however if you put your ticket carefully, it should be straight enough, so you can skip the entire point no 3.
4 Having a straight ticket of known size, set ROIs to afore measured regions of interest and pass them to tesseract.