I have an A4 paper with some black stroked rectangle. I scan the image and try to use some basic OpenCV's function like template matching but I see the image I recive sometime rotated when I put it to the scanner or the paper somehow wrinkled so the template matching will not work.
I'm very new to image processing, I hope you can show me some step-to-step to fix my issue.
Thanks.
Asked
Active
Viewed 417 times
0

nvcnvn
- 4,991
- 8
- 49
- 77
1 Answers
1
If your object detector is confident to find objects based on a template with a certain scale and orientation, then all you have to do is to apply some scaling, rotation, or affine transformations to that query template and re-apply the search.
Eg. if your template T, is used on an image I, based on a search method S(T,I) then you can apply S, with many T-based products:
Scale: T1=0.5*T...Tn=1.5*T Rotation: T1=R(T,-pi)...Tn=R(T,+pi)

LovaBill
- 5,107
- 1
- 24
- 32