Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to detect rotation angle 0 , -90 ,+90 or 180

I would like to detect the rotation angle of scanned ID card here there are the sample images

[C:\fakepath\+90 Degree.jpg](/upfiles/1478027228770138.jpg)
[C:\fakepath\0 Degree.jpg](/upfiles/14780272881817805.jpg)
[C:\fakepath\-90 Degree.jpg](/upfiles/14780273172878512.jpg)
[C:\fakepath\180 Degree.jpg](/upfiles/14780273454061569.jpg)

Thanks for help any idea is appreciated

How to detect rotation angle 0 , -90 ,+90 or 180

I would like to detect the rotation angle of scanned ID card here there are the sample images

[C:\fakepath\+90 ![C:\fakepath\+90 Degree.jpg](/upfiles/1478027228770138.jpg)
[C:\fakepath\0 Degree.jpg](/upfiles/14780272881817805.jpg)
[C:\fakepath\-90 Degree.jpg](/upfiles/14780273172878512.jpg)
[C:\fakepath\180 Degree.jpg](/upfiles/14780273454061569.jpg)

C:\fakepath\0 Degree.jpg C:\fakepath-90 Degree.jpg C:\fakepath\180 Degree.jpg

Thanks for help any idea is appreciated

How to detect rotation angle 0 , -90 ,+90 or 180

I would like to detect the rotation angle of scanned ID card here there are the sample images

![C:\fakepath\+90 Degree.jpg](/upfiles/1478027228770138.jpg)
[C:\fakepath\+90 Degree.jpg](/upfiles/147810224236179.jpg)

C:\fakepath\0 Degree.jpg C:\fakepath-90 Degree.jpg C:\fakepath\180 Degree.jpg

The first method Use Template matching , the idea is as follow

 1-Select the Template object which is the area not changed in the card  printing  i used the following area to be a template, it's the card logo

image description

2-Use the following tutorial Features2D + Homography to find a known object

3-The result will be as follow image description

The drawbacks of the method are

1-Detection for one type of ID's and i have a lot of card types.
2-it seems this method is slow

Thanks for help any idea is appreciatedappreciated to find Generic method for different ID cards