How to deskew an image in an unknown condition? [closed]

asked 2015-05-12 21:54:32 -0600

cv_new gravatar image

I knew that there is a getPerspectiveTransform function in OpenCV to perform the deskew work, it is very useful under a known condition. However, the destination matrix used is well-defined by users.

Suppose that there are different type of cards we want to make a recognition, but those are in different sizes and skew in different angles, which result in the failure of using getPerspectiveTransform. What can I do if I try to use getPerspectiveTransform?

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by sturkmen
close date 2020-10-17 11:07:49.080785

Comments

If you have photos of cards in different positions you can use this but this one is detecting the points more correct IMHO.

thdrksdfthmn gravatar imagethdrksdfthmn ( 2015-05-13 03:00:22 -0600 )edit

Thank you, thdrksdfthmn. I have read the first passage before, but the destination image's size used in that code is well-defined as I said, which is ( cv::Mat quad = cv::Mat::zeros(300, 220, CV_8UC3) ). So in my case, when I'm unable to determine the original object's size, using that deskewing way may not work.

cv_new gravatar imagecv_new ( 2015-05-13 22:31:17 -0600 )edit

I do not really understand your case... Can you post some more info, like a photo of input image or something like that?

thdrksdfthmn gravatar imagethdrksdfthmn ( 2015-05-15 02:30:28 -0600 )edit