I'm looking for a way of performing dewarping on an image of a curved bottle label, such that the curved text in the original image appears as a straight line in the altered image. The following is an example of an image I might be looking to dewarp:
I've been referencing a 2013 paper (Ye et al.) which seems to be doing some similar work, but I'm having a hard time figuring out where the authors are getting their variables from in the math they describe. I'm hoping someone here might be able to help me out.
The authors start by clearly labeling the variables they intend to use in a diagram:
And then itemizing the equations they use to perform the dewarping operation:
Their final result looks like this:
This seems straightforward enough; however, I don't see where they're getting many of the variables they list in the original diagram. From what I've read, the focal length (f
) needs to be measured specifically for the camera you're using to capture the original image. However, there is no indication in the paper of how to calculate angle Q
, the radius of the bottle, or any of the edge lengths from the captured image. I haven't been able to find anything online describing how to do this. Does anyone know of a method that might be used to calculate any one of these variables from the image given? I apologize for the vague details - I have very little information to go on here. Thank you in advance for any help you can give.
Edit: Suggestions on tags to include with the post are welcome - I'm not sure who might be able to help with this kind of question.